Spotify.NET/assets/js/a1189d06.b4ea1471.js

1 line
20 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{105:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return l})),a.d(t,"metadata",(function(){return c})),a.d(t,"toc",(function(){return o})),a.d(t,"default",(function(){return p}));var n=a(3),r=a(7),b=(a(0),a(124)),l={id:"library",title:"Library",sidebar_label:"Library"},c={unversionedId:"web/library",id:"version-5.1.1/web/library",isDocsHomePage:!1,title:"Library",description:"SaveTracks",source:"@site/versioned_docs/version-5.1.1/web/library.md",slug:"/web/library",permalink:"/SpotifyAPI-NET/docs/5.1.1/web/library",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/versioned_docs/version-5.1.1/web/library.md",version:"5.1.1",lastUpdatedBy:"dependabot[bot]",lastUpdatedAt:1622836144,formattedLastUpdatedAt:"6/4/2021",sidebar_label:"Library",sidebar:"version-5.1.1/someSidebar",previous:{title:"Follow",permalink:"/SpotifyAPI-NET/docs/5.1.1/web/follow"},next:{title:"Personalization",permalink:"/SpotifyAPI-NET/docs/5.1.1/web/personalization"}},o=[{value:"SaveTracks",id:"savetracks",children:[]},{value:"SaveTrack",id:"savetrack",children:[]},{value:"GetSavedTracks",id:"getsavedtracks",children:[]},{value:"RemoveSavedTracks",id:"removesavedtracks",children:[]},{value:"CheckSavedTracks",id:"checksavedtracks",children:[]},{value:"SaveAlbums",id:"savealbums",children:[]},{value:"SaveAlbum",id:"savealbum",children:[]},{value:"GetSavedAlbums",id:"getsavedalbums",children:[]},{value:"RemoveSavedAlbums",id:"removesavedalbums",children:[]},{value:"CheckSavedAlbums",id:"checksavedalbums",children:[]}],i={toc:o};function p(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(b.b)("wrapper",Object(n.a)({},i,a,{components:t,mdxType:"MDXLayout"}),Object(b.b)("h2",{id:"savetracks"},"SaveTracks"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Save one or more tracks to the current user\u2019s \u201cYour Music\u201d library.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",{parentName:"tr",align:null},"Name"),Object(b.b)("th",{parentName:"tr",align:null},"Description"),Object(b.b)("th",{parentName:"tr",align:null},"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"ids"),Object(b.b)("td",{parentName:"tr",align:null},"A list of the Spotify IDs"),Object(b.b)("td",{parentName:"tr",align:null},Object(b.b)("inlineCode",{parentName:"td"},'new List<String> { "3Hvu1pq89D4R0lyPBoujSv" }'))))),Object(b.b)("p",null,"Returns a ",Object(b.b)("inlineCode",{parentName:"p"},"ErrorResponse")," which just contains a possible error. (",Object(b.b)("inlineCode",{parentName:"p"},"response.HasError()")," and ",Object(b.b)("inlineCode",{parentName:"p"},"response.Error"),")"),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Usage")),Object(b.b)("pre",null,Object(b.b)("code",{parentName:"pre",className:"language-csharp"},'ErrorResponse response = _spotify.SaveTracks(new List<string> { "3Hvu1pq89D4R0lyPBoujSv" });\nif(!response.HasError())\n Console.WriteLine("success");\n')),Object(b.b)("hr",null),Object(b.b)("h2",{id:"savetrack"},"SaveTrack"),Object(b.b)("blockquote",null,Object(b.b)("p",{parentName:"blockquote"},"Save one track to the current user\u2019s \u201cYour Music\u201d library.")),Object(b.b)("p",null,Object(b.b)("strong",{parentName:"p"},"Parameters")),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",{parentName:"tr",align:null},"Name"),Object(b.b)("th",{parentName:"tr",align:null},"Description"),Object(b.b)("th",{parentName:"tr",align:null},"Example"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",{parentName:"tr",align:null},"id"),Object(b.b)("td",{parentName:"tr",align:null},"A Spotify ID"),Object(b.b)("td",{parentName:"tr",align:null},Obj