Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add a new API: AddItemsToPlaylist #181

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kerkerj
Copy link

@kerkerj kerkerj commented Jan 3, 2022

For adapting both tracks/episodes when adding items to a user's playlist.
This resolves: #180

Spotify API reference: https://developer.spotify.com/documentation/web-api/reference/#/operations/add-tracks-to-playlist

@strideynet strideynet added this to the V3 milestone Jun 26, 2022
func (c *Client) AddItemsToPlaylist(ctx context.Context, playlistID ID, position int, items ...URI) (snapshotID string, err error) {
m := make(map[string]interface{})
m["uris"] = items
m["position"] = position
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it impossible for users to fall back to the behaviour of appending items to the playlist when the position value is not provided - we should make this a functional option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AddTracksToPlaylist could not accept adding episodes of podcasts
2 participants