Interface PlaylistTracksSpotifyService
-
public interface PlaylistTracksSpotifyService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description retrofit2.Call<SnapshotId>addTracksToPlaylist(String playlistId, PlaylistTracksToAdd tracksToAdd)Add tracks to a playlistretrofit2.Call<SnapshotId>addTracksToPlaylist(String playlistId, PlaylistTracksToAddWithPosition tracksToAddWithPosition)Add tracks to a playlistretrofit2.Call<SnapshotId>addTracksToPlaylist(String playlistId, Map<String,Object> queryParameters)Add tracks to a playlistretrofit2.Call<Pager<PlaylistTrack>>getPlaylistTracks(String playlistId)Get full details of the tracks of a playlist owned by a Spotify user.retrofit2.Call<Pager<PlaylistTrack>>getPlaylistTracks(String playlistId, Map<String,Object> options)Get full details of the tracks of a playlist owned by a Spotify user.retrofit2.Call<SnapshotId>removeTracksFromPlaylist(String playlistId, PlaylistTracksToRemove tracksToRemove)Remove one or more tracks from a user’s playlist.retrofit2.Call<SnapshotId>removeTracksFromPlaylist(String playlistId, PlaylistTracksToRemoveWithPosition tracksToRemoveWithPosition)Remove one or more tracks from a user’s playlist.retrofit2.Call<SnapshotId>reorderPlaylistTracks(String playlistId, Map<String,Object> body)Reorder a Playlist's tracksretrofit2.Call<Result>replaceTracksInPlaylist(String playlistId, PlaylistTracksToReplace newTracksToSet)Replace all the tracks in a playlist, overwriting its existing tracks.retrofit2.Call<Result>replaceTracksInPlaylist(String playlistId, String trackUris)Replace all the tracks in a playlist, overwriting its existing tracks.
-
-
-
Method Detail
-
addTracksToPlaylist
@POST("playlists/{playlist_id}/tracks") retrofit2.Call<SnapshotId> addTracksToPlaylist(@Path("playlist_id") String playlistId, @QueryMap Map<String,Object> queryParameters)Add tracks to a playlist- Parameters:
playlistId- The playlist's IDqueryParameters- Query parameters- Returns:
- A snapshot ID (the version of the playlist)
- See Also:
- Add Tracks to a Playlist
-
addTracksToPlaylist
@POST("playlists/{playlist_id}/tracks") retrofit2.Call<SnapshotId> addTracksToPlaylist(@Path("playlist_id") String playlistId, @Body PlaylistTracksToAdd tracksToAdd)Add tracks to a playlist- Parameters:
playlistId- The playlist's IDtracksToAdd- The tracks to add as list of track uris. A maximum of 100 tracks can be added in one request.- Returns:
- A snapshot ID (the version of the playlist)
- See Also:
- Add Tracks to a Playlist
-
addTracksToPlaylist
@POST("playlists/{playlist_id}/tracks") retrofit2.Call<SnapshotId> addTracksToPlaylist(@Path("playlist_id") String playlistId, @Body PlaylistTracksToAddWithPosition tracksToAddWithPosition)Add tracks to a playlist- Parameters:
playlistId- The playlist's IDtracksToAddWithPosition- The tracks to add as list of track uris and the position to add the track. A maximum of 100 tracks can be added in one request.- Returns:
- A snapshot ID (the version of the playlist)
- See Also:
- Add Tracks to a Playlist
-
getPlaylistTracks
@GET("playlists/{playlist_id}/tracks") retrofit2.Call<Pager<PlaylistTrack>> getPlaylistTracks(@Path("playlist_id") String playlistId)Get full details of the tracks of a playlist owned by a Spotify user.- Parameters:
playlistId- The Spotify ID for the playlist.- Returns:
- List of playlist's tracks wrapped in a
Pagerobject - See Also:
- Get a Playlist’s Tracks
-
getPlaylistTracks
@GET("playlists/{playlist_id}/tracks") retrofit2.Call<Pager<PlaylistTrack>> getPlaylistTracks(@Path("playlist_id") String playlistId, @QueryMap Map<String,Object> options)Get full details of the tracks of a playlist owned by a Spotify user.- Parameters:
playlistId- The Spotify ID for the playlist.options- Optional parameters. For list of supported parameters see endpoint documentation- Returns:
- List of playlist's tracks wrapped in a
Pagerobject - See Also:
- Get a Playlist’s Tracks
-
removeTracksFromPlaylist
@HTTP(method="DELETE", hasBody=true, path="playlists/{playlist_id}/tracks") retrofit2.Call<SnapshotId> removeTracksFromPlaylist(@Path("playlist_id") String playlistId, @Body PlaylistTracksToRemove tracksToRemove)Remove one or more tracks from a user’s playlist.- Parameters:
playlistId- The playlist's IdtracksToRemove- A list of tracks to remove. A maximum of 100 objects can be sent at once.- Returns:
- A snapshot ID (the version of the playlist)
- See Also:
- Remove Tracks from a Playlist
-
removeTracksFromPlaylist
@HTTP(method="DELETE", hasBody=true, path="playlists/{playlist_id}/tracks") retrofit2.Call<SnapshotId> removeTracksFromPlaylist(@Path("playlist_id") String playlistId, @Body PlaylistTracksToRemoveWithPosition tracksToRemoveWithPosition)Remove one or more tracks from a user’s playlist.- Parameters:
playlistId- The playlist's IdtracksToRemoveWithPosition- A list of tracks to remove, together with their specific positions. A maximum of 100 objects can be sent at once.- Returns:
- A snapshot ID (the version of the playlist)
- See Also:
- Remove Tracks from a Playlist
-
replaceTracksInPlaylist
@PUT("playlists/{playlist_id}/tracks") retrofit2.Call<Result> replaceTracksInPlaylist(@Path("playlist_id") String playlistId, @Query("uris") String trackUris)Replace all the tracks in a playlist, overwriting its existing tracks. This powerful request can be useful for replacing tracks, re-ordering existing tracks, or clearing the playlist.- Parameters:
playlistId- The playlist's IdtrackUris- A list of comma-separated track uris. A maximum of 100 tracks can be set in one request.- Returns:
- An empty result
- See Also:
- Replace a Playlist’s Tracks
-
replaceTracksInPlaylist
@PUT("playlists/{playlist_id}/tracks") retrofit2.Call<Result> replaceTracksInPlaylist(@Path("playlist_id") String playlistId, @Body PlaylistTracksToReplace newTracksToSet)Replace all the tracks in a playlist, overwriting its existing tracks. This powerful request can be useful for replacing tracks, re-ordering existing tracks, or clearing the playlist.- Parameters:
playlistId- The playlist's IdnewTracksToSet- A list of track uris. A maximum of 100 tracks can be set in one request.- Returns:
- An empty result
- See Also:
- Replace a Playlist’s Tracks
-
reorderPlaylistTracks
@PUT("playlists/{playlist_id}/tracks") retrofit2.Call<SnapshotId> reorderPlaylistTracks(@Path("playlist_id") String playlistId, @Body Map<String,Object> body)Reorder a Playlist's tracks- Parameters:
playlistId- The Spotify ID of the playlistbody- The body parameters. For list of supported parameters see endpoint documentation- Returns:
- A snapshot ID (the version of the playlist)
- See Also:
- Reorder a Playlist
-
-