[PR #298] [CLOSED] First draft for write pagination #381

Closed
opened 2026-02-27 20:24:30 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/298
Author: @nick-lehmann
Created: 2/17/2022
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • e715956 First 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 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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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.

## 📋 Pull Request Information **Original PR:** https://github.com/ramsayleung/rspotify/pull/298 **Author:** [@nick-lehmann](https://github.com/nick-lehmann) **Created:** 2/17/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`e715956`](https://github.com/ramsayleung/rspotify/commit/e715956392ce94f19e7b57134851fbfa0399270f) First draft for write pagination ### 📊 Changes **4 files changed** (+272 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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 `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. - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:24:30 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rspotify#381
No description provided.