ppy / osu-api

Public API for accessing osu! related data.
320 stars 16 forks source link

/get_beatmaps get "next 500" #274

Open varn88 opened 5 years ago

varn88 commented 5 years ago

Hey, after sending a request that would have more than 500 results I get the first 500, is there a way to send a new request to get the remainder of the results, instead of getting the first 500 again?

I started working on a little database for (mania) maps, which I could sort by number of favs, and pick up some good maps I don't yet have. But for this I'd have to get all beatmaps first.

It would be convenient if I could send a request to send me the hits from number 501-1000 next and so on. or if the batch of 500 results could be considered a 'page' and I could send a request to tell me how many hits or pages are there for my filter, and then request for the hits on page 'X'.

edit: rephrased the question to make it easier to understand

tybug commented 5 years ago

Use the since parameter - start at the earliest date, look at the latest date on the page of 500, and use that as your next since param. Loop until all beatmaps are retrieved.

Related: #193

varn88 commented 5 years ago

according to the wiki, since only returns ranked and loved maps, but my main target would be graveyarded hidden gems here