You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this awesome wrapper for the GitLab API and was wondering the other day, why there are projects missing when using gitlab.projects.list.
After some research I've seen, that GitLab uses a pagination via Link headers and was wondering how to set them.
Are you up for a PR, which allows the user to set a default per_page? (GitLabs default is 20)
Also how would you like the pagination? I see no way without breaking backward compatibility here, as you're passing the actual content array and not a "wrapper with meta-information" e.g.:
EDIT: I've found out so far, that I can use gitlab.projects.list({per_page: 30}), though it doesn't look that nice, especially when privateToken is in camel-case.
Also we don't get the feedback from headers whether there are more pages to request or not.
The text was updated successfully, but these errors were encountered:
Hej folks,
I'm using this awesome wrapper for the GitLab API and was wondering the other day, why there are projects missing when using
gitlab.projects.list
.After some research I've seen, that GitLab uses a pagination via Link headers and was wondering how to set them.
Are you up for a PR, which allows the user to set a default
per_page
? (GitLabs default is 20)Also how would you like the pagination? I see no way without breaking backward compatibility here, as you're passing the actual content array and not a "wrapper with meta-information" e.g.:
EDIT: I've found out so far, that I can use
gitlab.projects.list({per_page: 30})
, though it doesn't look that nice, especially whenprivateToken
is in camel-case.Also we don't get the feedback from headers whether there are more pages to request or not.
The text was updated successfully, but these errors were encountered: