Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/interface.py
Show First 20 Lines • Show All 885 Lines • ▼ Show 20 Lines | ) -> Optional[OriginVisit]: | ||||
Returns: | Returns: | ||||
OriginVisit matching the criteria if found, None otherwise. Note that as | OriginVisit matching the criteria if found, None otherwise. Note that as | ||||
OriginVisit no longer held reference on the visit status or snapshot, you | OriginVisit no longer held reference on the visit status or snapshot, you | ||||
may want to use origin_visit_status_get_latest for those information. | may want to use origin_visit_status_get_latest for those information. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("origin/visit_status/get") | |||||
def origin_visit_status_get( | |||||
self, | |||||
origin: str, | |||||
visit: int, | |||||
page_token: Optional[str] = None, | |||||
order: ListOrder = ListOrder.ASC, | |||||
limit: int = 10, | |||||
) -> PagedResult[OriginVisitStatus]: | |||||
"""Retrieve page of OriginVisitStatus information. | |||||
Args: | |||||
origin: The visited origin | |||||
visit: The visit identifier | |||||
page_token: opaque string used to get the next results of a search | |||||
order: Order on visit status objects to list (default to asc) | |||||
limit: Number of visit statuses to return | |||||
Returns: Page of OriginVisitStatus data model objects. if next_page_token is | |||||
None, there is no longer data to retrieve. | |||||
""" | |||||
... | |||||
@remote_api_endpoint("origin/visit_status/get_latest") | @remote_api_endpoint("origin/visit_status/get_latest") | ||||
def origin_visit_status_get_latest( | def origin_visit_status_get_latest( | ||||
self, | self, | ||||
origin_url: str, | origin_url: str, | ||||
visit: int, | visit: int, | ||||
allowed_statuses: Optional[List[str]] = None, | allowed_statuses: Optional[List[str]] = None, | ||||
require_snapshot: bool = False, | require_snapshot: bool = False, | ||||
) -> Optional[OriginVisitStatus]: | ) -> Optional[OriginVisitStatus]: | ||||
▲ Show 20 Lines • Show All 369 Lines • Show Last 20 Lines |