coh3-stats icon indicating copy to clipboard operation
coh3-stats copied to clipboard

Improve the counter of the downloads of the desktop app

Open petrvecera opened this issue 1 year ago • 0 comments

Currently we have page https://coh3stats.com/desktop-app which shows amount of downloads.

image

However this counts only latest release from https://github.com/cohstats/coh3-stats-desktop-app/releases

We want to count downloads of all the latest releases. We are counting it here https://github.com/cohstats/coh3-stats/blob/master/pages/desktop-app.tsx#L91

The API link looks like this https://api.github.com/repos/cohstats/coh3-stats-desktop-app/releases In the code we use https://api.github.com/repos/cohstats/coh3-stats-desktop-app/releases/latest Which means that we might want to remove /latest from the code.

Now it will return array of objects instead of single object.

Implementation:

  1. We need to have the latest release and properly set the download link
  2. We want to count downloads from all the old assets too
    • Keep in mind that we need to filter assets which are .sig as we have in the code.

If you have any questions feel free to ask.

petrvecera avatar Oct 03 '23 14:10 petrvecera