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.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Camille.RiotGames.Util
Assembly: Camille.RiotGames.dll
Syntax
public class RegionalRequester
Constructors
| Improve this Doc View SourceRegionalRequester(IRiotGamesApiConfig, String)
Declaration
public RegionalRequester(IRiotGamesApiConfig config, string route)
Parameters
Type | Name | Description |
---|---|---|
IRiotGamesApiConfig | config | |
System.String | route |
Methods
| Improve this Doc View SourceSend(String, HttpRequestMessage, CancellationToken, Boolean)
Sends a GET request, obeying rate limits and retry afters.
Declaration
public async Task<string> Send(string methodId, HttpRequestMessage request, CancellationToken token, bool ignoreAppRateLimits)
Parameters
Type | Name | Description |
---|---|---|
System.String | methodId | |
System.Net.Http.HttpRequestMessage | request | Request to send (use relative url). |
System.Threading.CancellationToken | token | CancellationToken to cancel this task. |
System.Boolean | ignoreAppRateLimits | If set to true, the request will not count against the application rate limit. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | Response body (or null if no body). |