Monday, January 29, 2018

Getting the download count for GitHub release binaries

Now that I'm using GitHub release management for SprintDLL, I'm curious about how many people are downloading it. I don't know of a nice GUI way to figure that out, but the GitHub API exposes it. It, along with a lot of other information about the repository's releases, is accessible via a simple GET request, so it can be seen in a normal web browser:

https://api.github.com/repos/Fleex255/SprintDLL/releases

The relevant part is the download_count property of the objects in the assets array of a release object. Using the release ID, the query can be refined a bit to include only the asset information from that release:

https://api.github.com/repos/Fleex255/SprintDLL/releases/9410477/assets

No comments:

Post a Comment