Changeset View
Changeset View
Standalone View
Standalone View
swh/web/common/origin_visits.py
Show All 25 Lines | Returns: | ||||
* **date**: UTC visit date in ISO format, | * **date**: UTC visit date in ISO format, | ||||
* **origin**: the origin url | * **origin**: the origin url | ||||
* **status**: the visit status, either **full**, **partial** | * **status**: the visit status, either **full**, **partial** | ||||
or **ongoing** | or **ongoing** | ||||
* **visit**: the visit id | * **visit**: the visit id | ||||
* **type**: the visit type | * **type**: the visit type | ||||
Raises: | Raises: | ||||
NotFoundExc: if the origin is not found | swh.web.common.exc.NotFoundExc: if the origin is not found | ||||
""" | """ | ||||
from swh.web.common import service | from swh.web.common import service | ||||
if 'url' in origin_info: | if 'url' in origin_info: | ||||
origin_url = origin_info['url'] | origin_url = origin_info['url'] | ||||
else: | else: | ||||
origin_url = service.lookup_origin(origin_info)['url'] | origin_url = service.lookup_origin(origin_info)['url'] | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |