Closed CounterPillow closed 6 months ago
Let's say I fetch offset 9800 in a Celeste category:
curl 'https://www.speedrun.com/api/v1/runs?category=7dgr144k&max=200&offset=9800'
This returns us, among other things:
"pagination": { "offset": 9800, "max": 200, "size": 200, "links": [ { "rel": "prev", "uri": "https://www.speedrun.com/api/v1/runs?category=7dgr144k&max=200&offset=9600" }, { "rel": "next", "uri": "https://www.speedrun.com/api/v1/runs?category=7dgr144k&max=200&offset=10000" } ] }
Note the next uri. So let's try to fetch that next uri!
next
$ curl 'https://www.speedrun.com/api/v1/runs?category=7dgr144k&max=200&offset=10000' {"status":400,"message":"Invalid pagination values.","links":[{"rel":"support","uri":"irc:\/\/speedrunslive.com#speedrun.com"},{"rel":"report-issues","uri":"https:\/\/github.com\/speedruncom\/api\/issues"}]}
Wow, thanks.
Is there some undocumented 10000 element limit for paginating? If so, why?
Nvm, should've searched for "10000", this is a duplicate of #125
Let's say I fetch offset 9800 in a Celeste category:
curl 'https://www.speedrun.com/api/v1/runs?category=7dgr144k&max=200&offset=9800'
This returns us, among other things:
Note the
next
uri. So let's try to fetch that next uri!Wow, thanks.
Is there some undocumented 10000 element limit for paginating? If so, why?