summaryrefslogtreecommitdiff
path: root/docs/gl_objects
diff options
context:
space:
mode:
authorMitar <mitar.git@tnode.com>2019-12-12 21:54:23 -0800
committerMitar <mitar.git@tnode.com>2019-12-12 21:54:23 -0800
commit8c84cbf6374e466f21d175206836672b3dadde20 (patch)
tree342debbebe0daf671f8f5e77c3b8241b2538096a /docs/gl_objects
parent482e57ba716c21cd7b315e5803ecb3953c479b33 (diff)
downloadgitlab-8c84cbf6374e466f21d175206836672b3dadde20.tar.gz
docs: added docs for statistics
Diffstat (limited to 'docs/gl_objects')
-rw-r--r--docs/gl_objects/projects.rst51
1 files changed, 51 insertions, 0 deletions
diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst
index d766847..f1eca38 100644
--- a/docs/gl_objects/projects.rst
+++ b/docs/gl_objects/projects.rst
@@ -754,3 +754,54 @@ Protect a single repository tag or several project repository tags using a wildc
Unprotect the given protected tag or wildcard protected tag.::
protected_tag.delete()
+
+Additional project statistics
+=============================
+
+Reference
+---------
+
+* v4 API:
+
+ + :class:`gitlab.v4.objects.ProjectAdditionalStatistics`
+ + :class:`gitlab.v4.objects.ProjectAdditionalStatisticsManager`
+ + :attr:`gitlab.v4.objects.Project.additionalstatistics`
+
+* GitLab API: https://docs.gitlab.com/ce/api/project_statistics.html
+
+Examples
+---------
+
+Get all additional statistics of a project::
+
+ statistics = project.additionalstatistics.get()
+
+Get total fetches in last 30 days of a project::
+
+ total_fetches = project.additionalstatistics.get()['fetches']['total']
+
+Project issues statistics
+=========================
+
+Reference
+---------
+
+* v4 API:
+
+ + :class:`gitlab.v4.objects.ProjectIssuesStatistics`
+ + :class:`gitlab.v4.objects.ProjectIssuesStatisticsManager`
+ + :attr:`gitlab.v4.objects.Project.issuesstatistics`
+
+* GitLab API: https://docs.gitlab.com/ce/api/issues_statistics.html#get-project-issues-statistics
+
+Examples
+---------
+
+Get statistics of all issues in a project::
+
+ statistics = project.issuesstatistics.get()
+
+Get statistics of issues in a project with ``foobar`` in ``title`` and
+``description``::
+
+ statistics = project.issuesstatistics.get(search='foobar')