Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keyset pagination #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

royce55
Copy link
Contributor

@royce55 royce55 commented May 15, 2024

Keyset pagination was added to Gitlab a while ago and as of
Gitlab v17.0 'users' endpoint only uses keyset pagination.

This adds support for keyset pagination.

As keyset pagination returns the next page as a link in the in the HTTP response header. RESTClient.pm was changed to return http headers when called in list mode.

Paginator.pm checks for the pagination='keyset' parameter or 'users' method and passes keyset parameters to GitLab API method calls. It then parses the response header for the Link header, pulling out the returned URL parameters. Storing them for the next call to next_page.

as of Gitlab v17.0 'users' endpoint only uses keyset pagination.

This adds support for keyset pagination.

As keyset pagination returns the next page as a link in the
in the HTTP response header. RESTClient.pm was changed to return
http headers when called in list mode.

Paginator.pm checks for the pagination='keyset' parameter or 'users'
method and passes keyset parameters to GitLab API method calls.
It then parses the response header for the Link header, pulling
out the returned URL parameters. Storing them for the next call to
next_page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant