Changeset View
Changeset View
Standalone View
Standalone View
swh/search/interface.py
# Copyright (C) 2020-2021 The Software Heritage developers | # Copyright (C) 2020-2021 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from collections import Counter | |||||
from typing import Iterable, List, Optional, TypeVar | from typing import Iterable, List, Optional, TypeVar | ||||
from typing_extensions import TypedDict | from typing_extensions import TypedDict | ||||
from swh.core.api import remote_api_endpoint | from swh.core.api import remote_api_endpoint | ||||
from swh.core.api.classes import PagedResult as CorePagedResult | from swh.core.api.classes import PagedResult as CorePagedResult | ||||
TResult = TypeVar("TResult") | TResult = TypeVar("TResult") | ||||
▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | ) -> PagedResult[MinimalOriginDict]: | ||||
limit: number of results to return | limit: number of results to return | ||||
Returns: | Returns: | ||||
PagedResult of origin dicts matching the search criteria. If next_page_token | PagedResult of origin dicts matching the search criteria. If next_page_token | ||||
is None, there is no longer data to retrieve. | is None, there is no longer data to retrieve. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("visit_types_count") | |||||
def visit_types_count(self) -> Counter: | |||||
"""Returns origin counts per visit type (git, hg, svn, ...). | |||||
""" | |||||
... |