2015-07-23 20:44:05 +01:00
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< meta name = "author" content = "JohnnyCrazy" >
< link rel = "shortcut icon" href = "../../img/favicon.ico" >
< title > - Playlists - SpotifyAPI-NET< / title >
< link href = "../../css/bootstrap-custom.min.css" rel = "stylesheet" >
< link href = "../../css/font-awesome-4.0.3.css" rel = "stylesheet" >
< link href = "../../css/prettify-1.0.css" rel = "stylesheet" >
< link href = "../../css/base.css" rel = "stylesheet" >
< link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/styles/agate.min.css" >
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- [if lt IE 9]>
< script src = "https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js" > < / script >
< script src = "https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js" > < / script >
<![endif]-->
< / head >
< body >
< div class = "navbar navbar-default navbar-fixed-top" role = "navigation" >
< div class = "container" >
<!-- Collapsed navigation -->
< div class = "navbar-header" >
<!-- Expander button -->
< button type = "button" class = "navbar-toggle" data-toggle = "collapse" data-target = ".navbar-collapse" >
< span class = "sr-only" > Toggle navigation< / span >
< span class = "icon-bar" > < / span >
< span class = "icon-bar" > < / span >
< span class = "icon-bar" > < / span >
< / button >
<!-- Main title -->
< a class = "navbar-brand" href = "../.." > SpotifyAPI-NET< / a >
< / div >
<!-- Expanded navigation -->
< div class = "navbar-collapse collapse" >
<!-- Main navigation -->
< ul class = "nav navbar-nav" >
< li >
< a href = "../.." > Home< / a >
< / li >
< li class = "dropdown active" >
2015-07-26 15:22:35 +01:00
< a href = "#" class = "dropdown-toggle" data-toggle = "dropdown" > SpotifyWebAPI < b class = "caret" > < / b > < / a >
2015-07-23 20:44:05 +01:00
< ul class = "dropdown-menu" >
< li >
< a href = "../gettingstarted/" > Getting started< / a >
< / li >
< li >
< a href = "../examples/" > Examples< / a >
< / li >
< li >
< a href = "../auth/" > Authentication< / a >
< / li >
< li >
< a href = "../albums/" > - Albums< / a >
< / li >
< li >
< a href = "../artists/" > - Artists< / a >
< / li >
< li >
< a href = "../browse/" > - Browse< / a >
< / li >
< li >
< a href = "../follow/" > - Follow< / a >
< / li >
< li >
< a href = "../library/" > - Library< / a >
< / li >
< li class = "active" >
< a href = "./" > - Playlists< / a >
< / li >
2015-07-26 15:22:35 +01:00
< li >
< a href = "../profiles/" > - Profiles< / a >
< / li >
< li >
< a href = "../search/" > - Search< / a >
< / li >
< li >
< a href = "../tracks/" > - Tracks< / a >
< / li >
2015-11-07 19:45:15 +00:00
< li >
< a href = "../util/" > - Util< / a >
< / li >
2015-07-23 20:44:05 +01:00
< / ul >
< / li >
2016-08-27 16:29:17 +01:00
< li >
< a href = "../../SpotifyLocalAPI/" > SpotifyLocalAPI< / a >
2015-07-23 20:44:05 +01:00
< / li >
< / ul >
<!-- Search, Navigation and Repo links -->
< ul class = "nav navbar-nav navbar-right" >
< li >
< a rel = "next" href = "../library/" >
< i class = "fa fa-arrow-left" > < / i > Previous
< / a >
< / li >
< li >
2015-07-26 15:22:35 +01:00
< a rel = "prev" href = "../profiles/" >
2015-07-23 20:44:05 +01:00
Next < i class = "fa fa-arrow-right" > < / i >
< / a >
< / li >
< li >
< a href = "https://github.com/JohnnyCrazy/SpotifyAPI-NET" >
< i class = "fa fa-github" > < / i >
GitHub
< / a >
< / li >
< / ul >
< / div >
< / div >
< / div >
< div class = "container" >
< div class = "col-md-3" > < div class = "bs-sidebar hidden-print affix well" role = "complementary" style = "height=90%;" >
< ul class = "nav bs-sidenav" >
< li class = "main active" > < a href = "#getuserplaylists" > GetUserPlaylists< / a > < / li >
< li class = "main " > < a href = "#getplaylist" > GetPlaylist< / a > < / li >
< li class = "main " > < a href = "#getplaylisttracks" > GetPlaylistTracks< / a > < / li >
< li class = "main " > < a href = "#createplaylist" > CreatePlaylist< / a > < / li >
< li class = "main " > < a href = "#updateplaylist" > UpdatePlaylist< / a > < / li >
< li class = "main " > < a href = "#replaceplaylisttracks" > ReplacePlaylistTracks< / a > < / li >
< li class = "main " > < a href = "#removeplaylisttracks" > RemovePlaylistTracks< / a > < / li >
< li class = "main " > < a href = "#removeplaylisttrack" > RemovePlaylistTrack< / a > < / li >
< li class = "main " > < a href = "#addplaylisttracks" > AddPlaylistTracks< / a > < / li >
< li class = "main " > < a href = "#addplaylisttrack" > AddPlaylistTrack< / a > < / li >
< li class = "main " > < a href = "#reorderplaylist" > ReorderPlaylist< / a > < / li >
< / ul >
< / div > < / div >
< div class = "col-md-9" role = "main" >
< h2 id = "getuserplaylists" > GetUserPlaylists< / h2 >
< p > < span class = "label label-warning" > AUTH REQUIRED< / span > < / p >
< blockquote >
< p > Get a list of the playlists owned or followed by a Spotify user.< / p >
< / blockquote >
< p > < strong > Paramters< / strong > < / p >
< table >
< thead >
< tr >
< th > Name< / th >
< th > Description< / th >
< th > Example< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > userId< / td >
< td > The user's Spotify user ID.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1122095781"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [limit]< / td >
2015-07-23 20:44:05 +01:00
< td > The maximum number of playlists to return. Default: 20. Minimum: 1. Maximum: 50.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > 20< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [offset]< / td >
2015-07-23 20:44:05 +01:00
< td > The index of the first playlist to return. Default: 0 (the first object)< / td >
2015-07-26 15:22:35 +01:00
< td > < code > 0< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< / tbody >
< / table >
2015-07-26 15:22:35 +01:00
< p > Returns a < a href = "https://developer.spotify.com/web-api/object-model/#playlist-object-simplified" > SimplePlaylist< / a > wrapped inside a < a href = "https://developer.spotify.com/web-api/object-model/#paging-object" > Paging Object< / a > < / p >
2015-07-23 20:44:05 +01:00
< p > < strong > Usage< / strong > < / p >
2015-07-26 15:22:35 +01:00
< pre > < code class = "cs" > Paging< SimplePlaylist> userPlaylists = _spotify.GetUserPlaylists(" 1122095781" );
userPlaylists.Items.ForEach(playlist => playlist.Owner.DisplayName) //Who is the owner of the playlist?
< / code > < / pre >
2015-07-23 20:44:05 +01:00
< hr / >
< h2 id = "getplaylist" > GetPlaylist< / h2 >
< p > < span class = "label label-warning" > AUTH REQUIRED< / span > < / p >
< blockquote >
< p > Get a playlist owned by a Spotify user.< / p >
< / blockquote >
< p > < strong > Paramters< / strong > < / p >
< table >
< thead >
< tr >
< th > Name< / th >
< th > Description< / th >
< th > Example< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > userId< / td >
< td > The user's Spotify user ID.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1122095781"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > playlistId< / td >
< td > The Spotify ID for the playlist.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1TtEejT1y4D1WmcOnLfha2"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [fields]< / td >
< td > Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned.< / td >
< td > < code > "description,uri"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [market]< / td >
2015-07-23 20:44:05 +01:00
< td > An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.< / td >
2015-07-26 15:22:35 +01:00
< td > "DE"< / td >
2015-07-23 20:44:05 +01:00
< / tr >
< / tbody >
< / table >
2015-07-26 15:22:35 +01:00
< p > Returns a < a href = "https://developer.spotify.com/web-api/object-model/#track-object-full" > FullTrack< / a > < / p >
2015-07-23 20:44:05 +01:00
< p > < strong > Usage< / strong > < / p >
2015-07-26 15:22:35 +01:00
< pre > < code class = "cs" > FullPlaylist playlist = _spotify.GetPlaylist(" 1122095781" , " 1TtEejT1y4D1WmcOnLfha2" );
playlist.Tracks.Items.ForEach(track => Console.WriteLine(track.Track.Name));
< / code > < / pre >
2015-07-23 20:44:05 +01:00
< hr / >
< h2 id = "getplaylisttracks" > GetPlaylistTracks< / h2 >
< p > < span class = "label label-warning" > AUTH REQUIRED< / span > < / p >
< blockquote >
< p > Get full details of the tracks of a playlist owned by a Spotify user.< / p >
< / blockquote >
< p > < strong > Paramters< / strong > < / p >
< table >
< thead >
< tr >
< th > Name< / th >
< th > Description< / th >
< th > Example< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > userId< / td >
< td > The user's Spotify user ID.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1122095781"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > playlistId< / td >
< td > The Spotify ID for the playlist.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1TtEejT1y4D1WmcOnLfha2"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [fields]< / td >
< td > Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned.< / td >
< td > < code > "description,uri"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [limit]< / td >
2015-07-23 20:44:05 +01:00
< td > The maximum number of tracks to return. Default: 100. Minimum: 1. Maximum: 100.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > 100< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [offset]< / td >
2015-07-23 20:44:05 +01:00
< td > The index of the first object to return. Default: 0 (i.e., the first object)< / td >
2015-07-26 15:22:35 +01:00
< td > < code > 0< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [market]< / td >
2015-07-23 20:44:05 +01:00
< td > An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > DE< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< / tbody >
< / table >
2015-07-26 15:22:35 +01:00
< p > Returns a < a href = "https://developer.spotify.com/web-api/object-model/#playlist-object-simplified" > PlaylistTrack< / a > wrapped inside a < a href = "https://developer.spotify.com/web-api/object-model/#paging-object" > Paging Object< / a > < / p >
2015-07-23 20:44:05 +01:00
< p > < strong > Usage< / strong > < / p >
2015-07-26 15:22:35 +01:00
< pre > < code class = "cs" > Paging< PlaylistTrack> playlist = _spotify.GetPlaylistTracks(" 1122095781" , " 1TtEejT1y4D1WmcOnLfha2" );
playlist.Items.ForEach(track => Console.WriteLine(track.Track.Name));
< / code > < / pre >
2015-07-23 20:44:05 +01:00
< hr / >
< h2 id = "createplaylist" > CreatePlaylist< / h2 >
< p > < span class = "label label-warning" > AUTH REQUIRED< / span > < / p >
< blockquote >
< p > Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)< / p >
< / blockquote >
< p > < strong > Paramters< / strong > < / p >
< table >
< thead >
< tr >
< th > Name< / th >
< th > Description< / th >
< th > Example< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > userId< / td >
< td > The user's Spotify user ID.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1122095781"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > playlistName< / td >
2015-07-26 15:22:35 +01:00
< td > The name for the new playlist, for example "Your Coolest Playlist". This name does not need to be unique.< / td >
< td > < code > "This is my new Playlist"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [isPublic]< / td >
< td > default true. If true the playlist will be public, if false it will be private. To be able to create private playlists, the user must have granted the playlist-modify-private scope.< / td >
< td > < code > true< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< / tbody >
< / table >
2015-07-26 15:22:35 +01:00
< p > Returns a < a href = "https://developer.spotify.com/web-api/object-model/#playlist-object-full" > FullPlaylist< / a > < / p >
2015-07-23 20:44:05 +01:00
< p > < strong > Usage< / strong > < / p >
2015-07-26 15:22:35 +01:00
< pre > < code class = "cs" > FullPlaylist playlist = _spotify.CreatePlaylist(" 1122095781" , " This is my new Playlist" );
if(!playlist.HasError())
Console.WriteLine(" Playlist-URI: " + playlist.Uri);
< / code > < / pre >
2015-07-23 20:44:05 +01:00
< hr / >
< h2 id = "updateplaylist" > UpdatePlaylist< / h2 >
< p > < span class = "label label-warning" > AUTH REQUIRED< / span > < / p >
< blockquote >
< p > Change a playlist’ s name and public/private state. (The user must, of course, own the playlist.)< / p >
< / blockquote >
< p > < strong > Paramters< / strong > < / p >
< table >
< thead >
< tr >
< th > Name< / th >
< th > Description< / th >
< th > Example< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > userId< / td >
< td > The user's Spotify user ID.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1122095781"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > playlistId< / td >
< td > The Spotify ID for the playlist.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1TtEejT1y4D1WmcOnLfha2"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [newName]< / td >
2015-07-23 20:44:05 +01:00
< td > The new name for the playlist, for example "My New Playlist Title".< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "New Playlistname"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [newPublic]< / td >
2015-07-23 20:44:05 +01:00
< td > If true the playlist will be public, if false it will be private.< / td >
< td > EXAMPLE< / td >
< / tr >
< / tbody >
< / table >
2015-07-26 15:22:35 +01:00
< p > Returns a < strong > ErrorResponse< / strong > which just contains a possible error. (< code > response.HasError()< / code > and < code > response.Error< / code > )< / p >
2015-07-23 20:44:05 +01:00
< p > < strong > Usage< / strong > < / p >
2015-07-26 15:22:35 +01:00
< pre > < code class = "cs" > ErrorResponse response = _spotify.UpdatePlaylist(" 1122095781" , " 1TtEejT1y4D1WmcOnLfha2" , " New Name" , true);
if(!response.HasError())
Console.WriteLine(" success" );
< / code > < / pre >
2015-07-23 20:44:05 +01:00
< hr / >
< h2 id = "replaceplaylisttracks" > ReplacePlaylistTracks< / h2 >
< p > < span class = "label label-warning" > AUTH REQUIRED< / span > < / p >
< blockquote >
2015-07-26 15:22:35 +01:00
< p > Replace all the tracks in a playlist, overwriting its existing tracks. This powerful request can be useful for replacing tracks, re-ordering existing tracks, or clearing the playlist.< / p >
2015-07-23 20:44:05 +01:00
< / blockquote >
< p > < strong > Paramters< / strong > < / p >
< table >
< thead >
< tr >
< th > Name< / th >
< th > Description< / th >
< th > Example< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > userId< / td >
< td > The user's Spotify user ID.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1122095781"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > playlistId< / td >
< td > The Spotify ID for the playlist.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1TtEejT1y4D1WmcOnLfha2"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > uris< / td >
< td > A list of Spotify track URIs to set. A maximum of 100 tracks can be set in one request.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > new List< string> { "1ri6UZpjPLmTCswIXZ6Uq1" }< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< / tbody >
< / table >
2015-07-26 15:22:35 +01:00
< p > Returns a < strong > ErrorResponse< / strong > which just contains a possible error. (< code > response.HasError()< / code > and < code > response.Error< / code > )< / p >
2015-07-23 20:44:05 +01:00
< p > < strong > Usage< / strong > < / p >
2015-07-26 15:22:35 +01:00
< pre > < code class = "cs" > ErrorResponse response = _spotify.ReplacePlaylistTracks(" 1122095781" , " 1TtEejT1y4D1WmcOnLfha2" , new List< string> { " 1ri6UZpjPLmTCswIXZ6Uq1" });
if(!response.HasError())
Console.WriteLine(" success" );
< / code > < / pre >
2015-07-23 20:44:05 +01:00
< hr / >
< h2 id = "removeplaylisttracks" > RemovePlaylistTracks< / h2 >
< p > < span class = "label label-warning" > AUTH REQUIRED< / span > < / p >
< blockquote >
< p > Remove one or more tracks from a user’ s playlist.< / p >
< / blockquote >
< p > < strong > Paramters< / strong > < / p >
< table >
< thead >
< tr >
< th > Name< / th >
< th > Description< / th >
< th > Example< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > userId< / td >
< td > The user's Spotify user ID.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1122095781"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > playlistId< / td >
< td > The Spotify ID for the playlist.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1TtEejT1y4D1WmcOnLfha2"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > uris< / td >
2015-07-26 15:22:35 +01:00
< td > array of objects containing Spotify URI strings (and their position in the playlist). A maximum of 100 objects can be sent at once.< / td >
< td > < code > (example below)< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< / tbody >
< / table >
2015-07-26 15:22:35 +01:00
< p > Returns a < strong > ErrorResponse< / strong > which just contains a possible error. (< code > response.HasError()< / code > and < code > response.Error< / code > )< / p >
2015-07-23 20:44:05 +01:00
< p > < strong > Usage< / strong > < / p >
2015-07-26 15:22:35 +01:00
< pre > < code class = "cs" > //Remove multiple tracks
ErrorResponse playlist = _spotify.RemovePlaylistTracks(" 1122095781" , " 1TtEejT1y4D1WmcOnLfha2" , new List< DeleteTrackUri> ()
{
new DeleteTrackUri(" 1ri6UZpjPLmTCswIXZ6Uq1" ),
new DeleteTrackUri(" 47xtGU3vht7mXLHqnbaau5" )
});
//Remove multiple tracks at their specified positions
ErrorResponse playlist = _spotify.RemovePlaylistTracks(" 1122095781" , " 1TtEejT1y4D1WmcOnLfha2" , new List< DeleteTrackUri> ()
{
new DeleteTrackUri(" 1ri6UZpjPLmTCswIXZ6Uq1" , 2),
new DeleteTrackUri(" 47xtGU3vht7mXLHqnbaau5" , 0, 50)
});
< / code > < / pre >
2015-07-23 20:44:05 +01:00
< hr / >
< h2 id = "removeplaylisttrack" > RemovePlaylistTrack< / h2 >
< p > < span class = "label label-warning" > AUTH REQUIRED< / span > < / p >
< blockquote >
< p > Remove one or more tracks from a user’ s playlist.< / p >
< / blockquote >
< p > < strong > Paramters< / strong > < / p >
< table >
< thead >
< tr >
< th > Name< / th >
< th > Description< / th >
< th > Example< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > userId< / td >
< td > The user's Spotify user ID.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1122095781"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > playlistId< / td >
< td > The Spotify ID for the playlist.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1TtEejT1y4D1WmcOnLfha2"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > uri< / td >
< td > Spotify URI< / td >
2015-07-26 15:22:35 +01:00
< td > < code > new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1")< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< / tbody >
< / table >
2015-07-26 15:22:35 +01:00
< p > Returns a < strong > ErrorResponse< / strong > which just contains a possible error. (< code > response.HasError()< / code > and < code > response.Error< / code > )< / p >
2015-07-23 20:44:05 +01:00
< p > < strong > Usage< / strong > < / p >
2015-07-26 15:22:35 +01:00
< pre > < code class = "cs" > //Remove all tracks with the specified URI
ErrorResponse response = _spotify.RemovePlaylistTrack(" 1122095781" , " 1TtEejT1y4D1WmcOnLfha2" , new DeleteTrackUri(" 1ri6UZpjPLmTCswIXZ6Uq1" ));
//Remove all tracks with the specified URI and the specified positions
ErrorResponse response = _spotify.RemovePlaylistTrack(" 1122095781" , " 1TtEejT1y4D1WmcOnLfha2" , new DeleteTrackUri(" 1ri6UZpjPLmTCswIXZ6Uq1" , 0, 10, 20));
< / code > < / pre >
2015-07-23 20:44:05 +01:00
< hr / >
< h2 id = "addplaylisttracks" > AddPlaylistTracks< / h2 >
< p > < span class = "label label-warning" > AUTH REQUIRED< / span > < / p >
< blockquote >
< p > Add one or more tracks to a user’ s playlist.< / p >
< / blockquote >
< p > < strong > Paramters< / strong > < / p >
< table >
< thead >
< tr >
< th > Name< / th >
< th > Description< / th >
< th > Example< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > userId< / td >
< td > The user's Spotify user ID.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1122095781"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > playlistId< / td >
< td > The Spotify ID for the playlist.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1TtEejT1y4D1WmcOnLfha2"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > uris< / td >
< td > A list of Spotify track URIs to add< / td >
2015-07-26 15:22:35 +01:00
< td > < code > new List< string> { "1ri6UZpjPLmTCswIXZ6Uq1" }< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [position]< / td >
2015-07-23 20:44:05 +01:00
< td > The position to insert the tracks, a zero-based index< / td >
2015-07-26 15:22:35 +01:00
< td > < code > 10< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< / tbody >
< / table >
2015-07-26 15:22:35 +01:00
< p > Returns a < strong > ErrorResponse< / strong > which just contains a possible error. (< code > response.HasError()< / code > and < code > response.Error< / code > )< / p >
2015-07-23 20:44:05 +01:00
< p > < strong > Usage< / strong > < / p >
2015-07-26 15:22:35 +01:00
< pre > < code class = "cs" > ErrorResponse response = _spotify.AddPlaylistTracks(" 1122095781" , " 1TtEejT1y4D1WmcOnLfha2" , new List< string> { " 1ri6UZpjPLmTCswIXZ6Uq1" });
if(!response.HasError())
Console.WriteLine(" Success" );
< / code > < / pre >
2015-07-23 20:44:05 +01:00
< hr / >
< h2 id = "addplaylisttrack" > AddPlaylistTrack< / h2 >
< p > < span class = "label label-warning" > AUTH REQUIRED< / span > < / p >
< blockquote >
< p > Add one or more tracks to a user’ s playlist.< / p >
< / blockquote >
< p > < strong > Paramters< / strong > < / p >
< table >
< thead >
< tr >
< th > Name< / th >
< th > Description< / th >
< th > Example< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > userId< / td >
< td > The user's Spotify user ID.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1122095781"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > playlistId< / td >
< td > The Spotify ID for the playlist.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1TtEejT1y4D1WmcOnLfha2"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > uri< / td >
< td > A Spotify Track URI< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1ri6UZpjPLmTCswIXZ6Uq1"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > position< / td >
< td > The position to insert the tracks, a zero-based index< / td >
2015-07-26 15:22:35 +01:00
< td > < code > 10< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< / tbody >
< / table >
2015-07-26 15:22:35 +01:00
< p > Returns a < strong > ErrorResponse< / strong > which just contains a possible error. (< code > response.HasError()< / code > and < code > response.Error< / code > )< / p >
2015-07-23 20:44:05 +01:00
< p > < strong > Usage< / strong > < / p >
2015-07-26 15:22:35 +01:00
< pre > < code class = "cs" > ErrorResponse response = _spotify.AddPlaylistTrack(" 1122095781" , " 1TtEejT1y4D1WmcOnLfha2" , " 1ri6UZpjPLmTCswIXZ6Uq1" );
if(!response.HasError())
Console.WriteLine(" Success" );
< / code > < / pre >
2015-07-23 20:44:05 +01:00
< hr / >
< h2 id = "reorderplaylist" > ReorderPlaylist< / h2 >
< p > < span class = "label label-warning" > AUTH REQUIRED< / span > < / p >
< blockquote >
2015-07-26 15:22:35 +01:00
< p > Reorder a track or a group of tracks in a playlist.
More Info: < a href = "https://developer.spotify.com/web-api/reorder-playlists-tracks/" > Reorder-Playlist< / a > < / p >
2015-07-23 20:44:05 +01:00
< / blockquote >
< p > < strong > Paramters< / strong > < / p >
< table >
< thead >
< tr >
< th > Name< / th >
< th > Description< / th >
< th > Example< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > userId< / td >
< td > The user's Spotify user ID.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1122095781"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > playlistId< / td >
< td > The Spotify ID for the playlist.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > "1TtEejT1y4D1WmcOnLfha2"< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > rangeStart< / td >
< td > The position of the first track to be reordered.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > 2< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
< td > insertBefore< / td >
< td > The position where the tracks should be inserted.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > 0< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [rangeLength]< / td >
2015-07-23 20:44:05 +01:00
< td > The amount of tracks to be reordered. Defaults to 1 if not set.< / td >
2015-07-26 15:22:35 +01:00
< td > < code > 2< / code > < / td >
2015-07-23 20:44:05 +01:00
< / tr >
< tr >
2015-07-26 15:22:35 +01:00
< td > [snapshotId]< / td >
2015-07-23 20:44:05 +01:00
< td > The playlist's snapshot ID against which you want to make the changes.< / td >
2015-07-26 15:22:35 +01:00
< td > ``< / td >
2015-07-23 20:44:05 +01:00
< / tr >
< / tbody >
< / table >
2015-07-26 15:22:35 +01:00
< p > Returns a < strong > Snapshot< / strong > -Object which contains the property < code > String SnapshotId< / code > < / p >
2015-07-23 20:44:05 +01:00
< p > < strong > Usage< / strong > < / p >
2015-07-26 15:22:35 +01:00
< pre > < code class = "cs" > Snapshot snapshot = _spotify.ReorderPlaylist(" 1122095781" , " 1TtEejT1y4D1WmcOnLfha2" , 2, 0, 2);
Console.WriteLine(" New SnapshotId: " + snapshot.SnapshotId);
< / code > < / pre >
2015-07-23 20:44:05 +01:00
< hr / > < / div >
< / div >
< script src = "https://code.jquery.com/jquery-1.10.2.min.js" > < / script >
< script src = "../../js/bootstrap-3.0.3.min.js" > < / script >
< script src = "../../js/base.js" > < / script >
2016-08-25 19:42:18 +01:00
< script src = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js" > < / script >
2015-07-23 20:44:05 +01:00
< script src = "../../highlight.js" > < / script >
< / body >
< / html >