如何格式化对GitHub API的请求

我在格式化对github api的请求时遇到麻烦。 我尝试查看documentation并进行以下操作:

https://api.github.com/repos/facebook/react/commits/master?since=2019-01-01&until=2019-12-30

但这只会返回一个结果,而不是该年度的所有提交。我在python中使用了请求库,并且还在浏览器中尝试了本机。 任何帮助表示感谢,谢谢。

ww1610 回答:如何格式化对GitHub API的请求

您将Here is the documentation I'm trying to follow.GET /repos/:owner/:repo/commits/:ref一起使用

您需要Single Commit APIGET /repos/:owner/:repo/commits

List commits API

您可以使用sha参数指定分支。如果要使用默认分支,则可以忽略此字段:

https://api.github.com/repos/facebook/react/commits?since=2019-01-01&until=2019-12-30&sha=master

本文链接:https://www.f2er.com/3135566.html

大家都在问