Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional cursors #303

Merged
merged 5 commits into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- ([#296](https://github.com/ramsayleung/rspotify/pull/296)) The `Avr` variant in `DeviceType` is actually case insensitive.
- ([#302](https://github.com/ramsayleung/rspotify/pull/302)) Added undocumented `label` field to `FullAlbum`.

**Breaking changes:**
- ([#303](https://github.com/ramsayleung/rspotify/pull/303)) The `cursors` field in `CursorBasedPage` is now optional.

## 0.11.3 (2021.11.29)

- ([#281](https://github.com/ramsayleung/rspotify/issues/281)) The documentation website for the Spotify API has been changed, so the links in the `rspotify` crate have been updated. Unfortunately, the object model section has been removed, so we've had to delete most reference links in `rspotify-model`. From now on, you should refer to the endpoints where they are used to see their definition.
Expand Down
2 changes: 1 addition & 1 deletion rspotify-model/src/page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct CursorBasedPage<T> {
pub items: Vec<T>,
pub limit: u32,
pub next: Option<String>,
pub cursors: Cursor,
pub cursors: Option<Cursor>,
/// Absent if it has read all data items. This field doesn't match what
/// Spotify document says
pub total: Option<u32>,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_with_credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async fn test_fake_playlist() {
.await
.playlist(&playlist_id, None, None)
.await;
assert!(!playlist.is_ok());
assert!(playlist.is_err());
}

mod test_pagination {
Expand Down
4 changes: 1 addition & 3 deletions tests/test_with_oauth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,7 @@ async fn test_current_user_saved_albums() {
.map(|a| a.album.id)
.collect::<Vec<_>>();
assert!(
album_ids
.iter()
.all(|item| all_uris.contains(&(*item).to_owned())),
album_ids.iter().all(|item| all_uris.contains(item)),
"couldn't find the new saved albums"
);

Expand Down