Represents the class that manages handlers for endpoints
Extends
EventEmitterConstructs a new instance of the
RequestManager
className | Type | Optional | Description |
---|---|---|---|
options | Partial<RESTOptions> | No | None |
The Agent for all requests performed by this manager.
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 RequestManager
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 RequestManager
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 RequestManager
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 RequestManager
removeAllListeners:(<K extends keyof RestEvents>(event?: K) => this) & (<S extends string | symbol>(event?: Exclude<S, keyof RestEvents>) => this)
Inherited from RequestManager
Stops the request handler sweeping interval
Stops the hash sweeping interval
Queues a request to be sent
Returns
The response from the api requestName | Type | Optional | Description |
---|---|---|---|
request | InternalRequest | No | All the information needed to make a request |
Sets the default agent to use for requests performed by this manager
Name | Type | Optional | Description |
---|---|---|---|
agent | Dispatcher | No | 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 |