我希望获得在Spring框架中具有oauth实现的GitHub存储库的总数。我可以使用这个查询https://api.github.com/search/repositories?q=oauth+spring+language:java&order=asc&per_page=100,它返回我正在寻找的GitHub存储库,每页100个存储库。
但是GitHub API最多可以返回1000个存储库。因此,当我使用查询转到第11页时,https://api.github.com/search/repositories?q=oauth+spring+language:java&order=asc&per_page=100&page=11 GitHub API返回以下内容
{ "message": "Only the first 1000 search results are available", "documentation_url": "https://developer.github.com/v3/search/" }
有人能给出任何搜索查询吗?这会给我提供在Spring框架中有oauth实现的GitHub存储库的数量吗?
提前谢谢。
发布于 2020-04-15 13:42:09
第一个响应上的total_count字段将显示存储库匹配的总数。对于您的示例,我看到了3530结果:
{
"total_count": 3530,
"incomplete_results": false,
"items": [
// items in here
]
}https://stackoverflow.com/questions/61212929
复制相似问题