Spotify.NET/assets/js/20.f7f0836a.js

1 line
44 KiB
JavaScript
Raw Normal View History

2019-08-16 23:41:36 +01:00
(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"')])])])