2022-11-18 11:30:09 +00:00
|
|
|
|
using System.Threading;
|
2020-05-07 21:33:29 +01:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
|
{
|
2020-05-31 15:57:58 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Endpoints for retrieving information about one or more albums from the Spotify catalog.
|
|
|
|
|
/// </summary>
|
2020-05-07 21:33:29 +01:00
|
|
|
|
public interface IAlbumsClient
|
|
|
|
|
{
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get Spotify catalog information for multiple albums identified by their Spotify IDs.
|
|
|
|
|
/// </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-28 15:30:17 +01:00
|
|
|
|
/// <remarks>
|
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-multiple-albums
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<AlbumsResponse> GetSeveral(AlbumsRequest request, CancellationToken cancel = default);
|
2020-05-07 21:33:29 +01:00
|
|
|
|
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get Spotify catalog information for a single album.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="albumId">The Spotify ID of the album.</param>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
/// <param name="cancel">The cancellation-token to allow to cancel the request.</param>
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <remarks>
|
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-album
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2020-05-07 21:33:29 +01:00
|
|
|
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")]
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<FullAlbum> Get(string albumId, CancellationToken cancel = default);
|
2020-05-07 21:33:29 +01:00
|
|
|
|
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get Spotify catalog information for a single album.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="albumId">The Spotify ID of the album.</param>
|
|
|
|
|
/// <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-28 15:30:17 +01:00
|
|
|
|
/// <remarks>
|
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-album
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2020-05-07 21:33:29 +01:00
|
|
|
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")]
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<FullAlbum> Get(string albumId, AlbumRequest request, CancellationToken cancel = default);
|
2020-05-07 21:33:29 +01:00
|
|
|
|
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get Spotify catalog information about an album’s tracks.
|
|
|
|
|
/// Optional parameters can be used to limit the number of tracks returned.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="albumId">The Spotify ID of the album.</param>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
/// <param name="cancel">The cancellation-token to allow to cancel the request.</param>
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <remarks>
|
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-albums-tracks
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<Paging<SimpleTrack>> GetTracks(string albumId, CancellationToken cancel = default);
|
2020-05-28 15:30:17 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get Spotify catalog information about an album’s tracks.
|
|
|
|
|
/// Optional parameters can be used to limit the number of tracks returned.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="albumId">The Spotify ID of the album.</param>
|
|
|
|
|
/// <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-28 15:30:17 +01:00
|
|
|
|
/// <remarks>
|
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-an-albums-tracks
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<Paging<SimpleTrack>> GetTracks(string albumId, AlbumTracksRequest request, CancellationToken cancel = default);
|
2020-05-07 21:33:29 +01:00
|
|
|
|
}
|
|
|
|
|
}
|