diff options
author | Max Wittig <max.wittig95@gmail.com> | 2020-01-26 17:33:53 +0100 |
---|---|---|
committer | Max Wittig <max.wittig95@gmail.com> | 2020-01-26 17:35:18 +0100 |
commit | d1879253dae93e182710fe22b0a6452296e2b532 (patch) | |
tree | 70a2f9eb46f50fd59a55118708d1e34d660333b7 /gitlab/__init__.py | |
parent | 0b71ba4d2965658389b705c1bb0d83d1ff2ee8f2 (diff) | |
download | gitlab-feat/keyset-pagination.tar.gz |
feat: add global order_by option to ease paginationfeat/keyset-pagination
Diffstat (limited to 'gitlab/__init__.py')
-rw-r--r-- | gitlab/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py index 166e00f..85fc5e0 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -70,6 +70,7 @@ class Gitlab(object): http_password (str): Password for HTTP authentication api_version (str): Gitlab API version to use (support for 4 only) pagination (str): Can be set to 'keyset' to use keyset pagination + order_by (str): Set order_by globally """ def __init__( @@ -86,6 +87,7 @@ class Gitlab(object): session=None, per_page=None, pagination=None, + order_by=None, ): self._api_version = str(api_version) @@ -112,6 +114,7 @@ class Gitlab(object): self.per_page = per_page self.pagination = pagination + self.order_by = order_by objects = importlib.import_module("gitlab.v%s.objects" % self._api_version) self._objects = objects @@ -204,6 +207,7 @@ class Gitlab(object): api_version=config.api_version, per_page=config.per_page, pagination=config.pagination, + order_by=config.order_by, ) def auth(self): |