Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/resolvers/content.py
Show All 36 Lines | def data(self): | ||||
# FIXME, add more ways to retrieve data like binary string | # FIXME, add more ways to retrieve data like binary string | ||||
archive_url = "https://archive.softwareheritage.org/api/1/" | archive_url = "https://archive.softwareheritage.org/api/1/" | ||||
content_sha1 = self._node.hashes()["sha1"] | content_sha1 = self._node.hashes()["sha1"] | ||||
return { | return { | ||||
"url": f"{archive_url}content/sha1:{content_sha1.hex()}/raw/", | "url": f"{archive_url}content/sha1:{content_sha1.hex()}/raw/", | ||||
} | } | ||||
@property | @property | ||||
def fileType(self): | def mimeType(self): | ||||
# FIXME, fetch data from the indexers | # FIXME, fetch data from the indexers | ||||
return None | return None | ||||
@property | @property | ||||
def language(self): | def language(self): | ||||
# FIXME, fetch data from the indexers | # FIXME, fetch data from the indexers | ||||
return None | return None | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |