| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d981904 commit 660f0cf
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -189,6 +189,13 @@ parameter to get all the items when using listing methods: | |||
| 189 | 189 | all_groups = gl.groups.list(all=True) | |
| 190 | 190 | all_owned_projects = gl.projects.owned(all=True) | |
| 191 | 191 | ||
| 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 | + | ||
| 192 | 199 | ``list()`` methods can also return a generator object which will handle the | |
| 193 | 200 | next calls to the API when required. This is the recommended way to iterate | |
| 194 | 201 | through a large number of items: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,6 +71,10 @@ parameters. You can override the values in each GitLab server section. | |||
| 71 | 71 | * - ``api_version`` | |
| 72 | 72 | - ``3`` ou ``4`` | |
| 73 | 73 | - 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. | ||
| 74 | 78 | ||
| 75 | 79 | You must define the ``url`` in each GitLab server section. | |
| 76 | 80 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments