2020-05-04 22:02:53 +01:00
|
|
|
|
using System.Collections.Generic;
|
2022-11-18 11:30:09 +00:00
|
|
|
|
using System.Threading;
|
2020-05-04 22:02:53 +01:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
|
{
|
2020-05-31 15:57:58 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Endpoints for managing the artists, users, and playlists that a Spotify user follows.
|
|
|
|
|
/// </summary>
|
2020-05-04 22:02:53 +01:00
|
|
|
|
public interface IFollowClient
|
|
|
|
|
{
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Check to see if the current user is following one or more artists or other Spotify users.
|
|
|
|
|
/// </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-check-current-user-follows
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<List<bool>> CheckCurrentUser(FollowCheckCurrentUserRequest request, CancellationToken cancel = default);
|
2020-05-04 22:02:53 +01:00
|
|
|
|
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Check to see if one or more Spotify users are following a specified playlist.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="playlistId">The Spotify ID of the playlist.</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-check-if-user-follows-playlist
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<List<bool>> CheckPlaylist(string playlistId, FollowCheckPlaylistRequest request, CancellationToken cancel = default);
|
2020-05-04 22:02:53 +01:00
|
|
|
|
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Add the current user as a follower of one or more artists or other Spotify users.
|
|
|
|
|
/// </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-follow-artists-users
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<bool> Follow(FollowRequest request, CancellationToken cancel = default);
|
2020-05-04 22:02:53 +01:00
|
|
|
|
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Add the current user as a follower of a playlist.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="playlistId">
|
|
|
|
|
/// The Spotify ID of the playlist.
|
|
|
|
|
/// Any playlist can be followed, regardless of its public/private status,
|
|
|
|
|
/// as long as you know its playlist ID.
|
|
|
|
|
/// </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-follow-playlist
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<bool> FollowPlaylist(string playlistId, CancellationToken cancel = default);
|
2020-05-28 15:30:17 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Add the current user as a follower of a playlist.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="playlistId">
|
|
|
|
|
/// The Spotify ID of the playlist.
|
|
|
|
|
/// Any playlist can be followed, regardless of its public/private status,
|
|
|
|
|
/// as long as you know its playlist ID.
|
|
|
|
|
/// </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-follow-playlist
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<bool> FollowPlaylist(string playlistId, FollowPlaylistRequest request, CancellationToken cancel = default);
|
2020-05-04 22:02:53 +01:00
|
|
|
|
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get the current user’s followed artists.
|
|
|
|
|
/// </summary>
|
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-followed
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<FollowedArtistsResponse> OfCurrentUser(CancellationToken cancel = default);
|
2020-05-28 15:30:17 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get the current user’s followed artists.
|
|
|
|
|
/// </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-followed
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<FollowedArtistsResponse> OfCurrentUser(FollowOfCurrentUserRequest request, CancellationToken cancel = default);
|
2020-05-04 22:02:53 +01:00
|
|
|
|
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Remove the current user as a follower of one or more artists or other Spotify users.
|
|
|
|
|
/// </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-unfollow-artists-users
|
|
|
|
|
/// </remarks>
|
|
|
|
|
/// <returns></returns>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<bool> Unfollow(UnfollowRequest request, CancellationToken cancel = default);
|
2020-05-04 22:02:53 +01:00
|
|
|
|
|
2020-05-28 15:30:17 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Remove the current user as a follower of a playlist.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="playlistId">The Spotify ID of the playlist that is to be no longer followed.</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
|
|
|
|
/// <returns></returns>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// https://developer.spotify.com/documentation/web-api/reference-beta/#endpoint-unfollow-playlist
|
|
|
|
|
/// </remarks>
|
2022-11-18 11:30:09 +00:00
|
|
|
|
Task<bool> UnfollowPlaylist(string playlistId, CancellationToken cancel = default);
|
2020-05-04 22:02:53 +01:00
|
|
|
|
}
|
|
|
|
|
}
|