REST

export declare class REST extends EventEmitter
export declare class REST extends EventEmitter

No summary provided.

Extends

EventEmitter
constructor(options?)
Constructs a new instance of the REST class
NameTypeOptionalDescription
optionsPartial<RESTOptions>YesNone
Readonly
cdn:CDN
Readonly
requestManager:RequestManager
emit:(<K extends keyof RestEvents>(event: K, ...args: RestEvents[K]) => boolean) & (<S extends string | symbol>(event: Exclude<S, keyof RestEvents>, ...args: any[]) => boolean)
Inherited from REST
off:(<K extends keyof RestEvents>(event: K, listener: (...args: RestEvents[K]) => void) => this) & (<S extends string | symbol>(event: Exclude<S, keyof RestEvents>, listener: (...args: any[]) => void) => this)
Inherited from REST
on:(<K extends keyof RestEvents>(event: K, listener: (...args: RestEvents[K]) => void) => this) & (<S extends string | symbol>(event: Exclude<S, keyof RestEvents>, listener: (...args: any[]) => void) => this)
Inherited from REST
once:(<K extends keyof RestEvents>(event: K, listener: (...args: RestEvents[K]) => void) => this) & (<S extends string | symbol>(event: Exclude<S, keyof RestEvents>, listener: (...args: any[]) => void) => this)
Inherited from REST
removeAllListeners:(<K extends keyof RestEvents>(event?: K) => this) & (<S extends string | symbol>(event?: Exclude<S, keyof RestEvents>) => this)
Inherited from REST
delete(fullRoute, options?):Promise<unknown>
Runs a delete request from the api
NameTypeOptionalDescription
fullRouteRouteLikeNo
The full route to query
optionsRequestDataYes
Optional request options
get(fullRoute, options?):Promise<unknown>
Runs a get request from the api
NameTypeOptionalDescription
fullRouteRouteLikeNo
The full route to query
optionsRequestDataYes
Optional request options
getAgent():Dispatcher | null
Gets the agent set for this instance
patch(fullRoute, options?):Promise<unknown>
Runs a patch request from the api
NameTypeOptionalDescription
fullRouteRouteLikeNo
The full route to query
optionsRequestDataYes
Optional request options
post(fullRoute, options?):Promise<unknown>
Runs a post request from the api
NameTypeOptionalDescription
fullRouteRouteLikeNo
The full route to query
optionsRequestDataYes
Optional request options
put(fullRoute, options?):Promise<unknown>
Runs a put request from the api
NameTypeOptionalDescription
fullRouteRouteLikeNo
The full route to query
optionsRequestDataYes
Optional request options
Runs a request from the API, yielding the raw Response object
NameTypeOptionalDescription
optionsInternalRequestNo
Request options
request(options):Promise<unknown>
Runs a request from the api
NameTypeOptionalDescription
optionsInternalRequestNo
Request options
setAgent(agent):this
Sets the default agent to use for requests performed by this instance
NameTypeOptionalDescription
agentDispatcherNo
Sets the agent to use
setToken(token):this
Sets the authorization token that should be used for requests
NameTypeOptionalDescription
tokenstringNo
The authorization token to use