-
Notifications
You must be signed in to change notification settings - Fork 10
Support pagination #58
Comments
Thanks for reporting an issue! 👍 I'm not pretty sure if I understood the issue correctly, but I believe go-travis already supported pagination and every "paginatable" method should have Please let me know if there are any misunderstandings! 😄 |
We may have to have pagination related struct to metadata.go since currently there are no ways people can access |
The options for the pages are there, but no way to check what the page details actually are. I wrote a pretty hacky workaround and put the pagination in the method, which really isn't ideal. Because unlike
What do you think ? I might try modifying the repositoryResponse |
I created a draft PR to see if it looks OK to you, it works with that method.
|
Thank you so much for your PR, and sorry for my tardy response... I'll check the PR, so give me a few |
It's only a draft at the moment, to make a PR out of it I'll need to do all the methods, if you think it works this way I'll do the rest of them. |
I added the pagination to all the responses that return arrays, but I'm not sure where in the travis docs it says which requests will return pagination. The only issue I have with the implementation now is that it's not possible to tell if Maybe changing the
Or maybe a method on
They all seem like crappy options, maybe just not exposing them is an option. |
Or maybe it's just a caveat of the API, |
After much annoying friends, I think as-is is fine and this is the example:
|
Not sure how to do this nicely, probably by wrapping
http.Response
like how it's done in thegoogle/go-github
library.I'd be willing to do a PR for it, but it's a fair bit of work if someone else has a better idea of how to do it.
google/go-github
example: https://github.com/google/go-github/blob/master/github/github.go#L381The text was updated successfully, but these errors were encountered: