diff options
Diffstat (limited to 'gitlab')
| -rw-r--r-- | gitlab/client.py | 2 | ||||
| -rw-r--r-- | gitlab/v4/objects/statistics.py | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gitlab/client.py b/gitlab/client.py index 6e81f6a..9814fa2 100644 --- a/gitlab/client.py +++ b/gitlab/client.py @@ -188,6 +188,8 @@ class Gitlab: """See :class:`~gitlab.v4.objects.PersonalAccessTokenManager`""" self.topics = objects.TopicManager(self) """See :class:`~gitlab.v4.objects.TopicManager`""" + self.statistics = objects.ApplicationStatisticsManager(self) + """See :class:`~gitlab.v4.objects.ApplicationStatisticsManager`""" def __enter__(self) -> "Gitlab": return self diff --git a/gitlab/v4/objects/statistics.py b/gitlab/v4/objects/statistics.py index 1de963e..ce4dc3a 100644 --- a/gitlab/v4/objects/statistics.py +++ b/gitlab/v4/objects/statistics.py @@ -13,6 +13,8 @@ __all__ = [ "IssuesStatisticsManager", "ProjectIssuesStatistics", "ProjectIssuesStatisticsManager", + "ApplicationStatistics", + "ApplicationStatisticsManager", ] @@ -71,3 +73,15 @@ class ProjectIssuesStatisticsManager(GetWithoutIdMixin, RESTManager): def get(self, **kwargs: Any) -> ProjectIssuesStatistics: return cast(ProjectIssuesStatistics, super().get(**kwargs)) + + +class ApplicationStatistics(RESTObject): + _id_attr = None + + +class ApplicationStatisticsManager(GetWithoutIdMixin, RESTManager): + _path = "/application/statistics" + _obj_cls = ApplicationStatistics + + def get(self, **kwargs: Any) -> ApplicationStatistics: + return cast(ApplicationStatistics, super().get(**kwargs)) |
