| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7843ace commit 99b4484
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -204,6 +204,11 @@ listing methods support the ``page`` and ``per_page`` parameters: | |||
| 204 | 204 | By default GitLab does not return the complete list of items. Use the ``all`` | |
| 205 | 205 | parameter to get all the items when using listing methods: | |
| 206 | 206 | ||
| 207 | + .. warning:: | ||
| 208 | + | ||
| 209 | + The all=True option uses keyset pagination by default, if order_by="id" | ||
| 210 | + or if order_by is not supplied. | ||
| 211 | + | ||
| 207 | 212 | .. code-block:: python | |
| 208 | 213 | ||
| 209 | 214 | all_groups = gl.groups.list(all=True) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -640,6 +640,12 @@ def http_list(self, path, query_data=None, as_list=None, **kwargs): | |||
| 640 | 640 | get_all = kwargs.pop("all", False) | |
| 641 | 641 | url = self._build_url(path) | |
| 642 | 642 | ||
| 643 | + # use keyset pagination automatically, if all=True | ||
| 644 | + order_by = kwargs.get("order_by") | ||
| 645 | + if get_all and (not order_by or order_by == "id"): | ||
| 646 | + kwargs["pagination"] = "keyset" | ||
| 647 | + kwargs["order_by"] = "id" | ||
| 648 | + | ||
| 643 | 649 | if get_all is True and as_list is True: | |
| 644 | 650 | return list(GitlabList(self, url, query_data, **kwargs)) | |
| 645 | 651 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments