mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-26 16:06:27 +00:00
1 line
44 KiB
JavaScript
1 line
44 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{206:function(t,s,a){"use strict";a.r(s);var e=a(0),r=Object(e.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"playlists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#playlists","aria-hidden":"true"}},[t._v("#")]),t._v(" Playlists")]),t._v(" "),a("h2",{attrs:{id:"getuserplaylists"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getuserplaylists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetUserPlaylists")]),t._v(" "),a("blockquote",[a("p",[t._v("Get a list of the playlists owned or followed by a Spotify user.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("[limit]")]),t._v(" "),a("td",[t._v("The maximum number of playlists to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),a("td",[a("code",[t._v("20")])])]),t._v(" "),a("tr",[a("td",[t._v("[offset]")]),t._v(" "),a("td",[t._v("The index of the first playlist to return. Default: 0 (the first object)")]),t._v(" "),a("td",[a("code",[t._v("0")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#playlist-object-simplified",target:"_blank",rel:"noopener noreferrer"}},[t._v("SimplePlaylist"),a("OutboundLink")],1),t._v(" wrapped inside a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paging Object"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[t._v("Paging"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("SimplePlaylist"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" userPlaylists "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetUserPlaylists")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nuserPlaylists"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("playlist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" playlist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Owner"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("DisplayName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Who is the owner of the playlist?")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getplaylist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getplaylist","aria-hidden":"true"}},[t._v("#")]),t._v(" GetPlaylist")]),t._v(" "),a("blockquote",[a("p",[t._v("Get a playlist owned by a Spotify user.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("[fields]")]),t._v(" "),a("td",[t._v("Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned.")]),t._v(" "),a("td",[a("code",[t._v('"description,uri"')])])]),t._v(" "),a("tr",[a("td",[t._v("[market]")]),t._v(" "),a("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),a("td",[t._v('"DE"')])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#track-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullTrack"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FullPlaylist")]),t._v(" playlist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetPlaylist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nplaylist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Tracks"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Track"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"getplaylisttracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getplaylisttracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetPlaylistTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Get full details of the tracks of a playlist owned by a Spotify user.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("[fields]")]),t._v(" "),a("td",[t._v("Filters for the query: a comma-separated list of the fields to return. If omitted, all fields are returned.")]),t._v(" "),a("td",[a("code",[t._v('"description,uri"')])])]),t._v(" "),a("tr",[a("td",[t._v("[limit]")]),t._v(" "),a("td",[t._v("The maximum number of tracks to return. Default: 100. Minimum: 1. Maximum: 100.")]),t._v(" "),a("td",[a("code",[t._v("100")])])]),t._v(" "),a("tr",[a("td",[t._v("[offset]")]),t._v(" "),a("td",[t._v("The index of the first object to return. Default: 0 (i.e., the first object)")]),t._v(" "),a("td",[a("code",[t._v("0")])])]),t._v(" "),a("tr",[a("td",[t._v("[market]")]),t._v(" "),a("td",[t._v("An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.")]),t._v(" "),a("td",[a("code",[t._v("DE")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#playlist-object-simplified",target:"_blank",rel:"noopener noreferrer"}},[t._v("PlaylistTrack"),a("OutboundLink")],1),t._v(" wrapped inside a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paging Object"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[t._v("Paging"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("PlaylistTrack"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" playlist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("GetPlaylistTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nplaylist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Items"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ForEach")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("track"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Track"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Name"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"createplaylist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#createplaylist","aria-hidden":"true"}},[t._v("#")]),t._v(" CreatePlaylist")]),t._v(" "),a("blockquote",[a("p",[t._v("Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistName")]),t._v(" "),a("td",[t._v('The name for the new playlist, for example "Your Coolest Playlist". This name does not need to be unique.')]),t._v(" "),a("td",[a("code",[t._v('"This is my new Playlist"')])])]),t._v(" "),a("tr",[a("td",[t._v("[isPublic]")]),t._v(" "),a("td",[t._v("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.")]),t._v(" "),a("td",[a("code",[t._v("true")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#playlist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullPlaylist"),a("OutboundLink")],1)]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("FullPlaylist")]),t._v(" playlist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("CreatePlaylist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"This is my new Playlist"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("playlist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Playlist-URI: "')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" playlist"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Uri"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"updateplaylist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#updateplaylist","aria-hidden":"true"}},[t._v("#")]),t._v(" UpdatePlaylist")]),t._v(" "),a("blockquote",[a("p",[t._v("Change a playlist’s name and public/private state. (The user must, of course, own the playlist.)")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("[newName]")]),t._v(" "),a("td",[t._v('The new name for the playlist, for example "My New Playlist Title".')]),t._v(" "),a("td",[a("code",[t._v('"New Playlistname"')])])]),t._v(" "),a("tr",[a("td",[t._v("[newPublic]")]),t._v(" "),a("td",[t._v("If true the playlist will be public, if false it will be private.")]),t._v(" "),a("td",[t._v("EXAMPLE")])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("UpdatePlaylist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"New Name"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"replaceplaylisttracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#replaceplaylisttracks","aria-hidden":"true"}},[t._v("#")]),t._v(" ReplacePlaylistTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("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.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("uris")]),t._v(" "),a("td",[t._v("A list of Spotify track URIs to set. A maximum of 100 tracks can be set in one request.")]),t._v(" "),a("td",[a("code",[t._v('new List<string> { "1ri6UZpjPLmTCswIXZ6Uq1" }')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ReplacePlaylistTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"removeplaylisttracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#removeplaylisttracks","aria-hidden":"true"}},[t._v("#")]),t._v(" RemovePlaylistTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Remove one or more tracks from a user’s playlist.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("uris")]),t._v(" "),a("td",[t._v("array of objects containing Spotify URI strings (and their position in the playlist). A maximum of 100 objects can be sent at once.")]),t._v(" "),a("td",[a("code",[t._v("(example below)")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Remove multiple tracks")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" playlist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RemovePlaylistTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token generic-method"}},[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"47xtGU3vht7mXLHqnbaau5"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Remove multiple tracks at their specified positions")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" playlist "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RemovePlaylistTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token generic-method"}},[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"47xtGU3vht7mXLHqnbaau5"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"removeplaylisttrack"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#removeplaylisttrack","aria-hidden":"true"}},[t._v("#")]),t._v(" RemovePlaylistTrack")]),t._v(" "),a("blockquote",[a("p",[t._v("Remove one or more tracks from a user’s playlist.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("uri")]),t._v(" "),a("td",[t._v("Spotify URI")]),t._v(" "),a("td",[a("code",[t._v('new DeleteTrackUri("1ri6UZpjPLmTCswIXZ6Uq1")')])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Remove all tracks with the specified URI")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RemovePlaylistTrack")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Remove all tracks with the specified URI and the specified positions")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("RemovePlaylistTrack")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("DeleteTrackUri")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"addplaylisttracks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#addplaylisttracks","aria-hidden":"true"}},[t._v("#")]),t._v(" AddPlaylistTracks")]),t._v(" "),a("blockquote",[a("p",[t._v("Add one or more tracks to a user’s playlist.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("uris")]),t._v(" "),a("td",[t._v("A list of Spotify track URIs to add")]),t._v(" "),a("td",[a("code",[t._v('new List<string> { "1ri6UZpjPLmTCswIXZ6Uq1" }')])])]),t._v(" "),a("tr",[a("td",[t._v("[position]")]),t._v(" "),a("td",[t._v("The position to insert the tracks, a zero-based index")]),t._v(" "),a("td",[a("code",[t._v("10")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("AddPlaylistTracks")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("List")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("string")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"addplaylisttrack"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#addplaylisttrack","aria-hidden":"true"}},[t._v("#")]),t._v(" AddPlaylistTrack")]),t._v(" "),a("blockquote",[a("p",[t._v("Add one or more tracks to a user’s playlist.")])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("uri")]),t._v(" "),a("td",[t._v("A Spotify Track URI")]),t._v(" "),a("td",[a("code",[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')])])]),t._v(" "),a("tr",[a("td",[t._v("position")]),t._v(" "),a("td",[t._v("The position to insert the tracks, a zero-based index")]),t._v(" "),a("td",[a("code",[t._v("10")])])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("ErrorResponse")]),t._v(" which just contains a possible error. ("),a("code",[t._v("response.HasError()")]),t._v(" and "),a("code",[t._v("response.Error")]),t._v(")")]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("ErrorResponse")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("AddPlaylistTrack")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1ri6UZpjPLmTCswIXZ6Uq1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("HasError")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Success"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr"),t._v(" "),a("h2",{attrs:{id:"reorderplaylist"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reorderplaylist","aria-hidden":"true"}},[t._v("#")]),t._v(" ReorderPlaylist")]),t._v(" "),a("blockquote",[a("p",[t._v("Reorder a track or a group of tracks in a playlist.\nMore Info: "),a("a",{attrs:{href:"https://developer.spotify.com/web-api/reorder-playlists-tracks/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Reorder-Playlist"),a("OutboundLink")],1)])]),t._v(" "),a("p",[a("strong",[t._v("Parameters")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Name")]),t._v(" "),a("th",[t._v("Description")]),t._v(" "),a("th",[t._v("Example")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("userId")]),t._v(" "),a("td",[t._v("The user's Spotify user ID.")]),t._v(" "),a("td",[a("code",[t._v('"1122095781"')])])]),t._v(" "),a("tr",[a("td",[t._v("playlistId")]),t._v(" "),a("td",[t._v("The Spotify ID for the playlist.")]),t._v(" "),a("td",[a("code",[t._v('"1TtEejT1y4D1WmcOnLfha2"')])])]),t._v(" "),a("tr",[a("td",[t._v("rangeStart")]),t._v(" "),a("td",[t._v("The position of the first track to be reordered.")]),t._v(" "),a("td",[a("code",[t._v("2")])])]),t._v(" "),a("tr",[a("td",[t._v("insertBefore")]),t._v(" "),a("td",[t._v("The position where the tracks should be inserted.")]),t._v(" "),a("td",[a("code",[t._v("0")])])]),t._v(" "),a("tr",[a("td",[t._v("[rangeLength]")]),t._v(" "),a("td",[t._v("The amount of tracks to be reordered. Defaults to 1 if not set.")]),t._v(" "),a("td",[a("code",[t._v("2")])])]),t._v(" "),a("tr",[a("td",[t._v("[snapshotId]")]),t._v(" "),a("td",[t._v("The playlist's snapshot ID against which you want to make the changes.")]),t._v(" "),a("td",[t._v("``")])])])]),t._v(" "),a("p",[t._v("Returns a "),a("code",[t._v("Snapshot")]),t._v("-Object which contains the property "),a("code",[t._v("String SnapshotId")])]),t._v(" "),a("p",[a("strong",[t._v("Usage")])]),t._v(" "),a("div",{staticClass:"language-csharp extra-class"},[a("pre",{pre:!0,attrs:{class:"language-csharp"}},[a("code",[a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Snapshot")]),t._v(" snapshot "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" _spotify"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ReorderPlaylist")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1122095781"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1TtEejT1y4D1WmcOnLfha2"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nConsole"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("WriteLine")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"New SnapshotId: "')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" snapshot"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("SnapshotId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),a("hr")])},[],!1,null,null,null);s.default=r.exports}}]); |