2022-11-18 11:30:09 +00:00
|
|
|
using System.Threading;
|
2020-05-07 12:48:31 +01:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
2020-05-04 22:04:59 +01:00
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
{
|
2020-05-31 15:57:58 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Endpoints for retrieving information about one or more tracks from the Spotify catalog.
|
|
|
|
/// </summary>
|
2020-05-04 22:04:59 +01:00
|
|
|
public interface ITracksClient
|
|
|
|
{
|
2020-05-31 15:57:58 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Get Spotify catalog information for multiple tracks based on 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-31 15:57:58 +01:00
|
|
|
/// <remarks>
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-several-tracks
|
|
|
|
/// </remarks>
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
Task<TracksResponse> GetSeveral(TracksRequest request, CancellationToken cancel = default);
|
2020-05-07 12:48:31 +01:00
|
|
|
|
2020-05-31 15:57:58 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Get a detailed audio analysis for a single track identified by its unique Spotify ID.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="trackId">The Spotify ID for the track.</param>
|
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-audio-analysis
|
|
|
|
/// </remarks>
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
Task<TrackAudioAnalysis> GetAudioAnalysis(string trackId, CancellationToken cancel = default);
|
2020-05-07 12:48:31 +01:00
|
|
|
|
2020-05-31 15:57:58 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Get audio feature information for a single track identified by its unique Spotify ID.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="trackId">The Spotify ID for the track.</param>
|
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-audio-features
|
|
|
|
/// </remarks>
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
Task<TrackAudioFeatures> GetAudioFeatures(string trackId, CancellationToken cancel = default);
|
2020-05-07 12:48:31 +01:00
|
|
|
|
2020-05-31 15:57:58 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Get Spotify catalog information for a single track identified by its unique Spotify ID.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="trackId">The Spotify ID for the track.</param>
|
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-track
|
|
|
|
/// </remarks>
|
|
|
|
/// <returns></returns>
|
2020-05-07 12:48:31 +01:00
|
|
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")]
|
2022-11-18 11:30:09 +00:00
|
|
|
Task<FullTrack> Get(string trackId, CancellationToken cancel = default);
|
2020-05-31 15:57:58 +01:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get Spotify catalog information for a single track identified by its unique Spotify ID.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="trackId">The Spotify ID for the track.</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-31 15:57:58 +01:00
|
|
|
/// <returns></returns>
|
2020-05-07 12:48:31 +01:00
|
|
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")]
|
2022-11-18 11:30:09 +00:00
|
|
|
Task<FullTrack> Get(string trackId, TrackRequest request, CancellationToken cancel = default);
|
2020-05-07 12:48:31 +01:00
|
|
|
|
2020-05-31 15:57:58 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Get audio features for multiple tracks based on 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-31 15:57:58 +01:00
|
|
|
/// <remarks>
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-get-several-audio-features
|
|
|
|
/// </remarks>
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
Task<TracksAudioFeaturesResponse> GetSeveralAudioFeatures(TracksAudioFeaturesRequest request, CancellationToken cancel = default);
|
2020-05-04 22:04:59 +01:00
|
|
|
}
|
|
|
|
}
|