<svgxmlns="http://www.w3.org/2000/svg"aria-hidden="true"x="0px"y="0px"viewBox="0 0 100 100"width="15"height="15"class="icon outbound"><pathfill="currentColor"d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor"points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav><ulclass="sidebar-links"><li><sectionclass="sidebar-group depth-0"><pclass="sidebar-heading open"><span>Personalization</span><!----></p><ulclass="sidebar-links sidebar-group-items"><li><ahref="/SpotifyAPI-NET/web/personalization.html#getuserstoptracks"class="sidebar-link">GetUsersTopTracks</a></li><li><ahref="/SpotifyAPI-NET/web/personalization.html#getuserstopartists"class="sidebar-link">GetUsersTopArtists</a></li><li><ahref="/SpotifyAPI-NET/web/personalization.html#getusersrecentlyplayedtracks"class="sidebar-link">GetUsersRecentlyPlayedTracks</a></li></ul></section></li></ul></aside><mainclass="page"><divclass="theme-default-content content__default"><h1id="personalization"><ahref="#personalization"aria-hidden="true"class="header-anchor">#</a> Personalization</h1><h2id="getuserstoptracks"><ahref="#getuserstoptracks"aria-hidden="true"class="header-anchor">#</a> GetUsersTopTracks</h2><blockquote><p>Get the current user’s top tracks based on calculated affinity.</p></blockquote><p><strong>Parameters</strong></p><table><thead><tr><th>Name</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>[timeRange]</td><td>Over what time frame the affinities are compute.</td><td><code>TimeRangeType.MediumTerm</code></td></tr><tr><td>[limit]</td><td>The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.</td><td><code>20</code></td></tr><tr><td>[offset]</td><td>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.</td><td><code>0</code></td></tr></tbody></table><p>Returns a <ahref="https://developer.spotify.com/web-api/object-model/#track-object-full"target="_blank"rel="noopener noreferrer">FullTrack<svgxmlns="http://www.w3.org/2000/svg"aria-hidden="true"x="0px"y="0px"viewBox="0 0 100 100"width="15"height="15"class="icon outbound"><pathfill="currentColor"d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor"points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a> wrapped inside a <ahref="https://developer.spotify.com/web-api/object-model/#paging-object"target="_blank"rel="noopener noreferrer">Paging-object<svgxmlns="http://www.w3.org/2000/svg"aria-hidden="true"x="0px"y="0px"viewBox="0 0 100 100"width="15"height="15"class="icon outbound"><pathfill="currentColor"d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor"points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p><p><strong>Usage</strong></p><divclass="language- extra-class"><preclass="language-text"><code>Paging<FullTrack> tracks = _spotify.GetUsersTopTracks();
tracks.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Track-Names (max 20)
Console.WriteLine(tracks.Total.ToString()) //Display total album track count
</code></pre></div><hr><h2id="getuserstopartists"><ahref="#getuserstopartists"aria-hidden="true"class="header-anchor">#</a> GetUsersTopArtists</h2><blockquote><p>Get the current user’s top artists based on calculated affinity.</p></blockquote><p><strong>Parameters</strong></p><table><thead><tr><th>Name</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>[timeRange]</td><td>Over what time frame the affinities are compute.</td><td><code>TimeRangeType.MediumTerm</code></td></tr><tr><td>[limit]</td><td>The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.</td><td><code>20</code></td></tr><tr><td>[offset]</td><td>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.</td><td><code>0</code></td></tr></tbody></table><p>Returns a <ahref="https://developer.spotify.com/web-api/object-model/#artist-object-full"target="_blank"rel="noopener noreferrer">FullArtist<svgxmlns="http://www.w3.org/2000/svg"aria-hidden="true"x="0px"y="0px"viewBox="0 0 100 100"width="15"height="15"class="icon outbound"><pathfill="currentColor"d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor"points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a> wrapped inside a <ahref="https://developer.spotify.com/web-api/object-model/#paging-object"target="_blank"rel="noopener noreferrer">Paging-object<svgxmlns="http://www.w3.org/2000/svg"aria-hidden="true"x="0px"y="0px"viewBox="0 0 100 100"width="15"height="15"class="icon outbound"><pathfill="currentColor"d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor"points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p><p><strong>Usage</strong></p><divclass="language- extra-class"><preclass="language-text"><code>Paging<FullArtist> artists = _spotify.GetUsersTopArtists();
artists.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Artist-Names (max 20)
</code></pre></div><hr><h2id="getusersrecentlyplayedtracks"><ahref="#getusersrecentlyplayedtracks"aria-hidden="true"class="header-anchor">#</a> GetUsersRecentlyPlayedTracks</h2><blockquote><p>Get tracks from the current user’s recent play history.</p></blockquote><p><strong>Parameters</strong></p><table><thead><tr><th>Name</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>[limit]</td><td>The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.</td><td><code>20</code></td></tr><tr><td>[after]</td><td>Returns all items after (but not including) this cursor position.</td><td><code>DateTime.Now.AddDays(-1)</code></td></tr><tr><td>[before]</td><td>Returns all items before (but not including) this cursor position.</td><td><code>DateTime.Now.AddDays(-1)</code></td></tr></tbody></table><p>Returns a <code>PlayHistory</code> wrapped inside a <ahref="https://developer.spotify.com/web-api/object-model/#cursor-based-paging-object"target="_blank"rel="noopener noreferrer">CursorPaging-object<svgxmlns="http://www.w3.org/2000/svg"aria-hidden="true"x="0px"y="0px"viewBox="0 0 100 100"width="15"height="15"class="icon outbound"><pathfill="currentColor"d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor"points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p><p><strong>Usage</strong></p><divclass="language- extra-class"><preclass="language-text"><code>CursorPaging<PlayHistory> histories = _spotify.GetUsersRecentlyPlayedTracks();