By making requests to /users/:username/repos
you get the list of repositories for the specified user but they contain the important fields. This is called Summary Representation.
Stars
The list of repositories contain repository objects containing the stargazers_count
which is the number of stars.
Commits count
Get the contributors and sum the commit counts, like described in this answer.
Releases
Use the /repos/:owner/:repo/releases
endpoint:
GET /repos/:owner/:repo/releases?per_page=1
Status: 200 OK
Link: <https://api.github.com/resource?page=2>; rel="next",
<https://api.github.com/resource?page=5>; rel="last"
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
You can use rel="last"
from the the Link
header to get the releases count (in this example 5
).
By using per_page=1
we limit the number of objects per page to one, so we can just get then the number of pages and know it's the same with the number of releases.