Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get pages after 10 with Github API v3?

I want to do statistic analysis of a year with Github accounts.

With Events, I can get people's last 30 events (like push and star). API v3 provides paging with at most 10 pages, so I can get the latest 300 events.

But for an active user, 300 events may possibly lie in the same month. So how can I get the events this year (like total push count this year)? I don't have to know the detail of pushes, just the total count will do.

It seems this site can do the statistics of this year. But I haven't dive into the code to understand how to do it.

like image 391
Ovilia Avatar asked Nov 25 '13 12:11

Ovilia


1 Answers

The Events API currently exposes only the last 300 events; there's no way to get around that restriction. Hopefully, the API will provide a longer history of events in the future.

However, you might be interested in the (Unofficial) GitHub Archive project which tracks, stores and exposes events from the public GitHub timeline: http://www.githubarchive.org/. As the About page for the OSRC project confirms, they are also using this archive for collecting events.

like image 70
Ivan Zuzak Avatar answered Oct 05 '22 12:10

Ivan Zuzak