Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add a method to paginate write requests to the Spotify API. Fixes #296.
This is currently a draft. I'm still quite new to Rust and struggle with
async
Rust code. At the moment, the changes do not work and I'm looking for some feedback by someone more experienced than me.Motivation and Context
Spotify imposes a limit on items not only for reading endpoints but also for endpoints that create data. Currently, the api client will simply fail in case the given items exceed the limit. This PR adds pagination for methods like
playlist_add_items
.Dependencies
None
Type of change
Please delete options that are not relevant.
How has this been tested?
Adapted integration tests to check that data is successfully created even if the items exceeds the limits of the Spotify API.
Is this change properly documented?
Not yet. Will do that as soon as the feature is complete.