Closed mhombach closed 3 years ago
This is actually already a thing on the rewrite. As for when that gets finished I cannot say. I've been increasingly busy over the last couple months and maintaining this repo is not a high priority.
@lolPants Would it be ok for you if I create a PR for the bulk endpoints? The tools used here (mongoose, typescript, koa) are well known to me and I would gladly help getting those 2 bulk endpoints shipped :)
I'm not accepting PRs until the rewrite is shipped.
Alright :)
Platform
This feature request concerns: (select all that apply)
Details
The famous and broadly used extension "beatlist" (playlists for beatsaber) is pulling the data from beatsaver-API but get's ratel-limited often because for each map the information needs to be retrieved seperately. It would be in favour of both systems (beatlist and beatsaver) if there would be bulk-endpoints for sending an array of keys/hashes.
Preferred Solution
There should be bulk-endpoints for retreiving the same type of information (details) for multiple songs. This will drastically lower the load on the database and all server-systems between the client and the database. For finale endpoint-definitions I suggest to communicate with the developer of beatlist (even though, this change is not only for beatlist, but will be used also by beatlist). I think those 2 endpoints
/maps/detail/:key
/maps/by-hash/:hash
are the primary targets for bulk operations. An request could contain an array of keys/hashes, either in the url, the body or header-fields. The response would have a array that could be looking like this:
If there are any questions or hesistations about this, feel free to comment and I'm happy to answer.
Here is the conversation about this problem on the beatlist-repo: https://github.com/Alaanor/beatlist/issues/76#issuecomment-751520178