Gets the content of this asset.

        return: (osid.repository.AssetContentList) - the asset contents
        raise:  OperationFailed - unable to complete request
        *compliance: mandatory -- This method must be implemented.*
438699
def get_asset_contents(self):
        
        # Implemented from template for osid.repository.Asset.get_asset_contents_template
        return AssetContentList(
            self._my_map['assetContents'],
            runtime=self._runtime,
            proxy=self._proxy)
728452
def get_github_content(repo,path,auth=None):
	
	request = requests.get(file_url.format(repo=repo, path=path), auth=auth)
	if not request.ok:
		print("There is a problem with the request")
		print(file_url.format(repo=repo, path=path))
		print(request.json())
		exit(1)
	if not request.json()['encoding'] == 'base64':
		raise RuntimeError("Unknown Encoding encountered when fetching {} from repo {}: {}".format(path,repo,request.json()['encoding']))
	return request.json()['content'].decode('base64').decode('utf8')
647337
def get_asset_content_ids(self):
        
        # Implemented from template for osid.repository.Asset.get_asset_content_ids_template
        id_list = []
        for asset_content in self.get_asset_contents():
            id_list.append(asset_content.get_id())
        return IdList(id_list)
1121747
def assets(self) -> List[Asset]:
        

        return list(filter(is_element(Asset), self.content))
246049
async def get_contents(self, uri) -> List[Content]:
        
        contents = [
            Content.make(**x)
            for x in await self.services["avContent"]["getContentList"](uri=uri)
        ]
        contentlist = []

        for content in contents:
            if content.contentKind == "directory" and content.index >= 0:
                # print("got directory %s" % content.uri)
                res = await self.get_contents(content.uri)
                contentlist.extend(res)
            else:
                contentlist.append(content)
                # print("%s%s" % (' ' * depth, content))
        return contentlist
743494
def get_file_contents(self, file_key):
		'''
		'''
		#does not work
		self._raise_unimplemented_error()
		
		uri = '/'.join([self.api_uri,
						self.files_suffix,
						file_key,
						self.file_contents_suffix,
						])
		return self._req('get', uri)
1079123
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return AssetVersionInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            asset_sid=self._solution['asset_sid'],
            sid=self._solution['sid'],
        )
4117
def _cache_contents(self, style_urls, asset_url_path):
        
        files = {}

        asset_urls = []
        for style_url in style_urls:
            if not self.quiet:
                print(' * Downloading style', style_url, file=sys.stderr)
            r = requests.get(style_url)
            if not 200 <= r.status_code < 300:
                print(' -> Warning: Style request responded with',
                      r.status_code, file=sys.stderr)
                files = None
                continue
            asset_content = r.text
            # Find assets and replace their base URLs with the cache directory
            for url in re.findall(STYLE_ASSET_URLS_RE, asset_content):
                asset_urls.append(urljoin(style_url, url))
            contents = re.sub(
                STYLE_ASSET_URLS_RE,
                STYLE_ASSET_URLS_SUB_FORMAT.format(asset_url_path.rstrip('/')),
                asset_content)
            # Prepare cache
            if files is not None:
                filename = self.cache_filename(style_url)
                files[filename] = contents.encode('utf-8')

        for asset_url in asset_urls:
            if not self.quiet:
                print(' * Downloading asset', asset_url, file=sys.stderr)
            # Retrieve binary file and show message
            r = requests.get(asset_url, stream=True)
            if not 200 <= r.status_code < 300:
                print(' -> Warning: Asset request responded with',
                      r.status_code, file=sys.stderr)
                files = None
                continue
            # Prepare cache
            if files is not None:
                filename = self.cache_filename(asset_url)
                files[filename] = r.raw.read(decode_content=True)

        # Skip caching if something went wrong to try again next time
        if not files:
            return False

        # Cache files if all downloads were successful
        cache = {}
        for relname in files:
            cache[safe_join(self.cache_path, relname)] = files[relname]
        if not os.path.exists(self.cache_path):
            os.makedirs(self.cache_path)
        for filename in cache:
            with open(filename, 'wb') as f:
                f.write(cache[filename])
        if not self.quiet:
            print(
                ' * Cached all downloads in', self.cache_path, file=sys.stderr)
        return True
487635
def get(self):
        
        content = {}
        if self.mime_type is not None:
            content["type"] = self.mime_type

        if self.content is not None:
            content["value"] = self.content
        return content
928061
def get_assets(self):
        
        if self.retrieved:
            raise errors.IllegalState('List has already been retrieved.')
        self.retrieved = True
        return objects.AssetList(self._results, runtime=self._runtime)
1060698
def retrieve_content(self):
        """"""
        path = self._construct_path_to_source_content()
        res = self._http.get(path)
        self._populated_fields['content'] = res['content']
        return res['content']
1160559
def content(self, content):
        
        allowed_values = ["UNRELEASED", "EARLYACCESS", "SUPPORTED", "EXTENDED_SUPPORT", "EOL"]
        if not set(content).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `content` [{0}], must be a subset of [{1}]"
                .format(", ".join(map(str, set(content)-set(allowed_values))),
                        ", ".join(map(str, allowed_values)))
            )

        self._content = content
148540
async def get_value(self):
        

        cc = self.request.custom_content

        async with self.lock:
            if self.content_key not in cc:
                cc[self.content_key] = await self.call_api()

        return cc[self.content_key]
1082113
def content(self, file_relpath):
    
    if self.isignored(file_relpath):
      self._raise_access_ignored(file_relpath)

    return self._content_raw(file_relpath)
957442
def content(self):  # type: () -> object
        
        as_text = self.content_type in _content_types.UTF8_TYPES

        return self.get_data(as_text=as_text)
296479
def _get_content(self, context):
        
        self._valid_template()
        context.update({
            "csrf_token_value": get_token(self.request)
        })
        return render_to_string(self.get_template_names(), context)
1103886
def get_content(self, content_type=github.GithubObject.NotSet):
        
        if self.content_url == None:
            return None
            
        if content_type == "PullRequest":
            headers, data = self._requester.requestJsonAndCheck(
                "GET",
                self.content_url.replace("issues", "pulls")
            )
            return github.PullRequest.PullRequest(self._requester, headers, data, completed=True)
        elif content_type is github.GithubObject.NotSet or content_type == "Issue":
            headers, data = self._requester.requestJsonAndCheck(
                "GET",
                self.content_url
            )
            return github.Issue.Issue(self._requester, headers, data, completed=True)
        else:
            assert False, "Unknown content type: %s" % content_type