get_origin_visits(origin_info: swh.web.common.typing.OriginInfo) → List[swh.web.common.typing.OriginVisitInfo]¶
Function that returns the list of visits for a swh origin. That list is put in cache in order to speedup the navigation in the swh web browse ui.
The returned visits are sorted according to their date in ascending order.
origin_info – dict describing the origin to fetch visits from
A list of dict describing the origin visits
swh.web.common.exc.NotFoundExc – if the origin is not found
get_origin_visit(origin_info: swh.web.common.typing.OriginInfo, visit_ts: Optional[Union[int, str]] = None, visit_id: Optional[int] = None, snapshot_id: Optional[str] = None) → swh.web.common.typing.OriginVisitInfo¶
Function that returns information about a visit for a given origin.
If a timestamp is provided, the closest visit from that timestamp is returned.
If a snapshot identifier is provided, the first visit with that snapshot is returned.
If no search hints are provided, return the most recent full visit with a valid snapshot or the most recent partial visit with a valid snapshot otherwise.
origin_info – a dict filled with origin information
visit_ts – an ISO date string or Unix timestamp to parse
snapshot_id – a snapshot identifier
A dict containing the visit info.
swh.web.common.exc.NotFoundExc – if no visit can be found