Interface Config

The configuration of the library

interface Config {
    allowCacheByDefault: boolean;
    apiKeys: ApiKey[];
    defaultRetries: number;
    defaultTimeout: number;
    maxQueueLength: number;
    routes: Routes;
    throwOnRatelimitError: boolean;
}

Properties

allowCacheByDefault: boolean

Whether to allow requests to use the cache or currently ongoing requests

This is overridden by RequestOptions.allowCache.

Default

true
apiKeys: ApiKey[]

The API keys being used

defaultRetries: number

The amount of times a request should be retried on error

This is overridden by RequestOptions.retries.

Default

3
defaultTimeout: number

The amount of milliseconds a until a request should be rejected

This is overridden by RequestOptions.timeout.

Default

30000
maxQueueLength: number

The maximum amount of queued requests before new requests are rejected with an error

Default

50
routes: Routes

Information on all supported routes

throwOnRatelimitError: boolean

Whether exceeding the ratelimit should throw an error, or whether the request should be retried after the ratelimit reset

Default

false

Generated using TypeDoc