[−][src]Function aspotify::endpoints::playlists::reorder_playlist
pub async fn reorder_playlist<'_, '_, '_>(
token: &'_ AccessToken,
id: &'_ str,
range_start: usize,
range_length: usize,
insert_before: usize,
snapshot_id: &'_ str
) -> Result<String, EndpointError<Error>>
Reorder tracks in a playlist.
Requires playlist-modify-public
if the playlist is public, requires playlist-modify-private
if it is private.
range_start
and range_length
specify a slice of the playlist to move around. This slice
will always remain in the same order. It will be moved before the position in insert_before
(e.g. it will be moved to start if insert_before == 0
and it will be moved to the end if
insert_before == the playlist's length
).
This function does nothing if range_length == 0
or if range_start + range_length == insert_before
.
This function returns the snapshot_id
of the created playlist, which you should hold on to to
stop concurrent accesses to the playlist interfering with each other.