2022-11-18 11:30:09 +00:00
|
|
|
|
using System.Threading;
|
2020-05-08 11:09:59 +01:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
|
{
|
2020-05-31 15:57:58 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Endpoints for retrieving information about the user’s listening habits.
|
|
|
|
|
/// </summary>
|
2020-05-08 11:09:59 +01:00
|
|
|
|
public interface IPersonalizationClient
|
|
|
|
|
{
|
2020-05-30 22:20:42 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get the current user’s top tracks based on calculated affinity.
|
|
|
|
|
/// </summary>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
/// <param name="cancel">The cancellation-token to allow to cancel the request.</param>
|
2020-05-30 22:20:42 +01:00
|
|
|
|
/// <remarks>
|
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-top-artists-and-tracks
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<Paging<FullTrack>> GetTopTracks(CancellationToken cancel = default);
|
2020-05-30 22:20:42 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get the current user’s top tracks based on calculated affinity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
/// <param name="cancel">The cancellation-token to allow to cancel the request.</param>
|
2020-05-30 22:20:42 +01:00
|
|
|
|
/// <remarks>
|
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-top-artists-and-tracks
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<Paging<FullTrack>> GetTopTracks(PersonalizationTopRequest request, CancellationToken cancel = default);
|
2020-05-08 11:09:59 +01:00
|
|
|
|
|
2020-05-30 22:20:42 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get the current user’s top artists based on calculated affinity.
|
|
|
|
|
/// </summary>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
/// <param name="cancel">The cancellation-token to allow to cancel the request.</param>
|
2020-05-30 22:20:42 +01:00
|
|
|
|
/// <remarks>
|
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-top-artists-and-tracks
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<Paging<FullArtist>> GetTopArtists(CancellationToken cancel = default);
|
2020-05-30 22:20:42 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get the current user’s top artists based on calculated affinity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request">The request-model which contains required and optional parameters.</param>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
/// <param name="cancel">The cancellation-token to allow to cancel the request.</param>
|
2020-05-30 22:20:42 +01:00
|
|
|
|
/// <remarks>
|
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-top-artists-and-tracks
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<Paging<FullArtist>> GetTopArtists(PersonalizationTopRequest request, CancellationToken cancel = default);
|
2020-05-08 11:09:59 +01:00
|
|
|
|
}
|
|
|
|
|
}
|