Bloggify / github-calendar

:bar_chart: Embed your GitHub calendar everywhere.
https://bloggify.github.io/github-calendar/example/
MIT License
1.22k stars 213 forks source link

✨ Add complete streak stats and fix #139 #145

Closed franznkemaka closed 1 year ago

franznkemaka commented 2 years ago

Hi @IonicaBizau,

I created a rest API that uses GitHub GraphQL to fetch all the user's calendars from their creation date. It computes the total contributions and the REAL longest streak + current streak.

For better performances, the API caches the result of previous years: because the 2012 calendar of a user is less likely to change in 2021.

More on the API here: https://github.com/franznkemaka/github-streak-api

Fixes: https://github.com/Bloggify/github-calendar/issues/139

So I implemented the API in the library. Have a look at it and let me know. It was well tested, here is an example:

Screenshot 2021-12-16 at 23 24 09
franznkemaka commented 1 year ago

both branches diverted