Somsubhra / github-release-stats

Get the latest release stats of your project on Github
https://somsubhra.github.io/github-release-stats/
MIT License
536 stars 84 forks source link

Total downloads and pagination #51

Open audiamus opened 3 years ago

audiamus commented 3 years ago

With the recent introduction of pagination the "Total downloads" now appears to only accumulate the downloads of the releases in the currently displayed page.

Could you bring back the total across all releases, perhaps naming it "grand total"?

tooomm commented 3 years ago

I guess Total downloads should not change its name, but the value it's labelling should represent that.

If people think a value for "Accumulated downloads across all currently displayed releases on this page" is helpful, that should be an additional value on its own.

andreynering commented 3 years ago

I also miss that information.

But I think that bringing the total downloads back would probably cause a performance hit, and defeat the entire purpose of pagination. I think you'd need to fetch all releases from the API to sum that.

Unless there's an endpoint to fetch the total download with a single request, then the app could just use that. 🙂

kefir500 commented 3 years ago

For those who need the actual total number of downloads accumulated from all pages, I have created this web app. It is based on my Node.js library which iterates through the GitHub API pagination when calculating the total number of downloads.