Skip to content

Commit 8c84cbf

Browse files
committed
docs: added docs for statistics
1 parent 482e57b commit 8c84cbf

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

docs/gl_objects/projects.rst

+51
Original file line numberDiff line numberDiff line change
@@ -754,3 +754,54 @@ Protect a single repository tag or several project repository tags using a wildc
754754
Unprotect the given protected tag or wildcard protected tag.::
755755

756756
protected_tag.delete()
757+
758+
Additional project statistics
759+
=============================
760+
761+
Reference
762+
---------
763+
764+
* v4 API:
765+
766+
+ :class:`gitlab.v4.objects.ProjectAdditionalStatistics`
767+
+ :class:`gitlab.v4.objects.ProjectAdditionalStatisticsManager`
768+
+ :attr:`gitlab.v4.objects.Project.additionalstatistics`
769+
770+
* GitLab API: https://docs.gitlab.com/ce/api/project_statistics.html
771+
772+
Examples
773+
---------
774+
775+
Get all additional statistics of a project::
776+
777+
statistics = project.additionalstatistics.get()
778+
779+
Get total fetches in last 30 days of a project::
780+
781+
total_fetches = project.additionalstatistics.get()['fetches']['total']
782+
783+
Project issues statistics
784+
=========================
785+
786+
Reference
787+
---------
788+
789+
* v4 API:
790+
791+
+ :class:`gitlab.v4.objects.ProjectIssuesStatistics`
792+
+ :class:`gitlab.v4.objects.ProjectIssuesStatisticsManager`
793+
+ :attr:`gitlab.v4.objects.Project.issuesstatistics`
794+
795+
* GitLab API: https://docs.gitlab.com/ce/api/issues_statistics.html#get-project-issues-statistics
796+
797+
Examples
798+
---------
799+
800+
Get statistics of all issues in a project::
801+
802+
statistics = project.issuesstatistics.get()
803+
804+
Get statistics of issues in a project with ``foobar`` in ``title`` and
805+
``description``::
806+
807+
statistics = project.issuesstatistics.get(search='foobar')

0 commit comments

Comments
 (0)