summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorMitar <mitar.git@tnode.com>2019-12-09 23:40:29 -0800
committerMitar <mitar.git@tnode.com>2019-12-12 20:43:31 -0800
commitdb0b00a905c14d52eaca831fcc9243f33d2f092d (patch)
tree6fe9daaffae54c27b5d7857141bbd0a5fb75752d /gitlab/v4/objects.py
parent3e2d69417aa8c6b043ee99fea5f8d7e31a2ba3e8 (diff)
downloadgitlab-db0b00a905c14d52eaca831fcc9243f33d2f092d.tar.gz
feat: adding project stats
Fixes #967
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 89e3259..e957a36 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -3997,6 +3997,16 @@ class ProjectImportManager(GetWithoutIdMixin, RESTManager):
_from_parent_attrs = {"project_id": "id"}
+class ProjectAdditionalStatistics(RefreshMixin, RESTObject):
+ _id_attr = None
+
+
+class ProjectAdditionalStatisticsManager(GetWithoutIdMixin, RESTManager):
+ _path = "/projects/%(project_id)s/statistics"
+ _obj_cls = ProjectAdditionalStatistics
+ _from_parent_attrs = {"project_id": "id"}
+
+
class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
_short_print_attr = "path"
_managers = (
@@ -4042,6 +4052,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
("variables", "ProjectVariableManager"),
("wikis", "ProjectWikiManager"),
("clusters", "ProjectClusterManager"),
+ ("additionalstatistics", "ProjectAdditionalStatisticsManager"),
)
@cli.register_custom_action("Project", ("submodule", "branch", "commit_sha"))