Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/interface.py
Show First 20 Lines • Show All 1,009 Lines • ▼ Show 20 Lines | def origin_get_by_sha1(self, sha1s): | ||||
Yields: | Yields: | ||||
dicts containing origin information as returned | dicts containing origin information as returned | ||||
by :meth:`swh.storage.storage.Storage.origin_get`, or None if an | by :meth:`swh.storage.storage.Storage.origin_get`, or None if an | ||||
origin matching the sha1 is not found. | origin matching the sha1 is not found. | ||||
""" | """ | ||||
... | ... | ||||
@deprecated | |||||
@remote_api_endpoint("origin/get_range") | |||||
def origin_get_range(self, origin_from=1, origin_count=100): | |||||
"""Retrieve ``origin_count`` origins whose ids are greater | |||||
or equal than ``origin_from``. | |||||
Origins are sorted by id before retrieving them. | |||||
Args: | |||||
origin_from (int): the minimum id of origins to retrieve | |||||
origin_count (int): the maximum number of origins to retrieve | |||||
Yields: | |||||
dicts containing origin information as returned | |||||
by :meth:`swh.storage.storage.Storage.origin_get`. | |||||
""" | |||||
... | |||||
@remote_api_endpoint("origin/list") | @remote_api_endpoint("origin/list") | ||||
def origin_list( | def origin_list( | ||||
self, page_token: Optional[str] = None, limit: int = 100 | self, page_token: Optional[str] = None, limit: int = 100 | ||||
) -> PagedResult[Origin]: | ) -> PagedResult[Origin]: | ||||
"""Returns the list of origins | """Returns the list of origins | ||||
Args: | Args: | ||||
page_token: opaque token used for pagination. | page_token: opaque token used for pagination. | ||||
▲ Show 20 Lines • Show All 265 Lines • Show Last 20 Lines |