Class RegionalRequester
Manages rate limits for a particular region and sends requests. Retries retryable responses (429, 5xx). Processes non-retryable responses (200, 404, 4xx).
Inheritance
System.Object
RegionalRequester
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: MingweiSamuel.Camille.Util
Assembly: Camille.dll
Syntax
public class RegionalRequester
Constructors
| Improve this Doc View SourceRegionalRequester(IRiotApiConfig)
Declaration
public RegionalRequester(IRiotApiConfig config)
Parameters
Type | Name | Description |
---|---|---|
IRiotApiConfig | config |
Methods
| Improve this Doc View SourceGet<T>(String, String, Region, IEnumerable<KeyValuePair<String, String>>, Boolean, Nullable<CancellationToken>)
Sends a GET request, obeying rate limits and retry afters.
Declaration
public Task<T> Get<T>(string methodId, string relativeUrl, Region region, IEnumerable<KeyValuePair<string, string>> queryParams, bool nonRateLimited, CancellationToken? token)
Parameters
Type | Name | Description |
---|---|---|
System.String | methodId | |
System.String | relativeUrl | |
Region | region | |
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>> | queryParams | |
System.Boolean | nonRateLimited | If set to true, the request will not count against the application rate limit. |
System.Nullable<System.Threading.CancellationToken> | token | CancellationToken to cancel this task. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<T> |
Type Parameters
Name | Description |
---|---|
T |