-
Notifications
You must be signed in to change notification settings - Fork 152
Description
Hi!
While working with the Repositories API, I discovered that auto-pagination is already implemented under the hood. However, at first, I attempted to implement it manually because there is no documentation or example code indicating that it's alredy supported.
Additionally, the pagelen parameter is used for pagination in the Bitbucket API, but it's not obvious that users can set it directly via the Client struct (see here). Right now, only a few fields in the Client struct have descriptions, and I believe it would be helpful to:
- Add documentation/comments for the pagination-related parameters.
- Provide setter methods like
SetPagelen()andSetLimitPages()for improved clarity and usability. - Include an example in the README for performing paginated requests (with and without auto-pagination).
Moreover, although we have the DisableAutoPaging flag, it doesn't fully support custom pagination scenarios because some useful fields like next, previous, and size are not exposed in the response struct. For instance, I needed them while working with the ListForAccount method, but the Bitbucket API provides these fields in its response (example here). These are critical for manual pagination control.
I’d be glad to contribute by adding these missing fields, improving the parameter documentation, and possibly adding setters and examples - if you agree that this would be helpful.