Skip to main content

Class: Rest

Constructors

constructor

new Rest(config)

Parameters

NameType
configRestConfig

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

NameType
methodstring
pathstring
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

NameType
pathstring

Returns

Promise<RES>

Defined in

packages/disploy/src/client/Rest.ts:44


get

get<RES>(path): Promise<RES>

Type parameters

Name
RES

Parameters

NameType
pathstring

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

NameType
pathstring
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

NameType
pathstring
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

NameType
pathstring
body?REQ

Returns

Promise<RES>

Defined in

packages/disploy/src/client/Rest.ts:48