Skip to content

Commit 05721ef

Browse files
committed
Added missing docs
1 parent a6ffa96 commit 05721ef

File tree

3 files changed

+64
-1
lines changed

3 files changed

+64
-1
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
## GetUsersTopTracks
2+
3+
> Get the current user’s top tracks based on calculated affinity.
4+
5+
**Parameters**
6+
7+
|Name|Description|Example|
8+
|--------------|-------------------------|-------------------------|
9+
|[timeRange]| Over what time frame the affinities are compute. | `TimeRangeType.MediumTerm`
10+
|[limit]| The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. | `20`
11+
|[offset]| 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. | `0`
12+
13+
Returns a [FullTrack](https://developer.spotify.com/web-api/object-model/#track-object-full) wrapped inside a [Paging-object](https://developer.spotify.com/web-api/object-model/#paging-object)
14+
15+
**Usage**
16+
17+
```
18+
Paging<FullTrack> tracks = _spotify.GetUsersTopTracks();
19+
tracks.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Track-Names (max 20)
20+
Console.WriteLine(tracks.Total.ToString()) //Display total album track count
21+
```
22+
23+
---
24+
## GetUsersTopArtists
25+
> Get the current user’s top artists based on calculated affinity.
26+
27+
**Parameters**
28+
29+
|Name|Description|Example|
30+
|--------------|-------------------------|-------------------------|
31+
|[timeRange]| Over what time frame the affinities are compute. | `TimeRangeType.MediumTerm`
32+
|[limit]| The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. | `20`
33+
|[offset]| 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. | `0`
34+
35+
Returns a [FullArtist](https://developer.spotify.com/web-api/object-model/#artist-object-full) wrapped inside a [Paging-object](https://developer.spotify.com/web-api/object-model/#paging-object)
36+
37+
**Usage**
38+
```
39+
Paging<FullArtist> artists = _spotify.GetUsersTopArtists();
40+
artists.Items.ForEach(item => Console.WriteLine(item.Name)); //Display all fetched Artist-Names (max 20)
41+
```
42+
43+
---
44+
## GetUsersRecentlyPlayedTracks
45+
> Get tracks from the current user’s recent play history.
46+
47+
**Parameters**
48+
49+
|Name|Description|Example|
50+
|--------------|-------------------------|-------------------------|
51+
|[limit]| The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. | `20`
52+
|[after]| Returns all items after (but not including) this cursor position. | `DateTime.Now.AddDays(-1)`
53+
|[before]| Returns all items before (but not including) this cursor position. | `DateTime.Now.AddDays(-1)`
54+
55+
Returns a `PlayHistory` wrapped inside a [CursorPaging-object](https://developer.spotify.com/web-api/object-model/#cursor-based-paging-object)
56+
57+
**Usage**
58+
```
59+
CursorPaging<PlayHistory> histories = _spotify.GetUsersRecentlyPlayedTracks();
60+
histories.Items.ForEach(item => Console.WriteLine(item.Track.Name));
61+
```
62+
63+
---

SpotifyAPI.Docs/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pages:
1111
- '- Browse': 'SpotifyWebAPI/browse.md'
1212
- '- Follow': 'SpotifyWebAPI/follow.md'
1313
- '- Library': 'SpotifyWebAPI/library.md'
14+
- '- Personalization': 'SpotifyWebAPI/personalization.md'
1415
- '- Player': 'SpotifyWebAPI/player.md'
1516
- '- Playlists': 'SpotifyWebAPI/playlists.md'
1617
- '- Profiles': 'SpotifyWebAPI/profiles.md'

SpotifyAPI/Web/SpotifyWebAPI.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2148,7 +2148,6 @@ public T UploadData<T>(string url, string uploadData, string method = "POST") wh
21482148

21492149
response.Item2.AddResponseInfo(response.Item1);
21502150
lastError = response.Item2.Error;
2151-
21522151
triesLeft -= 1;
21532152

21542153
} while (UseAutoRetry && triesLeft > 0 && lastError != null && RetryErrorCodes.Contains(lastError.Status));

0 commit comments

Comments
 (0)