src/spotify-web-api.js
function(options, callback) {
    return WebApiRequest.builder(this.getAccessToken())
      .withPath('/v1/me/player')
      .withHeaders({ 'Content-Type': 'application/json' })
      .withBodyParameters({
        device_ids: options.deviceIds,
        play: !!options.play
      })
      .build()
      .execute(HttpManager.put, callback);
  }
function(options, callback) {
    return WebApiRequest.builder(this.getAccessToken())
      .withPath('/v1/me/player')
      .withHeaders({ 'Content-Type': 'application/json' })
      .withBodyParameters({
        device_ids: options.deviceIds,
        play: !!options.play
      })
      .build()
      .execute(HttpManager.put, callback);
  }
function ( options , callback ) { return WebApiRequest . builder ( this . getAccessToken ( ) ) . withPath ( '/v1/me/player' ) . withHeaders ( { 'Content-Type' : 'application/json' } ) . withBodyParameters ( { device_ids : options . deviceIds , play : ! ! options . play } ) . build ( ) . execute ( HttpManager . put , callback ) ; }
Transfer a User's Playback
@param {Object} [options] Options, being market.
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@returns {Promise|undefined} A promise that if successful, resolves into a paging object of tracks,
otherwise an error. Not returned if a callback is given.
Transfer a User s Playback