coh3-stats
coh3-stats copied to clipboard
Improve the counter of the downloads of the desktop app
Currently we have page https://coh3stats.com/desktop-app which shows amount of downloads.
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:
- We need to have the latest release and properly set the download link
- 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.
- Keep in mind that we need to filter assets which are
If you have any questions feel free to ask.