Interface: ClientOptions
Options for a Client
Hierarchy
ClientOptions
Properties
keys
• Optional
keys: string
[]
Keys from Clash of Clans API developer site.
Defined in
baseURL
• Optional
baseURL: string
Base URL of the Clash of Clans API.
Defined in
retryLimit
• Optional
retryLimit: number
How many times to retry on 5XX errors.
Defined in
cache
• Optional
cache: boolean
| Store
<any
>
Whether enable or disable internal caching.
Example
const client = new Client({ cache: true });
Defined in
restRequestTimeout
• Optional
restRequestTimeout: number
Time to wait before cancelling a REST request, in milliseconds.
Defined in
throttler
• Optional
throttler: null
| QueueThrottler
| BatchThrottler
Throttler class which handles rate-limit
Example
const client = new Client({ throttler: new QueueThrottler(1000 / 10) });
Example
const client = new Client({ throttler: new BatchThrottler(30) });