Show / Hide Table of Contents

Interface IRateLimit

Namespace: Camille.RiotGames.Util
Assembly: Camille.RiotGames.dll
Syntax
public interface IRateLimit

Methods

| Improve this Doc View Source

GetBuckets()

Get the rate limit's buckets.

Declaration
IReadOnlyList<ITokenBucket> GetBuckets()
Returns
Type Description
System.Collections.Generic.IReadOnlyList<MingweiSamuel.TokenBucket.ITokenBucket>

Current buckets.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX