REST
No summary provided.
Extends
EventEmitterconstructor(options?)
Constructs a new instance of the
REST
className | Type | Optional | Description |
---|---|---|---|
options | Partial<RESTOptions> | Yes | None |
Readonly
Readonly
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
Runs a delete request from the api
Name | Type | Optional | Description |
---|---|---|---|
fullRoute | RouteLike | No | The full route to query |
options | RequestData | Yes | Optional request options |
Runs a get request from the api
Name | Type | Optional | Description |
---|---|---|---|
fullRoute | RouteLike | No | The full route to query |
options | RequestData | Yes | Optional request options |
Gets the agent set for this instance
Runs a patch request from the api
Name | Type | Optional | Description |
---|---|---|---|
fullRoute | RouteLike | No | The full route to query |
options | RequestData | Yes | Optional request options |
Runs a post request from the api
Name | Type | Optional | Description |
---|---|---|---|
fullRoute | RouteLike | No | The full route to query |
options | RequestData | Yes | Optional request options |
Runs a put request from the api
Name | Type | Optional | Description |
---|---|---|---|
fullRoute | RouteLike | No | The full route to query |
options | RequestData | Yes | Optional request options |
Runs a request from the API, yielding the raw Response object
Name | Type | Optional | Description |
---|---|---|---|
options | InternalRequest | No | Request options |
Runs a request from the api
Name | Type | Optional | Description |
---|---|---|---|
options | InternalRequest | No | Request options |
Sets the default agent to use for requests performed by this instance
Name | Type | Optional | Description |
---|---|---|---|
agent | Dispatcher | No | Sets the agent to use |
Sets the authorization token that should be used for requests
Name | Type | Optional | Description |
---|---|---|---|
token | string | No | The authorization token to use |