/// <summary> /// Creates an authorization url that can be used to authorize access to a user's account. /// </summary> /// <param name="oAuth2ResponseType">Determines if Imgur returns a Code, a PIN code, or an opaque Token.</param> /// <param name="state"> /// This optional parameter indicates any state which may be useful to your application upon receipt of /// the response. /// </param> /// <returns></returns> public string GetAuthorizationUrl(OAuth2ResponseType oAuth2ResponseType, string state = null) { var responseType = oAuth2ResponseType.ToString().ToLowerInvariant(); var url = $"{AuthorizationEndpointUrl}?client_id={ApiClient.ClientId}&response_type={responseType}&state={state}"; return url; }
/// <summary> /// Creates an authorization url that can be used to authorize access to a user's account. /// </summary> /// <param name="oAuth2ResponseType">Determines if Imgur returns a Code, a PIN code, or an opaque Token.</param> /// <param name="state"> /// This optional parameter indicates any state which may be useful to your application upon receipt of /// the response. /// </param> /// <returns></returns> public string GetAuthorizationUrl(OAuth2ResponseType oAuth2ResponseType, string state = null) { var responseType = oAuth2ResponseType.ToString().ToLowerInvariant(); var url = $"{AuthorizationEndpointUrl}?client_id={ApiClient.ClientId}&response_type={responseType}&state={state}"; return(url); }
/// <summary> /// Creates an authorization url that can be used to authorize access to a user's account. /// </summary> /// <param name="oAuth2ResponseType">Determines if Imgur returns a Code, a PIN code, or an opaque Token.</param> /// <param name="state"> /// This optional parameter indicates any state which may be useful to your application upon receipt of /// the response. /// </param> /// <returns></returns> public string GetAuthorizationUrl(OAuth2ResponseType oAuth2ResponseType, string state = null) { return(string.Format("{0}?client_id={1}&response_type={2}&state={3}", (object)this.AuthorizationEndpointUrl, (object)this.ApiClient.ClientId, (object)oAuth2ResponseType.ToString().ToLowerInvariant(), (object)state)); }