mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +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")]
|
[JsonProperty("uri")]
|
||||||
public String Uri { get; set; }
|
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());
|
JArray array = new JArray(ids.ToArray());
|
||||||
return UploadData<ErrorResponse>("https://api.spotify.com/v1/me/tracks/", array.ToString(Formatting.None), "PUT");
|
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 == "")
|
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
|
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)
|
public ErrorResponse RemoveSavedTracks(List<String> ids)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user