An open API service indexing awesome lists of open source software.

https://github.com/akhileshthite/github-release-download-stats

A simple JavaScript script that fetches and displays the total and latest download counts for all releases of a specified GitHub repository.
https://github.com/akhileshthite/github-release-download-stats

github-releases github-stats

Last synced: 11 months ago
JSON representation

A simple JavaScript script that fetches and displays the total and latest download counts for all releases of a specified GitHub repository.

Awesome Lists containing this project

README

          

# github-release-download-stats

![demo](./demo.png)

Include `script.js` or copy the `getDownloadCounts` function into your code.

```javascript
// Call the function with desired parameters
getDownloadCounts('ipfs', 'ipfs-desktop')
.then((counts) => {
// Use the counts in your application
document.getElementById('totalDownloads').textContent = counts.total;
document.getElementById('latestDownloads').textContent = counts.latest;
document.getElementById('latestTag').textContent = counts.latestTag;
})
.catch((error) => {
// Handle errors
console.error('Error fetching download counts:', error);
});
```