Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit660f0cf

Browse files
author
Gauvain Pocentek
committed
Document the global per_page setting
1 parentd981904 commit660f0cf

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

‎docs/api-usage.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,13 @@ parameter to get all the items when using listing methods:
189189
all_groups= gl.groups.list(all=True)
190190
all_owned_projects= gl.projects.owned(all=True)
191191
192+
You can define the ``per_page`` value globally to avoid passing it to every
193+
``list()`` method call:
194+
195+
..code-block::python
196+
197+
gl= gitlab.Gitlab(url, token,per_page=50)
198+
192199
``list()`` methods can also return a generator object which will handle the
193200
next calls to the API when required. This is the recommended way to iterate
194201
through a large number of items:

‎docs/cli.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ parameters. You can override the values in each GitLab server section.
7171
* - ``api_version``
7272
- ``3`` ou ``4``
7373
- The API version to use to make queries. Requires python-gitlab >= 1.3.0.
74+
* - ``per_page``
75+
- Integer between 1 and 100
76+
- The number of items to return in listing queries. GitLab limits the
77+
value at 100.
7478

7579
You must define the ``url`` in each GitLab server section.
7680

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp