mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[PR #298] [CLOSED] First draft for write pagination #381
Labels
No labels
Stale
bug
discussion
enhancement
good first issue
good first issue
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rspotify#381
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ramsayleung/rspotify/pull/298
Author: @nick-lehmann
Created: 2/17/2022
Status: ❌ Closed
Base:
master← Head:master📝 Commits (1)
e715956First draft for write pagination📊 Changes
4 files changed (+272 additions, -13 deletions)
View changed files
📝
src/clients/oauth.rs(+37 -6)📝
src/clients/pagination/mod.rs(+1 -1)📝
src/clients/pagination/stream.rs(+21 -2)📝
tests/test_with_oauth.rs(+213 -4)📄 Description
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
asyncRust 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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.