Interface: RESTOptions<IncludeAllQuery>
Defined in: rest/v2/oauth2/rest/options.ts:53
Type Parameters
IncludeAllQuery
IncludeAllQuery
extends boolean
= boolean
Properties
api
api:
string
Defined in: rest/v2/oauth2/rest/options.ts:58
The base url of the Patreon API
Default
'https://patreon.com/api/oauth2/v2'
authPrefix
authPrefix:
string
Defined in: rest/v2/oauth2/rest/options.ts:64
The prefix of the Authorization header
Default
'Bearer'
emitter
emitter:
null
|EventEmitter
<RestEventMap
>
Defined in: rest/v2/oauth2/rest/options.ts:73
The event emitter to use for emitting data for:
- response
- request
- ratelimit
Default
null
fetch
fetch:
RestFetcher
Defined in: rest/v2/oauth2/rest/options.ts:79
The fetch function to use for making requests
Default
globalThis.fetch
getAccessToken()
getAccessToken: () =>
Promise
<undefined
|string
>
Defined in: rest/v2/oauth2/rest/options.ts:87
Get the access token for unauthenticated requests
Returns
Promise
<undefined
| string
>
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
globalRequestPerSecond:
number
Defined in: rest/v2/oauth2/rest/options.ts:128
The maximum amount of requests per second for this client. Set to 0
to disable the limit.
Default
0
headers
headers:
Record
<string
,string
>
Defined in: rest/v2/oauth2/rest/options.ts:93
Headers to add on every request
Default
{}
includeAllQueries
includeAllQueries:
IncludeAllQuery
Defined in: rest/v2/oauth2/rest/options.ts:107
Whether to include all relationships and attributes in the query
Default
false
ratelimitTimeout
ratelimitTimeout:
number
Defined in: rest/v2/oauth2/rest/options.ts:120
The time in ms after a request is rate limited to wait before sending new requests
Default
0
retries
retries:
RestRetries
Defined in: rest/v2/oauth2/rest/options.ts:101
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
timeout:
number
Defined in: rest/v2/oauth2/rest/options.ts:114
The time in ms after the request will be aborted. Can also be overwritten on the request options.
Default
15_000
userAgentAppendix
userAgentAppendix:
undefined
|string
Defined in: rest/v2/oauth2/rest/options.ts:133
The string to append to the user agent header