How can I get more than 100 results from GitHub API v3 using “github_api” gem?

后端 未结 3 435
失恋的感觉
失恋的感觉 2020-12-18 06:17

I\'m using GitHub API Gem and trying to get statistics about contributors\'s additions, deletions, and commit counts. The problem is that I get only 100 results and can\'t g

3条回答
  •  轮回少年
    2020-12-18 07:07

    I tried many things and ended up with the underlying GitHub API HTTP methods. For example:

    curl https://api.github.com/repos/rails/rails/stats/contributors 
    

    Got nothing. So, I dropped an e-mail to GitHub Support. Here's the answer from Wynn Netherland:

    Thanks for getting in touch. That particular method doesn't support pagination, so we're effectively capping the contributors data to 100 as you've discovered. I can't promise if/when we'll be able to show more data on that one since it's sort of an expensive endpoint for us. Keep an eye on the API developer docs for updates.

    Thanks Wynn. So, GitHub Repo Statistics API isn't supporting pagination. There is no way to get contributors list with more than 100 results.

提交回复
热议问题