Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SpotifyAPI.Web/Clients/Interfaces/IUserProfileClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface IUserProfileClient
/// <param name="cancel">The cancellation-token to allow to cancel the request.</param>
/// <remarks>https://developer.spotify.com/documentation/web-api/reference/get-users-top-artists-and-tracks</remarks>
/// <exception cref="APIUnauthorizedException">Thrown if the client is not authenticated.</exception>
Task<UsersTopTracksResponse> GetTopTracks(UsersTopItemsRequest request, CancellationToken cancel = default);
Task<CursorPaging<FullTrack>> GetTopTracks(UsersTopItemsRequest request, CancellationToken cancel = default);

/// <summary>
/// Get Top arsists for the current user
Expand All @@ -45,6 +45,6 @@ public interface IUserProfileClient
/// <param name="cancel">The cancellation-token to allow to cancel the request.</param>
/// <remarks>https://developer.spotify.com/documentation/web-api/reference/get-users-top-artists-and-tracks</remarks>
/// <exception cref="APIUnauthorizedException">Thrown if the client is not authenticated.</exception>
Task<UsersTopArtistsResponse> GetTopArtists(UsersTopItemsRequest request, CancellationToken cancel = default);
Task<CursorPaging<FullArtist>> GetTopArtists(UsersTopItemsRequest request, CancellationToken cancel = default);
}
}
8 changes: 4 additions & 4 deletions SpotifyAPI.Web/Clients/UserProfileClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ public Task<PublicUser> Get(string userId, CancellationToken cancel = default)
return API.Get<PublicUser>(SpotifyUrls.User(userId), cancel);
}

public Task<UsersTopTracksResponse> GetTopTracks(UsersTopItemsRequest request, CancellationToken cancel = default)
public Task<CursorPaging<FullTrack>> GetTopTracks(UsersTopItemsRequest request, CancellationToken cancel = default)
{
Ensure.ArgumentNotNull(request, nameof(request));

return API.Get<UsersTopTracksResponse>(SpotifyUrls.TopTracks(), request.BuildQueryParams(), cancel);
return API.Get<CursorPaging<FullTrack>>(SpotifyUrls.TopTracks(), request.BuildQueryParams(), cancel);

}

public Task<UsersTopArtistsResponse> GetTopArtists(UsersTopItemsRequest request, CancellationToken cancel = default)
public Task<CursorPaging<FullArtist>> GetTopArtists(UsersTopItemsRequest request, CancellationToken cancel = default)
{
Ensure.ArgumentNotNull(request, nameof(request));

return API.Get<UsersTopArtistsResponse>(SpotifyUrls.TopArtists(), request.BuildQueryParams(), cancel);
return API.Get<CursorPaging<FullArtist>>(SpotifyUrls.TopArtists(), request.BuildQueryParams(), cancel);
}
}
}