The GitHub API provides functionality to get stared items sorted by created date. But, I can't find a possibility to get this date.
Only three date-type fields are present in the response:
created_at: '2013-06-13T21:10:36Z',
updated_at: '2013-06-18T07:45:56Z',
pushed_at: '2013-06-17T16:52:44Z',
create_at
here is always that date the repository created, not star. updated_at
does not give the right information either.
On the GitHub site, if you check your stars, data is sorted properly and the correct time span is rendered. But it looks like the API misses that information.
That gist clearly show, that data returned "sorted", but created_at
is wrong.
About stars You can star repositories and topics to discover similar projects on GitHub. When you star repositories or topics, GitHub may recommend related content on your personal dashboard. For more information, see "Finding ways to contribute to open source on GitHub" and "About your personal dashboard."
Particularly, GitHub users can star a repository, presumably to manifest interest or satisfaction with an open source project. However, the real and practical meaning of starring a project was never the subject of an in- depth and well-founded empirical investigation.
When you star a project you can keep track of it, but you won't be notified of every change. Think of starring a project on GitHub as a more casual way of watching, the equivalent of bookmarking it for later. To make it easier to do that, every repo now has a star button next to the familiar watch button.
This can be done in the GitHub API v3 by adding the header:
Accept: application/vnd.github.v3.star+json
see here:
https://developer.github.com/v3/activity/starring/#alternative-response-with-star-creation-timestamps-1
https://developer.github.com/v3/activity/starring/#alternative-response-with-star-creation-timestamps
There is absolutely no way to get this information from the API. Your best chance of getting it is going through events either on the repository or each user that has starred the repository and that could take tons of parsing because the events could be in the thousands. The number of API calls to do so would be immense.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With