2022-11-18 11:30:09 +00:00
|
|
|
|
using System.Threading;
|
2020-05-01 19:05:28 +01:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
|
{
|
2020-05-13 17:25:42 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Endpoints for retrieving information about a user’s profile.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>https://developer.spotify.com/documentation/web-api/reference-beta/#category-user-profile</remarks>
|
2020-05-01 19:05:28 +01:00
|
|
|
|
public interface IUserProfileClient
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2020-05-13 17:25:42 +01:00
|
|
|
|
/// Get detailed profile information about the current user (including the current user’s username).
|
2020-05-01 19:05:28 +01:00
|
|
|
|
/// </summary>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
/// <param name="cancel">The cancellation-token to allow to cancel the request.</param>
|
2020-05-31 15:57:58 +01:00
|
|
|
|
/// <remarks>
|
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-current-users-profile
|
|
|
|
|
/// </remarks>
|
2020-05-01 19:05:28 +01:00
|
|
|
|
/// <exception cref="APIUnauthorizedException">Thrown if the client is not authenticated.</exception>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<PrivateUser> Current(CancellationToken cancel = default);
|
2020-05-01 19:05:28 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2020-05-13 17:25:42 +01:00
|
|
|
|
/// Get public profile information about a Spotify user.
|
2020-05-01 19:05:28 +01:00
|
|
|
|
/// </summary>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
/// <param name="userId">The user id.</param>
|
|
|
|
|
/// <param name="cancel">The cancellation-token to allow to cancel the request.</param>
|
2020-05-13 17:25:42 +01:00
|
|
|
|
/// <remarks>https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-users-profile</remarks>
|
2020-05-01 19:05:28 +01:00
|
|
|
|
/// <exception cref="APIUnauthorizedException">Thrown if the client is not authenticated.</exception>
|
2020-05-05 14:30:00 +01:00
|
|
|
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")]
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<PublicUser> Get(string userId, CancellationToken cancel = default);
|
2024-01-19 18:56:07 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get Top tracks for the current user
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request">The query params to send to get Top Artists </param>
|
|
|
|
|
/// <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);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get Top arsists for the current user
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request">The query params to send to get Top Artists</param>
|
|
|
|
|
/// <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);
|
2020-05-01 19:05:28 +01:00
|
|
|
|
}
|
|
|
|
|
}
|