Esempio n. 1
0
 internal static async Task <RateLimitApiException> CreateAsync(HttpResponseMessage response)
 {
     return(new RateLimitApiException(RateLimit.Parse(response.Headers), await ApiError.Parse(response).ConfigureAwait(false)));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RateLimitApiException"/> class with a specified <paramref name="rateLimit"/>.
 /// </summary>
 /// <param name="rateLimit"><see cref="Exceptions.RateLimit"/> received on the API call that failed.</param>
 public RateLimitApiException(RateLimit rateLimit)
     : this("Rate limits exceeded")
 {
     RateLimit = rateLimit;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RateLimitApiException"/> class with a specified <paramref name="rateLimit"/>.
 /// </summary>
 /// <param name="rateLimit"><see cref="Exceptions.RateLimit"/> received on the API call that failed.</param>
 /// <param name="apiError"><see cref="Exceptions.ApiError"/> received on the API call that failed.</param>
 public RateLimitApiException(RateLimit rateLimit, ApiError apiError = null)
     : this("Rate limits exceeded")
 {
     RateLimit = rateLimit;
     ApiError  = apiError;
 }