[PR #156] [CLOSED] Add support for public playlists #798

Closed
opened 2026-02-28 00:01:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/156
Author: @cmcnutt1
Created: 1/16/2017
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • 3a173f3 Add support for public playlists

📊 Changes

1 file changed (+12 additions, -0 deletions)

View changed files

📝 spotipy/client.py (+12 -0)

📄 Description

Allow the ability to get information from a public playlist. In order to do this, you must have the User ID of the playlist owner, and the playlist ID (both of these can be found in the playlist URL).

This is achieved through the added public_playlist function. Usage example, where sp is the spotipy.Spotify object :

playlist = sp.public_playlist(EXAMPLE_USER_ID, EXAMPLE_PLAYLIST_ID)
playlistTracks = playlist['tracks']['items']
for item in playlistTracks:
    print(item['track']['id'])

Example above will print the track ID for every song in that playlist


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/spotipy-dev/spotipy/pull/156 **Author:** [@cmcnutt1](https://github.com/cmcnutt1) **Created:** 1/16/2017 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`3a173f3`](https://github.com/spotipy-dev/spotipy/commit/3a173f377ef32b9ec1ee4a29915940c96bd5c482) Add support for public playlists ### 📊 Changes **1 file changed** (+12 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `spotipy/client.py` (+12 -0) </details> ### 📄 Description Allow the ability to get information from a public playlist. In order to do this, you must have the User ID of the playlist owner, and the playlist ID (both of these can be found in the playlist URL). This is achieved through the added public_playlist function. Usage example, where sp is the spotipy.Spotify object : ``` playlist = sp.public_playlist(EXAMPLE_USER_ID, EXAMPLE_PLAYLIST_ID) playlistTracks = playlist['tracks']['items'] for item in playlistTracks: print(item['track']['id']) ``` Example above will print the track ID for every song in that playlist --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:01:47 +03:00
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/spotipy#798
No description provided.