mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #409] Is there a way to get a list of all the playlists a user is following? #242
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#242
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 @Peter-Schorn on GitHub (Jan 5, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/409
I see in the documentation that
user_playlist_is_followingcan be used to check if a user is following a given playlist, but this isn't what I'm looking for. How do I retrieve a list of all the playlists that a user is following? Did I miss this in the docs or does this feature not exist?@Peter-Schorn commented on GitHub (Jan 6, 2020):
I should also add that neither
user_playlistsnorcurrent_user_playlistsreturns playlists that the user is following; they only return playlists that the user created.@ritiek commented on GitHub (Jan 6, 2020):
You can fetch all playlists for a user and then check what all playlists are actually owned by that user. If a playlist isn't owned by that user that means the user is probably following this playlist:
EDIT: When someone follows some playlist, the playlist isn't made public by default. So, you'll need to request access to get user's private following playlists.
@Peter-Schorn commented on GitHub (Jan 6, 2020):
I've tried using
user_playlists(user)andcurrent_user_playlists. Both of these functions only returned playlists that I created. Also, I only have a total of 20 playlists, including both created and followed playlists, so it's not like the results are being paginated . Here's the relevant section of my code (you can find the full script here if you're interested). Maybe you can figure out why I'm only getting the playlists I created. Some of the playlists I'm following are created by Spotify, which I assume aren't private, and I'm not even getting those playlists. Also, I'm now aware that you can usewhile tracks['next']:for paginated results, but I haven't got around to changing that part yet.@Peter-Schorn commented on GitHub (Jan 6, 2020):
Could it be something to do with the scope I'm using?
@ritiek commented on GitHub (Jan 6, 2020):
That's what it seems like! Try using
playlist-read-privateas the scope.@Peter-Schorn commented on GitHub (Jan 6, 2020):
Could you do me a favor and give me a list of all the different scopes that can be used? I didn't find that on the docs.
@ritiek commented on GitHub (Jan 6, 2020):
Does it work for you with changing the scope as I mentioned in previous comment? The scope list can found at https://beta.developer.spotify.com/documentation/general/guides/scopes/.
@Peter-Schorn commented on GitHub (Jan 6, 2020):
When I used
playlist-read-privateit retrieved ALL of my playlists! Thanks!@stephanebruckert commented on GitHub (Jan 12, 2020):
Looks answered by @ritiek, thanks & closing!