From 8b679176825212f02be30e606b89566676d820d2 Mon Sep 17 00:00:00 2001 From: "Johnny @PC" Date: Mon, 7 Dec 2015 14:13:24 +0100 Subject: [PATCH] Forgot to add SavedAlbum-Object... --- SpotifyAPI/Web/Models/GeneralModels.cs | 9 +++++++++ SpotifyAPI/Web/SpotifyWebAPI.cs | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/SpotifyAPI/Web/Models/GeneralModels.cs b/SpotifyAPI/Web/Models/GeneralModels.cs index bccfae85..2ecf94e7 100644 --- a/SpotifyAPI/Web/Models/GeneralModels.cs +++ b/SpotifyAPI/Web/Models/GeneralModels.cs @@ -142,6 +142,15 @@ namespace SpotifyAPI.Web.Models public FullTrack Track { get; set; } } + public class SavedAlbum + { + [JsonProperty("added_at")] + public DateTime AddedAt { get; set; } + + [JsonProperty("album")] + public SavedAlbum Album { get; set; } + } + public class Cursor { [JsonProperty("after")] diff --git a/SpotifyAPI/Web/SpotifyWebAPI.cs b/SpotifyAPI/Web/SpotifyWebAPI.cs index 25e93a71..c99dfd7a 100644 --- a/SpotifyAPI/Web/SpotifyWebAPI.cs +++ b/SpotifyAPI/Web/SpotifyWebAPI.cs @@ -989,11 +989,11 @@ namespace SpotifyAPI.Web /// An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking. /// /// AUTH NEEDED - public Paging GetSavedAlbums(int limit = 20, int offset = 0, String market = "") + public Paging GetSavedAlbums(int limit = 20, int offset = 0, String market = "") { if (!UseAuth) throw new InvalidOperationException("Auth is required for GetSavedAlbums"); - return DownloadData>(_builder.GetSavedAlbums(limit, offset, market)); + return DownloadData>(_builder.GetSavedAlbums(limit, offset, market)); } /// @@ -1004,11 +1004,11 @@ namespace SpotifyAPI.Web /// An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking. /// /// AUTH NEEDED - public async Task> GetSavedAlbumsAsync(int limit = 20, int offset = 0, String market = "") + public async Task> GetSavedAlbumsAsync(int limit = 20, int offset = 0, String market = "") { if (!UseAuth) throw new InvalidOperationException("Auth is required for GetSavedAlbumsAsync"); - return await DownloadDataAsync>(_builder.GetSavedAlbums(limit, offset, market)); + return await DownloadDataAsync>(_builder.GetSavedAlbums(limit, offset, market)); } ///