Skip to content

Function GetPlaylistItems uses the wrong endpoint #293

@Lanver33

Description

@Lanver33

The name of this function is misleading since it uses the deprecated endpoint "playlists/%s/tracks"

func (c *Client) GetPlaylistItems(ctx context.Context, playlistID ID, opts ...RequestOption) (*PlaylistItemPage, error) {
	spotifyURL := fmt.Sprintf("%splaylists/%s/tracks", c.baseURL, playlistID)
        ...
}

Instead of the actual endpoint that the API expects "playlists/%s/items" https://developer.spotify.com/documentation/web-api/reference/get-playlists-items

func (c *Client) GetPlaylistItems(ctx context.Context, playlistID ID, opts ...RequestOption) (*PlaylistItemPage, error) {
	spotifyURL := fmt.Sprintf("%splaylists/%s/items", c.baseURL, playlistID)
        ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions