Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/interface.py
Show First 20 Lines • Show All 1,214 Lines • ▼ Show 20 Lines | ) -> List[RawExtrinsicMetadata]: | ||||
**targeting** the id) | **targeting** the id) | ||||
Args: | Args: | ||||
ids: list of hashes of RawExtrinsicMetadata objects | ids: list of hashes of RawExtrinsicMetadata objects | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("raw_extrinsic_metadata/get_authorities") | |||||
def raw_extrinsic_metadata_get_authorities( | |||||
self, target: ExtendedSWHID | |||||
) -> List[MetadataAuthority]: | |||||
"""Returns all authorities that provided metadata on the given object.""" | |||||
... | |||||
@remote_api_endpoint("metadata_fetcher/add") | @remote_api_endpoint("metadata_fetcher/add") | ||||
def metadata_fetcher_add(self, fetchers: List[MetadataFetcher],) -> Dict[str, int]: | def metadata_fetcher_add(self, fetchers: List[MetadataFetcher],) -> Dict[str, int]: | ||||
"""Add new metadata fetchers to the storage. | """Add new metadata fetchers to the storage. | ||||
Their `name` and `version` together are unique identifiers of this | Their `name` and `version` together are unique identifiers of this | ||||
fetcher; and `metadata` is an arbitrary dict of JSONable data | fetcher; and `metadata` is an arbitrary dict of JSONable data | ||||
with information about this fetcher, which must not be `None` | with information about this fetcher, which must not be `None` | ||||
(but may be empty). | (but may be empty). | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |