George K.
George K.

Reputation: 3151

GitHub API issue - listing starred repos

I'm trying to list all of the repos that I'm currently starring, and I do:

curl -u 'user' https://api.github.com/user/starred

And it only gives me a subset of the repos I'm starring, not all of them. I've don't know if this is an API issue, or a repo issue, but I can't seem to determine what the criteria is for GitHub returning only a part of my starred repos.

Help!

Upvotes: 10

Views: 2009

Answers (1)

Ivan Zuzak
Ivan Zuzak

Reputation: 18782

GitHub uses paging on their API results. See the response Link headers described in the API docs: http://developer.github.com/v3/#pagination and http://developer.github.com/v3/activity/starring/#list-repositories-being-starred

Anyway, to get the rest of the results, use https://api.github.com/users/:user/starred?page=X&per_page=Y, where X is the number of the page, and Y is the page size (max 100).

Upvotes: 24

Related Questions