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 /// /// The request-model which contains required and optional parameters. /// /// 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 /// /// The request-model which contains required and optional parameters. /// /// https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow /// /// Task RequestToken(AuthorizationCodeRefreshRequest request); /// /// Reequest an initial token via Authorization Code Auth /// /// The request-model which contains required and optional parameters. /// /// https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow /// /// Task RequestToken(AuthorizationCodeTokenRequest request); /// /// Swaps out a received code with a access token using a remote server /// /// The request-model which contains required and optional parameters. /// /// https://developer.spotify.com/documentation/ios/guides/token-swap-and-refresh/ /// /// Task RequestToken(TokenSwapTokenRequest request); /// /// Gets a refreshed access token using an already received refresh token using a remote server /// /// /// /// https://developer.spotify.com/documentation/ios/guides/token-swap-and-refresh/ /// /// Task RequestToken(TokenSwapRefreshRequest request); } }