Javascript GitHub:如何避免在搜索帐户时超过搜索限制';s为某个存储库贡献的用户的详细信息?
假设我需要列出每个用户对某个存储库做出贡献的追随者数量(使用JavaScript) 首先,我用这个:Javascript GitHub:如何避免在搜索帐户时超过搜索限制';s为某个存储库贡献的用户的详细信息?,javascript,json,ajax,github,filter,Javascript,Json,Ajax,Github,Filter,假设我需要列出每个用户对某个存储库做出贡献的追随者数量(使用JavaScript) 首先,我用这个: $.ajax({ headers: { Authorization: "Basic " + auth }, type: 'GET', url: 'https://api.github.com/repos/[reponame]/angular/contributors', dataType: 'json',
$.ajax({
headers: { Authorization: "Basic " + auth },
type: 'GET',
url: 'https://api.github.com/repos/[reponame]/angular/contributors',
dataType: 'json',
success: function (data) {
repositories = data;
outputPageContent();
}
});
我得到了用户的JSON列表,但是没有关于每个用户的追随者数量的信息。我想我应该单独(在一个循环中)请求它,使用“url”,如:
但这样一来,我马上就超过了搜索限制(注册用户每分钟最多30次)
你知道怎么解决这个问题吗?也许是嵌套的请求
我还有一些其他问题:
但你每分钟只能提出30个请求?那不是每小时30*60=1800个请求吗 这样的查询可以使用。试一下这个
最后是xd。非常感谢。
query {
repository (name: "angular", owner: "angular") {
assignableUsers (first: 100) {
edges {
node {
id
login
followers {
totalCount
}
}
}
}
}
}