Interface: RestClientOptions<IncludeAllQuery>
Defined in: rest/v2/oauth2/rest/options.ts:58
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://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 | null | EventEmitter<RestEventMap> | 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 |
getAccessToken | () => Promise<undefined | string> | Get the access token for unauthenticated requests Default <Client>.fetchStoredToken Deprecated Since this is not able to refresh tokens, this will be removed in the future. If you do depend on this method, please open an issue with your usecase. |
globalRequestPerSecond | number | The maximum amount of requests per second for this client. Set to 0 to disable the limit. Default 0 Deprecated use globalRequestsLimit |
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 Default {} |
includeAllQueries | IncludeAllQuery | Whether to include all relationships and attributes in the query Default false |
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. Can be applied to all statuses, ranges or a specific status. 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 | undefined | string | The string to append to the user agent header |