Spotify.NET/e06aacec.ac7c3381.js

1 line
33 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{145:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return b})),a.d(t,"metadata",(function(){return c})),a.d(t,"rightToc",(function(){return i})),a.d(t,"default",(function(){return s}));var n=a(2),r=a(6),l=(a(0),a(151)),b={id:"playlists",title:"Playlists",sidebar_label:"Playlists"},c={id:"version-5.1.1/web/playlists",title:"Playlists",description:"GetUserPlaylists",source:"@site/versioned_docs/version-5.1.1/web/playlists.md",permalink:"/docs/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:"Jonas Dellinger",lastUpdatedAt:1589387236,sidebar_label:"Playlists",sidebar:"version-5.1.1/someSidebar",previous:{title:"Player",permalink:"/docs/web/player"},next:{title:"Profiles",permalink:"/docs/web/profiles"}},i=[{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:[]}],p={rightToc:i};function s(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(l.b)("wrapper",Object(n.a)({},p,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",Object(n.a)({parentName:"tr"},{align:null}),"Name"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"),Object(l.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Example"))),Object(l.b)("tbody",{parentName:"table"},Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"userId"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The user's Spotify user ID."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},'"1122095781"'))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[limit]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The maximum number of playlists to return. Default: 20. Minimum: 1. Maximum: 50."),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"20"))),Object(l.b)("tr",{parentName:"tbody"},Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"[offset]"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"The index of the first playlist to return. Default: 0 (the first object)"),Object(l.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(l.b)("inlineCode",{parentName:"td"},"0"))))),Object(l.b)("p",null,"Returns a ",Object(l.b)("a",Object(n.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/object-model/#playlist-object-simplified"}),"SimplePlaylist")," wrapped inside a ",Object(l.b)("a",Object(n.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",Object(n.a)({parentName:"pre"},{className:"language-csharp"}),'Paging<SimplePlaylist> userPlaylists = _spotify.GetUserPlaylists("1122095781");\nuserPlaylists.Items.ForEach(playlist => p