You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importrequestsurl="https://api.github.com/repos/Octopuppy/Octodog"r=requests.get(url).json()
print"Octodog repo has been stared by %d times, watched by %d times, and forked by %d times."% (r["stargazers_count"], r["watchers_count"], r["forks_count"])
输出为:
Octodog repo has been stared by 8 times, watched by 8 times, and forked by 1 times.
我先抛砖引玉~
https://api.github.com
开头, 后面以一定格式跟上你想获取的用户名, 仓库名, 以及你想获取的参数.获取 commit 数
_这个结果只给出了 master 分支的 commit 数, 并没有考虑 pull requests 的数目, 这个数目与 pulse 页面给出的数目相同. 我理想的数据就是 pulse 页面柱状图中的commit 数.(_待解决*)
获取(首页显示的)commit 数
获取仓库的 star/watch/fork 数目
其他
The text was updated successfully, but these errors were encountered: