Forgot to add SavedAlbum-Object...

This commit is contained in:
Johnny @PC 2015-12-07 14:13:24 +01:00
parent 8017a02a10
commit 8b67917682
2 changed files with 13 additions and 4 deletions

View File

@ -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")]

View File

@ -989,11 +989,11 @@ namespace SpotifyAPI.Web
/// <param name="market">An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.</param>
/// <returns></returns>
/// <remarks>AUTH NEEDED</remarks>
public Paging<SavedTrack> GetSavedAlbums(int limit = 20, int offset = 0, String market = "")
public Paging<SavedAlbum> GetSavedAlbums(int limit = 20, int offset = 0, String market = "")
{
if (!UseAuth)
throw new InvalidOperationException("Auth is required for GetSavedAlbums");
return DownloadData<Paging<SavedTrack>>(_builder.GetSavedAlbums(limit, offset, market));
return DownloadData<Paging<SavedAlbum>>(_builder.GetSavedAlbums(limit, offset, market));
}
/// <summary>
@ -1004,11 +1004,11 @@ namespace SpotifyAPI.Web
/// <param name="market">An ISO 3166-1 alpha-2 country code. Provide this parameter if you want to apply Track Relinking.</param>
/// <returns></returns>
/// <remarks>AUTH NEEDED</remarks>
public async Task<Paging<SavedTrack>> GetSavedAlbumsAsync(int limit = 20, int offset = 0, String market = "")
public async Task<Paging<SavedAlbum>> GetSavedAlbumsAsync(int limit = 20, int offset = 0, String market = "")
{
if (!UseAuth)
throw new InvalidOperationException("Auth is required for GetSavedAlbumsAsync");
return await DownloadDataAsync<Paging<SavedTrack>>(_builder.GetSavedAlbums(limit, offset, market));
return await DownloadDataAsync<Paging<SavedAlbum>>(_builder.GetSavedAlbums(limit, offset, market));
}
/// <summary>