Spotify.NET/SpotifyAPI.Web/Clients/Interfaces/IPersonalizationClient.cs

54 lines
2.3 KiB
C#
Raw Normal View History

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