Class: RestClient
Defined in: rest/v2/oauth2/rest/client.ts:85
Constructors
Constructor
new RestClient(
options,client):RestClient
Defined in: rest/v2/oauth2/rest/client.ts:93
Parameters
| Parameter | Type |
|---|---|
options | Partial<RestClientOptions> |
client | { name: null | string; } |
client.name | null | string |
Returns
RestClient
Properties
| Property | Modifier | Type |
|---|---|---|
name | public | null | string |
options | readonly | RestClientOptions |
Accessors
invalidRequestCounter
Get Signature
get invalidRequestCounter():
RestRequestCounter
Defined in: rest/v2/oauth2/rest/client.ts:135
Returns
limited
Get Signature
get limited():
boolean
Defined in: rest/v2/oauth2/rest/client.ts:125
Returns
boolean
requestCounter
Get Signature
get requestCounter():
RestRequestCounter
Defined in: rest/v2/oauth2/rest/client.ts:131
Returns
userAgent
Get Signature
get userAgent():
string
Defined in: rest/v2/oauth2/rest/client.ts:121
Returns
string
Methods
clearRatelimitTimeout()
clearRatelimitTimeout():
void
Defined in: rest/v2/oauth2/rest/client.ts:139
Returns
void
debug()
debug(
message):void
Defined in: rest/v2/oauth2/rest/client.ts:143
Parameters
| Parameter | Type |
|---|---|
message | string |
Returns
void
delete()
delete<
T>(path,options?):Promise<T>
Defined in: rest/v2/oauth2/rest/client.ts:151
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
path | string |
options? | RequestOptions |
Returns
Promise<T>
get()
get<
T>(path,options?):Promise<T>
Defined in: rest/v2/oauth2/rest/client.ts:155
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
path | string |
options? | RequestOptions |
Returns
Promise<T>
patch()
patch<
T>(path,options?):Promise<T>
Defined in: rest/v2/oauth2/rest/client.ts:159
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
path | string |
options? | RequestOptions |
Returns
Promise<T>
post()
post<
T>(path,options?):Promise<T>
Defined in: rest/v2/oauth2/rest/client.ts:163
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
path | string |
options? | RequestOptions |
Returns
Promise<T>
request()
request<
TypedResponse>(path,method,options):Promise<TypedResponse>
Defined in: rest/v2/oauth2/rest/client.ts:167
Type Parameters
| Type Parameter | Default type |
|---|---|
TypedResponse | unknown |
Parameters
| Parameter | Type |
|---|---|
path | string |
method | "DELETE" | "GET" | "PATCH" | "POST" | RequestMethod |
options | RequestOptions |
Returns
Promise<TypedResponse>