Created
October 24, 2013 17:15
-
-
Save ameyms/7141289 to your computer and use it in GitHub Desktop.
Alternative go-github API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
watchers, pager, _, err := client.Activity.ListWatchers("o", "r") | |
if pager.HasNext() { | |
watchers, pager, _, err = pager.Next() | |
} | |
//.. | |
//or: | |
watchers, pager, _, err = pager.Last() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And to be clear, I have no problem with adding something to the library that makes working with paginated results a little easier. I just honestly don't know what else we can do than what we currently have.