Class ReplacePlaylistsTracksRequest


  • public class ReplacePlaylistsTracksRequest
    extends Object
    Replace items in a playlist request

    Required OAuth scopes

    playlist-modify-public, playlist-modify-private

    Response

    On a successful replace operation, the HTTP status code in the response header is 201 Created.

    On error, the header status code is an error code, the response body contains an error object, and the existing playlist is unmodified. Trying to set an item when you do not have the user's authorization returns error 403 Forbidden.

    • Constructor Detail

      • ReplacePlaylistsTracksRequest

        public ReplacePlaylistsTracksRequest​(ApiClient apiClient,
                                             String playlistId,
                                             List<String> uris)

        Replace items in a playlist request

        Parameters:
        apiClient -

        The API client

        playlistId -

        The Spotify ID for the playlist.

        uris -

        A comma-separated list of Spotify URIs to set, can be track or episode URIs. For example: uris=spotify:track:4iV5W9uYEdYUVa79Axb7Rh,spotify:track:1301WleyT98MSxVHPZCA6M,spotify:episode:512ojhOuo1ktJprKbVcKyQ
        A maximum of 100 items can be set in one request.

    • Method Detail

      • build

        public ApiCall<SnapshotId> build()
        Build the request into an executable call