Spotify.NET/assets/js/e27d08ab.0bc1c3bf.js

1 line
9.6 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{117: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 o})),a.d(t,"default",(function(){return p}));var n=a(3),r=a(7),l=(a(0),a(124)),b={id:"albums",title:"Albums",sidebar_label:"Albums"},i={unversionedId:"web/albums",id:"version-5.1.1/web/albums",isDocsHomePage:!1,title:"Albums",description:"GetAlbumTracks",source:"@site/versioned_docs/version-5.1.1/web/albums.md",slug:"/web/albums",permalink:"/SpotifyAPI-NET/docs/5.1.1/web/albums",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/versioned_docs/version-5.1.1/web/albums.md",version:"5.1.1",lastUpdatedBy:"muhmuhhum",lastUpdatedAt:1618695539,formattedLastUpdatedAt:"4/17/2021",sidebar_label:"Albums",sidebar:"version-5.1.1/someSidebar",previous:{title:"Getting Started",permalink:"/SpotifyAPI-NET/docs/5.1.1/web/getting_started"},next:{title:"Artists",permalink:"/SpotifyAPI-NET/docs/5.1.1/web/artists"}},o=[{value:"GetAlbumTracks",id:"getalbumtracks",children:[]},{value:"GetAlbum",id:"getalbum",children:[]},{value:"GetSeveralAlbums",id:"getseveralalbums",children:[]}],c={toc:o};function p(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:"getalbumtracks"},"GetAlbumTracks"),Object(l.b)("blockquote",null,Object(l.b)("p",{parentName:"blockquote"},"Get Spotify catalog information about an album's tracks. Optional parameters can be used to limit the number of tracks returned.")),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},"id"),Object(l.b)("td",{parentName:"tr",align:null},"The Spotify ID for the album."),Object(l.b)("td",{parentName:"tr",align:null},Object(l.b)("inlineCode",{parentName:"td"},'"5O7V8l4SeXTymVp3IesT9C"'))),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 items 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 track 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)("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/#track-object-simplified"},"SimpleTrack")," 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<SimpleTrack> tracks = _spotify.GetAlbumTracks("5O7V8l4SeXTymVp3IesT9C");\ntracks.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Track-Names (max 20)\nConsole.WriteLine(tracks.Total.ToString()) //Display total album track count\n')),Object(l.b)("hr",null),Object(l.b)("h2",{id:"getalbum"},"GetAlbu