mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #338] How can I get the name of a playlist? #197
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#197
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 @xmztools on GitHub (Nov 8, 2018).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/338
I'm trying to get tracks from a playlist using
user_playlist()(oruser_playlist_tracks()) but I also want to get the name of the playlist. As far as I can tell there doesn't seem to be a name for the playlist anywhere in the returned JSON however. So I'm just wondering where I can get the name of a playlist (if all I have is the Spotify URI)? Is there another function I can use?When looking at the Spotify API, I noticed this function in the docs returns a playlist object that has a lot of information (like name, description, href, etc.) that doesn't seem to be included in
user_playlist():https://developer.spotify.com/documentation/web-api/reference/playlists/get-playlist/
Is there a way to get this using Spotipy?
@ritiek commented on GitHub (Nov 8, 2018):
You need to pass
nameinfieldskeyword argument and then you fetch the value ofnamekey from the response. For example to fetch this playlist:https://open.spotify.com/playlist/3cqDkXVInhOYPpJyVzvwux
This example contains some example stuff (if not all) that can go into
fieldsargument to fetch additional info about a playlist.@xmztools commented on GitHub (Nov 10, 2018):
Thank you! :)