Show / Hide Table of Contents

Class RiotGamesApiConfig.Builder

Inheritance
System.Object
RiotGamesApiConfig.Builder
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
Assembly: Camille.RiotGames.dll
Syntax
public class Builder

Constructors

| Improve this Doc View Source

Builder(String)

Declaration
public Builder(string apiKey)
Parameters
Type Name Description
System.String apiKey

Fields

| Improve this Doc View Source

ApiKey

Riot Games API key.

Declaration
public string ApiKey
Field Value
Type Description
System.String
| Improve this Doc View Source

ApiRouteConfig

How the API call should include the region/route.

Declaration
public RouteConfig ApiRouteConfig
Field Value
Type Description
RouteConfig
Examples

Default value:

RouteConfig.InUrl
| Improve this Doc View Source

ApiUrl

URL to call for the Riot Games API. Include {0} for the region/route, if you want it in the URL - Not necessary if apiCallRouteConfig is RouteConfig.InUrlAsRouteQueryParameter.

Declaration
public string ApiUrl
Field Value
Type Description
System.String
Examples

Default value:

"https://{0}.api.riotgames.com"
| Improve this Doc View Source

BackoffStrategy

A backoff strategy for 429s with missing Retry-After headers. Returns seconds.

Declaration
public BackoffStrategy BackoffStrategy
Field Value
Type Description
BackoffStrategy
Examples

Default value:

(retries, num429s, num5xxs) => 0.5 + Math.Pow(2, num5xxs + num429s)
| Improve this Doc View Source

ConcurrentInstanceFactor

Multiplier for using concurrent instances. For example, use 0.25 for 4 concurrent instances equally spread.

Declaration
public float ConcurrentInstanceFactor
Field Value
Type Description
System.Single
Examples

Default value:

1f
| Improve this Doc View Source

MaxConcurrentRequests

Maximum number of concurrent requests allowed.

Declaration
public int MaxConcurrentRequests
Field Value
Type Description
System.Int32
Examples

Default value:

1000
| Improve this Doc View Source

OverheadFactor

Overhead factor to reduce the chance 429s due to network noise.

Declaration
public float OverheadFactor
Field Value
Type Description
System.Single
Examples

Default value:

0.95f
| Improve this Doc View Source

Retries

Number of times to retry a failed request (zero for no retries).

Declaration
public int Retries
Field Value
Type Description
System.Int32
Examples

Default value:

5
| Improve this Doc View Source

RouteKey

The query or header name to use for the region/route. Only used if RouteConfig is set to InHeader or InQueryParam.

Declaration
public string RouteKey
Field Value
Type Description
System.String
Examples

Default value:

"Riot-Region"
| Improve this Doc View Source

TokenBucketFactory

Factory for creating token buckets.

Declaration
public TokenBucketFactory TokenBucketFactory
Field Value
Type Description
TokenBucketFactory
Examples

Default value:

(timespan, totalLimit, concurrentInstanceFactor, overheadFactor) => new MingweiSamuel.TokenBucket.CircularTokenBucket(timespan, totalLimit, 20, 0.5f, concurrentInstanceFactor * overheadFactor)

Methods

| Improve this Doc View Source

Build()

Declaration
public RiotGamesApiConfig Build()
Returns
Type Description
RiotGamesApiConfig
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX