src/spotify-web-api.js
function(
    playlistId,
    positions,
    snapshotId,
    callback
  ) {
    return WebApiRequest.builder(this.getAccessToken())
      .withPath('/v1/playlists/' + playlistId + '/tracks')
      .withHeaders({ 'Content-Type': 'application/json' })
      .withBodyParameters({
        positions: positions,
        snapshot_id: snapshotId
      })
      .build()
      .execute(HttpManager.del, callback);
  }
function(
    playlistId,
    positions,
    snapshotId,
    callback
  ) {
    return WebApiRequest.builder(this.getAccessToken())
      .withPath('/v1/playlists/' + playlistId + '/tracks')
      .withHeaders({ 'Content-Type': 'application/json' })
      .withBodyParameters({
        positions: positions,
        snapshot_id: snapshotId
      })
      .build()
      .execute(HttpManager.del, callback);
  }
function ( playlistId , positions , snapshotId , callback ) { return WebApiRequest . builder ( this . getAccessToken ( ) ) . withPath ( '/v1/playlists/' + playlistId + '/tracks' ) . withHeaders ( { 'Content-Type' : 'application/json' } ) . withBodyParameters ( { positions : positions , snapshot_id : snapshotId } ) . build ( ) . execute ( HttpManager . del , callback ) ; }
Remove tracks from a playlist by position instead of specifying the tracks' URIs.
@param {string} playlistId The playlist's ID
@param {int[]} positions The positions of the tracks in the playlist that should be removed
@param {string} snapshot_id The snapshot ID, or version, of the playlist. Required
@param {requestCallback} [callback] Optional callback method to be called instead of the promise.
@returns {Promise|undefined} A promise that if successful returns an object containing a snapshot_id. If rejected,
it contains an error object. Not returned if a callback is given.
Remove tracks from a playlist by position instead of specifying the tracks URIs .