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

Paginated Results for Commits #44

Open
bry4n opened this issue Jan 22, 2010 · 2 comments
Open

Paginated Results for Commits #44

bry4n opened this issue Jan 22, 2010 · 2 comments

Comments

@bry4n
Copy link

bry4n commented Jan 22, 2010

It seems like Commit API v2 supports pagination.

See:

curl "http://github.com/api/v2/json/commits/list/mojombo/grit/master?page=3"

It would be nice if we can use something like this way or other way:

repo = Repository.find(:user => "fcoury", :name => "octopi", :page => 3)
@radar
Copy link
Collaborator

radar commented Mar 26, 2011

Hey, sorry about the lag. If you're still interested in having this feature in, I'd be more than happy to review a patch.

@jamieforrest
Copy link

You can accomplish this by calling, for instance:

commits = repo.commits('master?page=2')

Or whatever branch name you want instead of master. But it would be nice to have the Commit.find_all method work as an iterator that returned the pages as you needed them (as mentioned here #19)

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

No branches or pull requests

3 participants