[GH-ISSUE #479] Update the examples #159

Open
opened 2026-02-27 20:23:28 +03:00 by kerem · 5 comments
Owner

Originally created by @0xbrayo on GitHub (Apr 24, 2024).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/479

So many of the examples provided are broken now. Please update, there are so many breaking changes that are not addressed.

Originally created by @0xbrayo on GitHub (Apr 24, 2024). Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/479 So many of the examples provided are broken now. Please update, there are so many breaking changes that are not addressed.
Author
Owner

@masakk1 commented on GitHub (Jun 17, 2024):

I second this.
I'm trying to use the pagination_sync example and it's broken.

<!-- gh-comment-id:2174249176 --> @masakk1 commented on GitHub (Jun 17, 2024): I second this. I'm trying to use the pagination_sync example and it's broken.
Author
Owner

@MaximoMachado commented on GitHub (Jun 19, 2024):

What is the error you're encountering with pagination_sync? I ran it myself locally and it worked as expected. Give this command a try: cargo run --example pagination_sync --features="env-file cli client-ureq ureq-rustls-tls" --no-default-features

Also can you give a list of the other examples you're finding are broken?

<!-- gh-comment-id:2178155200 --> @MaximoMachado commented on GitHub (Jun 19, 2024): What is the error you're encountering with pagination_sync? I ran it myself locally and it worked as expected. Give this command a try: `cargo run --example pagination_sync --features="env-file cli client-ureq ureq-rustls-tls" --no-default-features` Also can you give a list of the other examples you're finding are broken?
Author
Owner

@Jonsen94 commented on GitHub (Jul 24, 2024):

Just tested "auth_code".

It uses the wrong scope. "user-read-currently-playing" would be correct and works fine.

<!-- gh-comment-id:2248809789 --> @Jonsen94 commented on GitHub (Jul 24, 2024): Just tested "auth_code". It uses the wrong scope. "user-read-currently-playing" would be correct and works fine.
Author
Owner

@ramsayleung commented on GitHub (Jul 26, 2024):

I don't fully understand the description:

"auth_code" uses the wrong scope, "user-read-currently-playing" would be correct and works fine.

The auth_code example is using exactly the user-read-currently-playing scope:

github.com/ramsayleung/rspotify@eb1260c24a/examples/auth_code.rs (L36)

<!-- gh-comment-id:2252020189 --> @ramsayleung commented on GitHub (Jul 26, 2024): I don't fully understand the description: > "auth_code" uses the wrong scope, "user-read-currently-playing" would be correct and works fine. The `auth_code` example is using exactly the `user-read-currently-playing` scope: https://github.com/ramsayleung/rspotify/blob/eb1260c24a74e8d3ce97cd3a6222da7b1d1989c3/examples/auth_code.rs#L36
Author
Owner

@Jonsen94 commented on GitHub (Jul 26, 2024):

Yes, sorry, you are right. The code I refer to is from the comment above it (which I used for the custom callback url):

// Same for RSPOTIFY_REDIRECT_URI. You can also set it explictly:
//
// // let oauth = OAuth { // redirect_uri: "http://localhost:8888/callback".to_string(), // scopes: scopes!("user-read-recently-played"), // ..Default::default(), // }; //

Sorry for the confusion.

<!-- gh-comment-id:2252241411 --> @Jonsen94 commented on GitHub (Jul 26, 2024): Yes, sorry, you are right. The code I refer to is from the comment above it (which I used for the custom callback url): [ // Same for RSPOTIFY_REDIRECT_URI. You can also set it explictly: // // ``` // let oauth = OAuth { // redirect_uri: "http://localhost:8888/callback".to_string(), // scopes: scopes!("user-read-recently-played"), // ..Default::default(), // }; // ```](https://github.com/ramsayleung/rspotify/blob/eb1260c24a74e8d3ce97cd3a6222da7b1d1989c3/examples/auth_code.rs#L27C1-L35C11) Sorry for the confusion.
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#159
No description provided.