diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2017-11-01 17:07:30 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-11-01 17:07:30 +0100 |
commit | 38d446737f45ea54136d1f03f75fbddf46c45e00 (patch) | |
tree | c4ccbe765f075313d1f7dc1ef476f4f09f172ab1 /docs/api-usage.rst | |
parent | fba7730161c15be222a22b4618d79bb92a87ef1f (diff) | |
download | gitlab-38d446737f45ea54136d1f03f75fbddf46c45e00.tar.gz |
Pagination generators: expose more information
Expose the X-* pagination attributes returned by the Gitlab server when
requesting lists.
Closes #304
Diffstat (limited to 'docs/api-usage.rst')
-rw-r--r-- | docs/api-usage.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/api-usage.rst b/docs/api-usage.rst index c27ba25..ad188ce 100644 --- a/docs/api-usage.rst +++ b/docs/api-usage.rst @@ -225,6 +225,15 @@ handle the next calls to the API when required: for item in items: print(item.attributes) +The generator exposes extra listing information as received by the server: + +* ``current_page``: current page number (first page is 1) +* ``prev_page``: if ``None`` the current page is the first one +* ``next_page``: if ``None`` the current page is the last one +* ``per_page``: number of items per page +* ``total_pages``: total number of pages available +* ``total``: total number of items in the list + Sudo ==== |