Ben Lindsay
Ben Lindsay

Reputation: 1796

Get number of github downloads

I'm trying to figure out how to use the Github API to get the number of downloads of a release. I have a test repo called polymer-reptation under my username benlindsay with one tag, 1.0. A Github Developer page here says that to get the information on a single release I can use the command GET /repos/:owner/:repo/releases/:id. I can't figure out how to use that command though. I tried things like curl --user "benlindsay" https://api.github.com/repos/:benlindsay/:polymer-reptation/releases/:1.0 on the command line, the same thing without the colons, and typing similar things into hurl.it. They all just give me

{
  "message": "Not Found",       
  "documentation_url": "https://developer.github.com/v3"
}

at best. Can someone show me to how to use this feature of the API? (an easier way to track downloads would be helpful as well if one exists)

Upvotes: 0

Views: 605

Answers (1)

Rando Hinn
Rando Hinn

Reputation: 1322

You should use it without the colons, they are there to indicate stuff you should replace.

However, Listing all releases at https://api.github.com/repos/benlindsay/polymer-reptation/releases Returns an empty array... No releases My guess is the API hasn't caught up yet. If this doesn't resolve itself shortly, contact GitHub.

Upvotes: 1

Related Questions