Class AddTracksToPlaylistRequest
- java.lang.Object
-
- com.wrapper.spotify.requests.AbstractRequest<T>
-
- com.wrapper.spotify.requests.data.AbstractDataRequest<SnapshotResult>
-
- com.wrapper.spotify.requests.data.playlists.AddTracksToPlaylistRequest
-
- All Implemented Interfaces:
IRequest<SnapshotResult>
public class AddTracksToPlaylistRequest extends AbstractDataRequest<SnapshotResult>
Add one or more tracks to a user’s playlist.Use this endpoint to add Spotify tracks to a user’s playlist, sending their Spotify URI. Note that local tracks can’t be added.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAddTracksToPlaylistRequest.BuilderBuilder class for building anAddTracksToPlaylistRequest.
-
Method Summary
Modifier and Type Method Description SnapshotResultexecute()Add tracks to playlist.-
Methods inherited from class com.wrapper.spotify.requests.AbstractRequest
bodyParametersToJson, deleteJson, executeAsync, getBody, getBodyParameters, getContentType, getHeaders, getHttpManager, getJson, getUri, initializeBody, postJson, putJson
-
-
-
-
Method Detail
-
execute
public SnapshotResult execute() throws java.io.IOException, SpotifyWebApiException
Add tracks to playlist.- Returns:
- A playlist snapshot ID. The snapshot ID can be used to identify your playlist version in future requests.
- Throws:
java.io.IOException- In case of networking issues.SpotifyWebApiException- The Web API returned an error further specified in this exception's root cause.- See Also:
- Spotify: Version Control and Snapshots
-
-