oknozor / musicbrainz_rs

A wrapper around the musicbrainz API
MIT License
38 stars 18 forks source link

Support for browse pagination? #78

Closed scrogson closed 1 year ago

scrogson commented 1 year ago

I'm attempting to use this library to page through the browse API, but I don't see anything which supports this built in. Am I missing something?

https://beta.musicbrainz.org/doc/MusicBrainz_API#Browse

Paging Browse requests are the only requests which support paging: any browse request supports an 'offset=' argument to get more results. Browse requests also support 'limit=': the default limit is 25, and you can increase that up to 100.

Special note for releases: To ensure requests can complete without timing out, we limit the number of releases returned such that the entire list contains no more than 500 tracks. (However, at least one full release is always returned, even if it has more than 500 tracks; we don't return "partial" releases.) This means that you may not get 100 releases per page if you set limit=100; in fact the number will vary per page depending on the size of the releases. In order to page through the results properly, increment offset by the number of releases you get from each response, rather than the (larger, fixed) limit size.

oknozor commented 1 year ago

Hello @scrogson, pagination is not implemented. I don't have time to work on this currently but PR's are welcome

scrogson commented 1 year ago

Thanks for the response. I've been evaluating MusicBrainz for a project but I think I've decided to use something else.