当我从 github 用户中获取用户时,有没有办法限制为 100 个用户?
Is there a way to Limit to 100 users when I get users form github users?
我正在改装:
我想知道如何限制 100 个用户?
可以使用per_page
参数:
https://api.github.com/users?per_page=100
然后检查 Link
headers 响应并检查 rel="next"
link,它应该包含您设置最后一个的 since
参数您在上次通话中获得的 ID:
https://api.github.com/users?per_page=100&since=135
尽管 100 似乎是它所说的默认值:
You can specify how many items to receive (up to a maximum of 100);
我正在改装:
我想知道如何限制 100 个用户?
可以使用per_page
参数:
https://api.github.com/users?per_page=100
然后检查 Link
headers 响应并检查 rel="next"
link,它应该包含您设置最后一个的 since
参数您在上次通话中获得的 ID:
https://api.github.com/users?per_page=100&since=135
尽管 100 似乎是它所说的默认值:
You can specify how many items to receive (up to a maximum of 100);