Class: Rest
Constructors
constructor
• new Rest(config)
Parameters
| Name | Type |
|---|---|
config | RestConfig |
Defined in
packages/disploy/src/client/Rest.ts:10
Properties
_apiRoot
• Private _apiRoot: string = 'https://discord.com/api/v10'
Defined in
packages/disploy/src/client/Rest.ts:8
_token
• Private _token: string
Defined in
packages/disploy/src/client/Rest.ts:7
Methods
_request
▸ Private _request<T>(method, path, body?): Promise<T>
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type |
|---|---|
method | string |
path | string |
body? | any |
Returns
Promise<T>
Defined in
packages/disploy/src/client/Rest.ts:15
delete
▸ delete<RES>(path): Promise<RES>
Type parameters
| Name |
|---|
RES |
Parameters
| Name | Type |
|---|---|
path | string |
Returns
Promise<RES>
Defined in
packages/disploy/src/client/Rest.ts:44
get
▸ get<RES>(path): Promise<RES>
Type parameters
| Name |
|---|
RES |
Parameters
| Name | Type |
|---|---|
path | string |
Returns
Promise<RES>
Defined in
packages/disploy/src/client/Rest.ts:32
patch
▸ patch<REQ, RES>(path, body?): Promise<RES>
Type parameters
| Name |
|---|
REQ |
RES |
Parameters
| Name | Type |
|---|---|
path | string |
body? | REQ |
Returns
Promise<RES>
Defined in
packages/disploy/src/client/Rest.ts:40
post
▸ post<REQ, RES>(path, body?): Promise<RES>
Type parameters
| Name |
|---|
REQ |
RES |
Parameters
| Name | Type |
|---|---|
path | string |
body? | REQ |
Returns
Promise<RES>
Defined in
packages/disploy/src/client/Rest.ts:36
put
▸ put<REQ, RES>(path, body?): Promise<RES>
Type parameters
| Name |
|---|
REQ |
RES |
Parameters
| Name | Type |
|---|---|
path | string |
body? | REQ |
Returns
Promise<RES>
Defined in
packages/disploy/src/client/Rest.ts:48