Getting all GitHub users through github-api

前端 未结 4 1282
有刺的猬
有刺的猬 2021-02-07 20:24

The GitHub API documentation says that the url

https://api.github.com/users

will give all users in the order they signed up, but I only seem to get the first 135

4条回答
  •  被撕碎了的回忆
    2021-02-07 21:04

    If you check the response headers for that request Github provides pagination links under the header Links

    Link: ; rel="next", ; rel="first"
    

    I believe since their api v3 Github has been moving towards a hypermedia api.

    Github Hypermedia API

    EDIT

    This is beyond the scope of this question but its related. To learn more about hypermedia API and REST. Take a look at these slides by Steve Klabnik

    http://steveklabnik.github.com/hypermedia-presentation/#1

提交回复
热议问题