Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/interface.py
Show First 20 Lines • Show All 1,131 Lines • ▼ Show 20 Lines | def raw_extrinsic_metadata_add(self, metadata: List[RawExtrinsicMetadata],) -> None: | ||||
Args: | Args: | ||||
metadata: iterable of RawExtrinsicMetadata objects to be inserted. | metadata: iterable of RawExtrinsicMetadata objects to be inserted. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("raw_extrinsic_metadata/get") | @remote_api_endpoint("raw_extrinsic_metadata/get") | ||||
def raw_extrinsic_metadata_get( | def raw_extrinsic_metadata_get( | ||||
self, | self, | ||||
object_type: MetadataTargetType, | type: MetadataTargetType, | ||||
id: Union[str, SWHID], | id: Union[str, SWHID], | ||||
authority: MetadataAuthority, | authority: MetadataAuthority, | ||||
after: Optional[datetime.datetime] = None, | after: Optional[datetime.datetime] = None, | ||||
page_token: Optional[bytes] = None, | page_token: Optional[bytes] = None, | ||||
limit: int = 1000, | limit: int = 1000, | ||||
) -> PagedResult[RawExtrinsicMetadata]: | ) -> PagedResult[RawExtrinsicMetadata]: | ||||
"""Retrieve list of all raw_extrinsic_metadata entries for the id | """Retrieve list of all raw_extrinsic_metadata entries for the id | ||||
Args: | Args: | ||||
object_type: one of the values of swh.model.model.MetadataTargetType | type: one of the values of swh.model.model.MetadataTargetType | ||||
id: an URL if object_type is 'origin', else a core SWHID | id: an URL if type is 'origin', else a core SWHID | ||||
authority: a dict containing keys `type` and `url`. | authority: a dict containing keys `type` and `url`. | ||||
after: minimum discovery_date for a result to be returned | after: minimum discovery_date for a result to be returned | ||||
page_token: opaque token, used to get the next page of results | page_token: opaque token, used to get the next page of results | ||||
limit: maximum number of results to be returned | limit: maximum number of results to be returned | ||||
Returns: | Returns: | ||||
PagedResult of RawExtrinsicMetadata | PagedResult of RawExtrinsicMetadata | ||||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |