Interface: RESTOptions
Options for a RESTManager
Hierarchy
↳
RESTOptions
Properties
rejectIfNotValid
• Optional
rejectIfNotValid: boolean
Set this false
to use res.ok
property.
Defined in
keys
• Optional
keys: string
[]
Keys from Clash of Clans API developer site.
Inherited from
Defined in
baseURL
• Optional
baseURL: string
Base URL of the Clash of Clans API.
Inherited from
Defined in
retryLimit
• Optional
retryLimit: number
How many times to retry on 5XX errors.
Inherited from
Defined in
cache
• Optional
cache: boolean
| Store
<any
>
Whether enable or disable internal caching.
Example
const client = new Client({ cache: true });
Inherited from
Defined in
restRequestTimeout
• Optional
restRequestTimeout: number
Time to wait before cancelling a REST request, in milliseconds.
Inherited from
ClientOptions.restRequestTimeout
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) });