mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[GH-ISSUE #324] Update webapp example #103
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#103
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?
Originally created by @marioortizmanero on GitHub (Jun 11, 2022).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/324
Is your feature request related to a problem? Please describe.
The
webappexample could definitely be improved.Describe the solution you'd like
spotify.token = ..., we can surely avoid that).unwrapin my opinion.Describe alternatives you've considered
I've fixed a couple things in #305, but it was out of scope.
@ramsayleung commented on GitHub (Jun 13, 2022):
I totally agree with your point, the
webappexample is a little stale, we should refactor this example with the new API, to make it polished and robust.Except for this point:
I am not sure if we could be beneficial from switching to
Actix. Comparing the recent PR history ofRocketwithActix, I think there are roughly active.And we should start to refactor
webappexample after #305 merged, and honestly speaking, #305 goes a little far so that I need times to get involved in.@marioortizmanero commented on GitHub (Jun 13, 2022):
Fair enough. I was worried because v0.5.0 hasn't been released yet, but it does seem like the repo is active.
Sorry, I didn't quite understand that. What do you mean?
@ramsayleung commented on GitHub (Jun 13, 2022):
Never mind, I just think the work of refactoring the
webappexample should wait until #305 get merged.@graves501 commented on GitHub (Sep 15, 2022):
Since #305 already got merged, I guess the
webappis ready for some polish?I tried out the
webappexample and I noticed that I am not able to fetch the top artists...top_artistsis always empty. I'm still new to Rust and especially new to this library. So I guess I'm missing something? Or is that a general issue?@ramsayleung commented on GitHub (Sep 16, 2022):
Probably you could reproduce this problem with Spotify's Web Console, I guess it's something wrong with your data, e.g. your top artists.
https://developer.spotify.com/console/get-current-user-top-artists-and-tracks/
@graves501 commented on GitHub (Sep 19, 2022):
Thanks for the hint! I successfully tried out the developer console, so my data seems to be fine.
I also tried
spotify.current_user_top_artists(Some(&TimeRange::MediumTerm))but thetop_artistswould still be empty. Another thing I tried is to use release version0.11.0ofrspotify, but that also didn't salvage the problem.@ramsayleung commented on GitHub (Sep 20, 2022):
I can reproduce this issue, the problem is that the default scopes in example are
"user-read-currently-playing", "playlist-modify-private", the required scopes to get user's top artists areuser-top-read.https://github.com/ramsayleung/rspotify/blob/master/examples/webapp/src/main.rs#L90
You should add
user-top-readto the scopes:it works for me now.
@graves501 commented on GitHub (Sep 21, 2022):
Thanks for pointing out the scope issue! It works for me now!
@marioortizmanero commented on GitHub (Nov 8, 2022):
Yeah, I guess that @graves501 ran into that issue because we:
ResultintoOptionwithResult::okNoneentries withfilter_mapThis is something we could improve as well; otherwise we are ignoring possibly important errors.
@github-actions[bot] commented on GitHub (Jun 26, 2023):
Message to comment on stale issues. If none provided, will not mark issues stale