Interface PlaylistTracksSpotifyService


  • public interface PlaylistTracksSpotifyService
    • 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 ID
        queryParameters - 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 ID
        tracksToAdd - 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 ID
        tracksToAddWithPosition - 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 Pager object
        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 Pager object
        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 Id
        tracksToRemove - 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 Id
        tracksToRemoveWithPosition - 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 Id
        trackUris - 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 Id
        newTracksToSet - 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 playlist
        body - 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