Track number of download of a release (binaries) on Github

前端 未结 3 1994
别跟我提以往
别跟我提以往 2021-02-07 08:56

So now you can manage and publish your binaries directly on Github, the feature is back from early this month (source).

I\'ve been looking around Github interface and I

3条回答
  •  抹茶落季
    2021-02-07 09:42

    You can use the GitHub API to get the download_count among other things for a single release asset:

    http://developer.github.com/v3/repos/releases/#get-a-single-release-asset

    This is how it looks currently, but please check the link above just in case anything changed since this answer was written.

    GET /repos/:owner/:repo/releases/assets/:id

    { "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1", "id": 1, "name": "example.zip", "label": "short description", "state": "uploaded", "content_type": "application/zip", "size": 1024, "download_count": 42, "created_at": "2013-02-27T19:35:32Z", "updated_at": "2013-02-27T19:35:32Z" }

提交回复
热议问题