mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-25 23:46:27 +00:00
1 line
6.0 KiB
JavaScript
1 line
6.0 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{261:function(t,e,r){"use strict";r.r(e);var a=r(28),s=Object(a.a)({},function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[r("h1",{attrs:{id:"personalization"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#personalization","aria-hidden":"true"}},[t._v("#")]),t._v(" Personalization")]),t._v(" "),r("h2",{attrs:{id:"getuserstoptracks"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#getuserstoptracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetUsersTopTracks")]),t._v(" "),r("blockquote",[r("p",[t._v("Get the current user’s top tracks based on calculated affinity.")])]),t._v(" "),r("p",[r("strong",[t._v("Parameters")])]),t._v(" "),r("table",[r("thead",[r("tr",[r("th",[t._v("Name")]),t._v(" "),r("th",[t._v("Description")]),t._v(" "),r("th",[t._v("Example")])])]),t._v(" "),r("tbody",[r("tr",[r("td",[t._v("[timeRange]")]),t._v(" "),r("td",[t._v("Over what time frame the affinities are compute.")]),t._v(" "),r("td",[r("code",[t._v("TimeRangeType.MediumTerm")])])]),t._v(" "),r("tr",[r("td",[t._v("[limit]")]),t._v(" "),r("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),r("td",[r("code",[t._v("20")])])]),t._v(" "),r("tr",[r("td",[t._v("[offset]")]),t._v(" "),r("td",[t._v("The index of the first entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities.")]),t._v(" "),r("td",[r("code",[t._v("0")])])])])]),t._v(" "),r("p",[t._v("Returns a "),r("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#track-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullTrack"),r("OutboundLink")],1),t._v(" wrapped inside a "),r("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paging-object"),r("OutboundLink")],1)]),t._v(" "),r("p",[r("strong",[t._v("Usage")])]),t._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[t._v("Paging<FullTrack> tracks = _spotify.GetUsersTopTracks();\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")])])]),r("hr"),t._v(" "),r("h2",{attrs:{id:"getuserstopartists"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#getuserstopartists","aria-hidden":"true"}},[t._v("#")]),t._v(" GetUsersTopArtists")]),t._v(" "),r("blockquote",[r("p",[t._v("Get the current user’s top artists based on calculated affinity.")])]),t._v(" "),r("p",[r("strong",[t._v("Parameters")])]),t._v(" "),r("table",[r("thead",[r("tr",[r("th",[t._v("Name")]),t._v(" "),r("th",[t._v("Description")]),t._v(" "),r("th",[t._v("Example")])])]),t._v(" "),r("tbody",[r("tr",[r("td",[t._v("[timeRange]")]),t._v(" "),r("td",[t._v("Over what time frame the affinities are compute.")]),t._v(" "),r("td",[r("code",[t._v("TimeRangeType.MediumTerm")])])]),t._v(" "),r("tr",[r("td",[t._v("[limit]")]),t._v(" "),r("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),r("td",[r("code",[t._v("20")])])]),t._v(" "),r("tr",[r("td",[t._v("[offset]")]),t._v(" "),r("td",[t._v("The index of the first entity to return. Default: 0 (i.e., the first track). Use with limit to get the next set of entities.")]),t._v(" "),r("td",[r("code",[t._v("0")])])])])]),t._v(" "),r("p",[t._v("Returns a "),r("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#artist-object-full",target:"_blank",rel:"noopener noreferrer"}},[t._v("FullArtist"),r("OutboundLink")],1),t._v(" wrapped inside a "),r("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("Paging-object"),r("OutboundLink")],1)]),t._v(" "),r("p",[r("strong",[t._v("Usage")])]),t._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[t._v("Paging<FullArtist> artists = _spotify.GetUsersTopArtists();\nartists.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Artist-Names (max 20)\n")])])]),r("hr"),t._v(" "),r("h2",{attrs:{id:"getusersrecentlyplayedtracks"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#getusersrecentlyplayedtracks","aria-hidden":"true"}},[t._v("#")]),t._v(" GetUsersRecentlyPlayedTracks")]),t._v(" "),r("blockquote",[r("p",[t._v("Get tracks from the current user’s recent play history.")])]),t._v(" "),r("p",[r("strong",[t._v("Parameters")])]),t._v(" "),r("table",[r("thead",[r("tr",[r("th",[t._v("Name")]),t._v(" "),r("th",[t._v("Description")]),t._v(" "),r("th",[t._v("Example")])])]),t._v(" "),r("tbody",[r("tr",[r("td",[t._v("[limit]")]),t._v(" "),r("td",[t._v("The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.")]),t._v(" "),r("td",[r("code",[t._v("20")])])]),t._v(" "),r("tr",[r("td",[t._v("[after]")]),t._v(" "),r("td",[t._v("Returns all items after (but not including) this cursor position.")]),t._v(" "),r("td",[r("code",[t._v("DateTime.Now.AddDays(-1)")])])]),t._v(" "),r("tr",[r("td",[t._v("[before]")]),t._v(" "),r("td",[t._v("Returns all items before (but not including) this cursor position.")]),t._v(" "),r("td",[r("code",[t._v("DateTime.Now.AddDays(-1)")])])])])]),t._v(" "),r("p",[t._v("Returns a "),r("code",[t._v("PlayHistory")]),t._v(" wrapped inside a "),r("a",{attrs:{href:"https://developer.spotify.com/web-api/object-model/#cursor-based-paging-object",target:"_blank",rel:"noopener noreferrer"}},[t._v("CursorPaging-object"),r("OutboundLink")],1)]),t._v(" "),r("p",[r("strong",[t._v("Usage")])]),t._v(" "),r("div",{staticClass:"language- extra-class"},[r("pre",{pre:!0,attrs:{class:"language-text"}},[r("code",[t._v("CursorPaging<PlayHistory> histories = _spotify.GetUsersRecentlyPlayedTracks();\nhistories.Items.ForEach(item => Console.WriteLine(item.Track.Name));\n")])])]),r("hr")])},[],!1,null,null,null);e.default=s.exports}}]); |