Interface: RestClientOptions<IncludeAllQuery>
Defined in: oauth/v2/rest/options.ts:59
Type Parameters
| Type Parameter | Default type |
|---|---|
IncludeAllQuery extends boolean | boolean |
Properties
| Property | Type | Description |
|---|---|---|
api | string | The base url of the Patreon API Default 'https://www.patreon.com/api/oauth2/v2' |
authPrefix | string | The prefix of the Authorization header Default 'Bearer' |
debug | boolean | Use the Node.js Console to log messages if no debug listeners are found Default true |
emitter | EventEmitter<RestEventMap> | null | The event emitter to use for emitting data for: - debug - response - request - ratelimit Default null |
fetch | RestFetcher | The fetch function to use for making requests Default globalThis.fetch |
globalRequestsLimit | RestRequestCounterOptions | The maximum amount of requests for this client. Set to 0 to disable the limit. The limit is set to {amount} req/{interval}s. The default interval is 1 second. Default 0 |
headers | Record<string, string> | Headers to add on every request. Can also be overwritten on the request options. The following headers are already included (and can be overwritten): - Authorization (if the request is using a token) - Content-Type - User-Agent Default {} |
includeAllQueries | IncludeAllQuery | Whether to include all relationships and attributes in the query Default false Deprecated Use <ClientOptions>.transform.includeAllQueries |
invalidRequestsLimit | RestRequestCounterOptions | The maximum amount of invalid (4XX) requests for this client. Set to 0 to disable the limit. The limit is set to {amount} req/{interval}s. The default interval is 1 second. As of writing this, your client will be paused from using the API when this limit has reached 2000 req / 600s. By default, counts any 4XX response but this can be adjusted using filter. Default 0 See https://docs.patreon.com/#edge-rate-limiting |
ratelimitTimeout | number | The time in ms after a request is rate limited to wait before sending new requests Default 0 |
retries | RestRetries | The amount of times to retry failed (defaults to 5XX responses) or aborted requests. Does not retry 4XX responses unless specifically configured with the status option. Can be applied to all statuses, ranges or a specific status. When using multiple retries for different statuses, the (first) option without a status will be used for all other statuses. Default 3 |
timeout | number | The time in ms after the request will be aborted. Can also be overwritten on the request options. Default 15_000 |
userAgentAppendix | string | undefined | The string to append to the user agent header |