github-release-stats icon indicating copy to clipboard operation
github-release-stats copied to clipboard

Total downloads and pagination

Open audiamus opened this issue 4 years ago • 3 comments

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"?

audiamus avatar Nov 16 '20 08:11 audiamus

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.

tooomm avatar Nov 16 '20 11:11 tooomm

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. 🙂

andreynering avatar Jan 21 '21 16:01 andreynering

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.

kefir500 avatar Jul 16 '21 20:07 kefir500