mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-23 22:56:25 +00:00
Fixed GetSavedTracks (Thanks to @whereismyspaceship )
This commit is contained in:
parent
3afbea32a6
commit
1f359dfa74
@ -113,4 +113,12 @@ namespace SpotifyAPI.SpotifyWebAPI.Models
|
||||
[JsonProperty("uri")]
|
||||
public String Uri { get; set; }
|
||||
}
|
||||
|
||||
public class SavedTrack
|
||||
{
|
||||
[JsonProperty("added_at")]
|
||||
public DateTime AddedAt { get; set; }
|
||||
[JsonProperty("track")]
|
||||
public FullTrack Track { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -84,12 +84,12 @@ namespace SpotifyAPI.SpotifyWebAPI
|
||||
JArray array = new JArray(ids.ToArray());
|
||||
return UploadData<ErrorResponse>("https://api.spotify.com/v1/me/tracks/", array.ToString(Formatting.None), "PUT");
|
||||
}
|
||||
public Paging<FullTrack> GetSavedTracks(String market = "")
|
||||
public Paging<SavedTrack> GetSavedTracks(String market = "")
|
||||
{
|
||||
if(market == "")
|
||||
return DownloadData<Paging<FullTrack>>("https://api.spotify.com/v1/me/tracks");
|
||||
return DownloadData<Paging<SavedTrack>>("https://api.spotify.com/v1/me/tracks");
|
||||
else
|
||||
return DownloadData<Paging<FullTrack>>("https://api.spotify.com/v1/me/tracks?market=" + market);
|
||||
return DownloadData<Paging<SavedTrack>>("https://api.spotify.com/v1/me/tracks?market=" + market);
|
||||
}
|
||||
public ErrorResponse RemoveSavedTracks(List<String> ids)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user