在Github上跟踪发布(二进制文件)的下载数量 [英] Track number of download of a release (binaries) on Github
问题描述
我一直在寻找Github界面,我还没有看到下载跟踪器。这是Google代码提供的功能,我想知道Github是否也有相同的功能。 请注意,我不知道回购下载的次数,这是一个不同的主题。 解决方案
您可以使用GitHub API获取 download_count
以及其他内容: http://developer.github。 com / v3 / repos / releases /#获得单一版本资产
这是目前的样子,但请检查上面的链接
GET / repos /:owner /:repo / releases / assets / :id
{
url:https: //api.github.com/repos/octocat/Hello-World/releases/assets/1,
id:1,
name:example.zip,
标签:
state:已上传,
content_type:application / zip,
size:1024,
download_count:42 ,
created_at:2013-02-27T19:35:32Z,
updated_at:2013-02-27T19:35:32Z
}
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 haven't seen a download tracker. This is a feature Google Code offer and I was wondering if Github has the same.
Please note, I am not interested to know the number of download of a repo, this is a different topic.
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"
}
这篇关于在Github上跟踪发布(二进制文件)的下载数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!