ppy / osu-web

the browser-facing portion of osu!
https://osu.ppy.sh
GNU Affero General Public License v3.0
970 stars 381 forks source link

limit -1 for delivering all results #7853

Closed MrFastDie closed 3 years ago

MrFastDie commented 3 years ago

Today I tried to implement a status bot thats sending me push notifications through Discord when a specific user uploads a new map, one goes to the graveyard etc. For that I'm using the endpoint /users/{user}/beatmapsets/{type} which basically works. The main problem I have with this is that I have no clue of how many maps the user owns. So setting a specific limit is kinda hard. I cant really paginate without indexing every page first because I dont have a total number somewhere. For that I would like to be able to increase the limit to retreive every map of that specific type.

Furthermore it would be great to retreiving multiple types in one request, but that might be another issue.

kj415j45 commented 3 years ago

Try to use User Recent Activity (API v2) endpoint instead.

peppy commented 3 years ago

Results are intentionally paginated. As per https://github.com/ppy/osu-web/issues/7853#issuecomment-877910728, your use case should not be using the endpoint you are attempting to.