(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{116:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return b})),a.d(t,"metadata",(function(){return i})),a.d(t,"toc",(function(){return p})),a.d(t,"default",(function(){return s}));var n=a(3),r=a(7),l=(a(0),a(124)),b={id:"playlists",title:"Playlists",sidebar_label:"Playlists"},i={unversionedId:"web/playlists",id:"version-5.1.1/web/playlists",isDocsHomePage:!1,title:"Playlists",description:"GetUserPlaylists",source:"@site/versioned_docs/version-5.1.1/web/playlists.md",slug:"/web/playlists",permalink:"/SpotifyAPI-NET/docs/5.1.1/web/playlists",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/versioned_docs/version-5.1.1/web/playlists.md",version:"5.1.1",lastUpdatedBy:"dependabot[bot]",lastUpdatedAt:1624215041,formattedLastUpdatedAt:"6/20/2021",sidebar_label:"Playlists",sidebar:"version-5.1.1/someSidebar",previous:{title:"Player",permalink:"/SpotifyAPI-NET/docs/5.1.1/web/player"},next:{title:"Profiles",permalink:"/SpotifyAPI-NET/docs/5.1.1/web/profiles"}},p=[{value:"GetUserPlaylists",id:"getuserplaylists",children:[]},{value:"GetPlaylist",id:"getplaylist",children:[]},{value:"GetPlaylistTracks",id:"getplaylisttracks",children:[]},{value:"CreatePlaylist",id:"createplaylist",children:[]},{value:"UpdatePlaylist",id:"updateplaylist",children:[]},{value:"ReplacePlaylistTracks",id:"replaceplaylisttracks",children:[]},{value:"RemovePlaylistTracks",id:"removeplaylisttracks",children:[]},{value:"RemovePlaylistTrack",id:"removeplaylisttrack",children:[]},{value:"AddPlaylistTracks",id:"addplaylisttracks",children:[]},{value:"AddPlaylistTrack",id:"addplaylisttrack",children:[]},{value:"ReorderPlaylist",id:"reorderplaylist",children:[]}],c={toc:p};function s(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(l.b)("wrapper",Object(n.a)({},c,a,{components:t,mdxType:"MDXLayout"}),Object(l.b)("h2",{id:"getuserplaylists"},"GetUserPlaylists"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Get a list of the playlists owned or followed by a Spotify user.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",{parentName:"tr",align:null},"Name"),Object(l.b)("th",{parentName:"tr",align:null},"Description"),Object(l.b)("th",{parentName:"tr",align:null},"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"userId"),Object(l.b)("td",{parentName:"tr",align:null},"The user's Spotify user ID."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[limit]"),Object(l.b)("td",{parentName:"tr",align:null},"The maximum number of playlists to return. Default: 20. Minimum: 1. Maximum: 50."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},"20"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[offset]"),Object(l.b)("td",{parentName:"tr",align:null},"The index of the first playlist to return. Default: 0 (the first object)"),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},"0"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("a",{parentName:"p",href:"https://developer.spotify.com/web-api/object-model/#playlist-object-simplified"},"SimplePlaylist")," wrapped inside a ",Object(l.b)("a",{parentName:"p",href:"https://developer.spotify.com/web-api/object-model/#paging-object"},"Paging Object")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",{parentName:"pre",className:"language-csharp"},'Paging userPlaylists = _spotify.GetUserPlaylists("1122095781");\nuserPlaylists.Items.ForEach(playlist => playlist.Owner.DisplayName) //Who is the owner of the playlist?\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"getplaylist"},"GetPlaylist"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Get a playlist owned by a Spotify user.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",{parentName:"tr",align:null},"Name"),Object(l.b)("th",{parentName:"tr",align:null},"Description"),Object(l.b)("th",{parentName:"tr",align:null},"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"userId"),Object(l.b)("td",{parentName:"tr",align:null},"The user's Spotify user ID."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"playlistId"),Object(l.b)("td",{parentName:"tr",align:null},"The Spotify ID for the playlist."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[fields]"),Object(l.b)("td",{parentName:"tr",align:null},"Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"description,uri"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[market]"),Object(l.b)("td",{parentName:"tr",align:null},"An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."),Object(l.b)("td",{parentName:"tr",align:null},'"DE"')))),Object(l.b)("p",null,"Returns a ",Object(l.b)("a",{parentName:"p",href:"https://developer.spotify.com/web-api/object-model/#track-object-full"},"FullTrack")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",{parentName:"pre",className:"language-csharp"},'FullPlaylist playlist = _spotify.GetPlaylist("1122095781", "1TtEejT1y4D1WmcOnLfha2");\nplaylist.Tracks.Items.ForEach(track => Console.WriteLine(track.Track.Name));\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"getplaylisttracks"},"GetPlaylistTracks"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Get full details of the tracks of a playlist owned by a Spotify user.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",{parentName:"tr",align:null},"Name"),Object(l.b)("th",{parentName:"tr",align:null},"Description"),Object(l.b)("th",{parentName:"tr",align:null},"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"userId"),Object(l.b)("td",{parentName:"tr",align:null},"The user's Spotify user ID."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"playlistId"),Object(l.b)("td",{parentName:"tr",align:null},"The Spotify ID for the playlist."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[fields]"),Object(l.b)("td",{parentName:"tr",align:null},"Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"description,uri"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[limit]"),Object(l.b)("td",{parentName:"tr",align:null},"The maximum number of tracks to return. Default: 100. Minimum: 1. Maximum: 100."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},"100"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[offset]"),Object(l.b)("td",{parentName:"tr",align:null},"The index of the first object to return. Default: 0 (i.e., the first object)"),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},"0"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[market]"),Object(l.b)("td",{parentName:"tr",align:null},"An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},"DE"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("a",{parentName:"p",href:"https://developer.spotify.com/web-api/object-model/#playlist-object-simplified"},"PlaylistTrack")," wrapped inside a ",Object(l.b)("a",{parentName:"p",href:"https://developer.spotify.com/web-api/object-model/#paging-object"},"Paging Object")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",{parentName:"pre",className:"language-csharp"},'Paging playlist = _spotify.GetPlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2");\nplaylist.Items.ForEach(track => Console.WriteLine(track.Track.Name));\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"createplaylist"},"CreatePlaylist"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",{parentName:"tr",align:null},"Name"),Object(l.b)("th",{parentName:"tr",align:null},"Description"),Object(l.b)("th",{parentName:"tr",align:null},"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"userId"),Object(l.b)("td",{parentName:"tr",align:null},"The user's Spotify user ID."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"playlistName"),Object(l.b)("td",{parentName:"tr",align:null},'The name for the new playlist, for example "Your Coolest Playlist". This name does not need to be unique.'),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"This is my new Playlist"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[isPublic]"),Object(l.b)("td",{parentName:"tr",align:null},"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."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},"true"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("a",{parentName:"p",href:"https://developer.spotify.com/web-api/object-model/#playlist-object-full"},"FullPlaylist")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",{parentName:"pre",className:"language-csharp"},'FullPlaylist playlist = _spotify.CreatePlaylist("1122095781", "This is my new Playlist");\nif(!playlist.HasError())\n Console.WriteLine("Playlist-URI: " + playlist.Uri);\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"updateplaylist"},"UpdatePlaylist"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Change a playlist\u2019s name and public/private state. (The user must, of course, own the playlist.)")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",{parentName:"tr",align:null},"Name"),Object(l.b)("th",{parentName:"tr",align:null},"Description"),Object(l.b)("th",{parentName:"tr",align:null},"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"userId"),Object(l.b)("td",{parentName:"tr",align:null},"The user's Spotify user ID."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"playlistId"),Object(l.b)("td",{parentName:"tr",align:null},"The Spotify ID for the playlist."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[newName]"),Object(l.b)("td",{parentName:"tr",align:null},'The new name for the playlist, for example "My New Playlist Title".'),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"New Playlistname"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[newPublic]"),Object(l.b)("td",{parentName:"tr",align:null},"If true the playlist will be public, if false it will be private."),Object(l.b)("td",{parentName:"tr",align:null},"EXAMPLE")))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",{parentName:"pre",className:"language-csharp"},'ErrorResponse response = _spotify.UpdatePlaylist("1122095781", "1TtEejT1y4D1WmcOnLfha2", "New Name", true);\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"replaceplaylisttracks"},"ReplacePlaylistTracks"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"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.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",{parentName:"tr",align:null},"Name"),Object(l.b)("th",{parentName:"tr",align:null},"Description"),Object(l.b)("th",{parentName:"tr",align:null},"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"userId"),Object(l.b)("td",{parentName:"tr",align:null},"The user's Spotify user ID."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"playlistId"),Object(l.b)("td",{parentName:"tr",align:null},"The Spotify ID for the playlist."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"uris"),Object(l.b)("td",{parentName:"tr",align:null},"A list of Spotify track URIs to set. A maximum of 100 tracks can be set in one request."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'new List { "1ri6UZpjPLmTCswIXZ6Uq1" }'))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",{parentName:"pre",className:"language-csharp"},'ErrorResponse response = _spotify.ReplacePlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2", new List { "1ri6UZpjPLmTCswIXZ6Uq1" });\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"removeplaylisttracks"},"RemovePlaylistTracks"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Remove one or more tracks from a user\u2019s playlist.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",{parentName:"tr",align:null},"Name"),Object(l.b)("th",{parentName:"tr",align:null},"Description"),Object(l.b)("th",{parentName:"tr",align:null},"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"userId"),Object(l.b)("td",{parentName:"tr",align:null},"The user's Spotify user ID."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"playlistId"),Object(l.b)("td",{parentName:"tr",align:null},"The Spotify ID for the playlist."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"uris"),Object(l.b)("td",{parentName:"tr",align:null},"array of objects containing Spotify URI strings (and their position in the playlist). A maximum of 100 objects can be sent at once."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},"(example below)"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",{parentName:"pre",className:"language-csharp"},'//Remove multiple tracks\nErrorResponse playlist = _spotify.RemovePlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2", new List()\n{\n new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1"),\n new DeleteTrackUri("47xtGU3vht7mXLHqnbaau5")\n});\n//Remove multiple tracks at their specified positions\nErrorResponse playlist = _spotify.RemovePlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2", new List()\n{\n new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1", 2),\n new DeleteTrackUri("47xtGU3vht7mXLHqnbaau5", 0, 50)\n});\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"removeplaylisttrack"},"RemovePlaylistTrack"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Remove one or more tracks from a user\u2019s playlist.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",{parentName:"tr",align:null},"Name"),Object(l.b)("th",{parentName:"tr",align:null},"Description"),Object(l.b)("th",{parentName:"tr",align:null},"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"userId"),Object(l.b)("td",{parentName:"tr",align:null},"The user's Spotify user ID."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"playlistId"),Object(l.b)("td",{parentName:"tr",align:null},"The Spotify ID for the playlist."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"uri"),Object(l.b)("td",{parentName:"tr",align:null},"Spotify URI"),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1")'))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",{parentName:"pre",className:"language-csharp"},'//Remove all tracks with the specified URI\nErrorResponse response = _spotify.RemovePlaylistTrack("1122095781", "1TtEejT1y4D1WmcOnLfha2", new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1"));\n//Remove all tracks with the specified URI and the specified positions\nErrorResponse response = _spotify.RemovePlaylistTrack("1122095781", "1TtEejT1y4D1WmcOnLfha2", new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1", 0, 10, 20));\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"addplaylisttracks"},"AddPlaylistTracks"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Add one or more tracks to a user\u2019s playlist.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",{parentName:"tr",align:null},"Name"),Object(l.b)("th",{parentName:"tr",align:null},"Description"),Object(l.b)("th",{parentName:"tr",align:null},"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"userId"),Object(l.b)("td",{parentName:"tr",align:null},"The user's Spotify user ID."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"playlistId"),Object(l.b)("td",{parentName:"tr",align:null},"The Spotify ID for the playlist."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"uris"),Object(l.b)("td",{parentName:"tr",align:null},"A list of Spotify track URIs to add"),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'new List { "1ri6UZpjPLmTCswIXZ6Uq1" }'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[position]"),Object(l.b)("td",{parentName:"tr",align:null},"The position to insert the tracks, a zero-based index"),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},"10"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",{parentName:"pre",className:"language-csharp"},'ErrorResponse response = _spotify.AddPlaylistTracks("1122095781", "1TtEejT1y4D1WmcOnLfha2", new List { "1ri6UZpjPLmTCswIXZ6Uq1" });\nif(!response.HasError())\n Console.WriteLine("Success");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"addplaylisttrack"},"AddPlaylistTrack"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Add one or more tracks to a user\u2019s playlist.")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",{parentName:"tr",align:null},"Name"),Object(l.b)("th",{parentName:"tr",align:null},"Description"),Object(l.b)("th",{parentName:"tr",align:null},"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"userId"),Object(l.b)("td",{parentName:"tr",align:null},"The user's Spotify user ID."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"playlistId"),Object(l.b)("td",{parentName:"tr",align:null},"The Spotify ID for the playlist."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"uri"),Object(l.b)("td",{parentName:"tr",align:null},"A Spotify Track URI"),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1ri6UZpjPLmTCswIXZ6Uq1"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"position"),Object(l.b)("td",{parentName:"tr",align:null},"The position to insert the tracks, a zero-based index"),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},"10"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(l.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(l.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",{parentName:"pre",className:"language-csharp"},'ErrorResponse response = _spotify.AddPlaylistTrack("1122095781", "1TtEejT1y4D1WmcOnLfha2", "1ri6UZpjPLmTCswIXZ6Uq1");\nif(!response.HasError())\n Console.WriteLine("Success");\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"reorderplaylist"},"ReorderPlaylist"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Reorder a track or a group of tracks in a playlist.\nMore Info: ",Object(l.b)("a",{parentName:"p",href:"https://developer.spotify.com/web-api/reorder-playlists-tracks/"},"Reorder-Playlist"))),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Parameters")),Object(l.b)("table",null,Object(l.b)("thead",{parentName:"table"},Object(l.b)("tr",{parentName:"thead"},Object(l.b)("th",{parentName:"tr",align:null},"Name"),Object(l.b)("th",{parentName:"tr",align:null},"Description"),Object(l.b)("th",{parentName:"tr",align:null},"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"userId"),Object(l.b)("td",{parentName:"tr",align:null},"The user's Spotify user ID."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"playlistId"),Object(l.b)("td",{parentName:"tr",align:null},"The Spotify ID for the playlist."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"1TtEejT1y4D1WmcOnLfha2"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"rangeStart"),Object(l.b)("td",{parentName:"tr",align:null},"The position of the first track to be reordered."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},"2"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"insertBefore"),Object(l.b)("td",{parentName:"tr",align:null},"The position where the tracks should be inserted."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},"0"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[rangeLength]"),Object(l.b)("td",{parentName:"tr",align:null},"The amount of tracks to be reordered. Defaults to 1 if not set."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},"2"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",{parentName:"tr",align:null},"[snapshotId]"),Object(l.b)("td",{parentName:"tr",align:null},"The playlist's snapshot ID against which you want to make the changes."),Object(l.b)("td",{parentName:"tr",align:null},"``")))),Object(l.b)("p",null,"Returns a ",Object(l.b)("inlineCode",{parentName:"p"},"Snapshot"),"-Object which contains the property ",Object(l.b)("inlineCode",{parentName:"p"},"String SnapshotId")),Object(l.b)("p",null,Object(l.b)("strong",{parentName:"p"},"Usage")),Object(l.b)("pre",null,Object(l.b)("code",{parentName:"pre",className:"language-csharp"},'Snapshot snapshot = _spotify.ReorderPlaylist("1122095781", "1TtEejT1y4D1WmcOnLfha2", 2, 0, 2);\nConsole.WriteLine("New SnapshotId: " + snapshot.SnapshotId);\n')),Object(l.b)("hr",null))}s.isMDXComponent=!0},124:function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return j}));var n=a(0),r=a.n(n);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var c=r.a.createContext({}),s=function(e){var t=r.a.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},o=function(e){var t=s(e.components);return r.a.createElement(c.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,b=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),o=s(a),d=n,j=o["".concat(b,".").concat(d)]||o[d]||m[d]||l;return a?r.a.createElement(j,i(i({ref:t},c),{},{components:a})):r.a.createElement(j,i({ref:t},c))}));function j(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,b=new Array(l);b[0]=d;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:n,b[1]=i;for(var c=2;c