Interface IRateLimit
Namespace: Camille.RiotGames.Util
Assembly: Camille.RiotGames.dll
Syntax
public interface IRateLimit
Methods
| Improve this Doc View SourceGetBuckets()
Get the rate limit's buckets.
Declaration
IReadOnlyList<ITokenBucket> GetBuckets()
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<MingweiSamuel.TokenBucket.ITokenBucket> | Current buckets. |
GetRetryAfterDelay()
Get delay needed to respect retry-after headers.
Declaration
long GetRetryAfterDelay()
Returns
Type | Description |
---|---|
System.Int64 | Ticks to delay or -1 if none needed. Zero may be returned. |
OnResponse(HttpResponseMessage, Double)
Callback for when a response returns. Used to update RetryAfter delay and rate limit buckets.
Declaration
void OnResponse(HttpResponseMessage response, double defaultRetrySeconds)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpResponseMessage | response | Response that applies to this RateLimit. |
System.Double | defaultRetrySeconds | Seconds to delay if response is 429 and has missing/invalid Retry-After header. |