2020-05-15 19:06:24 +01:00
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Used when requesting a refreshed token from spotify oauth services (Authorization Code Auth)
|
|
|
|
/// </summary>
|
|
|
|
public class AuthorizationCodeRefreshRequest
|
|
|
|
{
|
2020-05-30 22:20:42 +01:00
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="clientId">The Client ID of your Spotify Application (See Spotify Dev Dashboard)</param>
|
|
|
|
/// <param name="clientSecret">The Client Secret of your Spotify Application (See Spotify Dev Dashboard)</param>
|
|
|
|
/// <param name="refreshToken">The refresh token received from an earlier authorization code grant</param>
|
2020-05-15 19:06:24 +01:00
|
|
|
public AuthorizationCodeRefreshRequest(string clientId, string clientSecret, string refreshToken)
|
|
|
|
{
|
|
|
|
Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId));
|
|
|
|
Ensure.ArgumentNotNullOrEmptyString(clientSecret, nameof(clientSecret));
|
|
|
|
Ensure.ArgumentNotNullOrEmptyString(refreshToken, nameof(refreshToken));
|
|
|
|
|
|
|
|
ClientId = clientId;
|
|
|
|
ClientSecret = clientSecret;
|
|
|
|
RefreshToken = refreshToken;
|
|
|
|
}
|
|
|
|
|
2020-05-30 22:20:42 +01:00
|
|
|
/// <summary>
|
|
|
|
/// The refresh token received from an earlier authorization code grant
|
|
|
|
/// </summary>
|
|
|
|
/// <value></value>
|
2020-05-15 19:06:24 +01:00
|
|
|
public string RefreshToken { get; }
|
2020-05-30 22:20:42 +01:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The Client ID of your Spotify Application (See Spotify Dev Dashboard)
|
|
|
|
/// </summary>
|
|
|
|
/// <value></value>
|
2020-05-15 19:06:24 +01:00
|
|
|
public string ClientId { get; }
|
2020-05-30 22:20:42 +01:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The Client Secret of your Spotify Application (See Spotify Dev Dashboard)
|
|
|
|
/// </summary>
|
|
|
|
/// <value></value>
|
2020-05-15 19:06:24 +01:00
|
|
|
public string ClientSecret { get; }
|
|
|
|
}
|
|
|
|
}
|
2020-05-25 17:00:38 +01:00
|
|
|
|