Changeset View
Changeset View
Standalone View
Standalone View
swh/web/api/views/snapshot.py
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | def api_snapshot(request, snapshot_id): | ||||
target_types = request.GET.get("target_types", None) | target_types = request.GET.get("target_types", None) | ||||
target_types = target_types.split(",") if target_types else None | target_types = target_types.split(",") if target_types else None | ||||
results = api_lookup( | results = api_lookup( | ||||
archive.lookup_snapshot, | archive.lookup_snapshot, | ||||
snapshot_id, | snapshot_id, | ||||
branches_from, | branches_from, | ||||
branches_count, | branches_count, | ||||
target_types, | target_types, | ||||
branch_name_exclude_prefix=None, | |||||
vlorentz: use kw arguments | |||||
notfound_msg="Snapshot with id {} not found.".format(snapshot_id), | notfound_msg="Snapshot with id {} not found.".format(snapshot_id), | ||||
enrich_fn=enrich_snapshot, | enrich_fn=enrich_snapshot, | ||||
request=request, | request=request, | ||||
) | ) | ||||
response = {"results": results, "headers": {}} | response = {"results": results, "headers": {}} | ||||
if results["next_branch"] is not None: | if results["next_branch"] is not None: | ||||
Show All 12 Lines |
use kw arguments