Class TransferUsersPlaybackRequest

java.lang.Object
de.sonallux.spotify.api.apis.player.TransferUsersPlaybackRequest

public class TransferUsersPlaybackRequest extends Object

Transfer Playback request

Required OAuth scopes

user-modify-playback-state

Response

Playback transferred

  • Constructor Details

    • TransferUsersPlaybackRequest

      public TransferUsersPlaybackRequest(ApiClient apiClient, List<String> deviceIds)
      Transfer Playback request
      Parameters:
      apiClient -

      The API client

      deviceIds -

      A JSON array containing the ID of the device on which playback should be started/transferred.
      For example:{device_ids:["74ASZWbe4lXaubB36ztrGX"]}
      Note: Although an array is accepted, only a single device_id is currently supported. Supplying more than one will return 400 Bad Request

  • Method Details

    • play

      public TransferUsersPlaybackRequest play(boolean play)
      Parameters:
      play -

      true: ensure playback happens on new device.
      false or not provided: keep the current playback state.

      Returns:
      this request
    • build

      public ApiCall<Void> build()
      Build the request into an executable api call
      Returns:
      an executable api call