using System.Threading.Tasks;
namespace SpotifyAPI.Web
{
///
/// An OAuth Client, which allows to get inital and updated tokens from the Spotify Service
///
public interface IOAuthClient
{
///
/// Requests a new token using client_ids and client_secrets.
/// If the token is expired, simply call the funtion again to get a new token
///
///
///
/// https://developer.spotify.com/documentation/general/guides/authorization-guide/#client-credentials-flow
///
///
Task RequestToken(ClientCredentialsRequest request);
///
/// Refresh an already received token via Authorization Code Auth
///
///
///
/// https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow
///
///
Task RequestToken(AuthorizationCodeRefreshRequest request);
///
/// Reequest an initial token via Authorization Code Auth
///
///
///
/// https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow
///
///
Task RequestToken(AuthorizationCodeTokenRequest request);
}
}