documentation for credentials authenticator

This commit is contained in:
Jonas Dellinger 2020-06-07 13:30:58 +02:00
parent ec08baf80b
commit 3e0c4e479b

View File

@ -10,16 +10,28 @@ namespace SpotifyAPI.Web
public class ClientCredentialsAuthenticator : IAuthenticator public class ClientCredentialsAuthenticator : IAuthenticator
{ {
/// <summary> /// <summary>
/// Initiate a new instance. The first token will be fetched when the first API call occurs /// Initiate a new instance. The initial token will be fetched when the first API call occurs.
/// </summary> /// </summary>
/// <param name="clientId"> /// <param name="clientId">
/// The ClientID, defined in a spotify application in your Spotify Developer Dashboard /// The ClientID, defined in a spotify application in your Spotify Developer Dashboard.
/// </param> /// </param>
/// <param name="clientSecret"> /// <param name="clientSecret">
/// The ClientID, defined in a spotify application in your Spotify Developer Dashboard /// The ClientSecret, defined in a spotify application in your Spotify Developer Dashboard.
/// </param> /// </param>
public ClientCredentialsAuthenticator(string clientId, string clientSecret) : this(clientId, clientSecret, null) { } public ClientCredentialsAuthenticator(string clientId, string clientSecret) : this(clientId, clientSecret, null) { }
/// <summary>
/// Initiate a new instance. The initial token is provided and will be used if not expired
/// </summary>
/// <param name="clientId">
/// The ClientID, defined in a spotify application in your Spotify Developer Dashboard.
/// </param>
/// <param name="clientSecret">
/// The ClientSecret, defined in a spotify application in your Spotify Developer Dashboard.
/// </param>
/// <param name="token">
/// An optional inital token received earlier.
/// </param>
public ClientCredentialsAuthenticator(string clientId, string clientSecret, ClientCredentialsTokenResponse? token) public ClientCredentialsAuthenticator(string clientId, string clientSecret, ClientCredentialsTokenResponse? token)
{ {
Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId)); Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId));