class REST
extends
AsyncEventEmitter<RestEvents>export declare class REST extends AsyncEventEmitter<RestEvents>Represents the class that manages handlers for endpoints
agent : Dispatcher | null
The Agent for all requests performed by this manager.
readonlycdn : CDN
globalRemaining : number
The number of requests remaining in the global bucket
globalReset : number
The timestamp at which the global bucket resets
readonlyhandlers : Collection<string, IHandler>
Request handlers created from the bucket hash and the major parameters
readonlyhashes : Collection<string, HashData>
API bucket hashes that are cached from provided routes
readonlyoptions : RESTOptions
clearHandlerSweeper() : void
Stops the request handler sweeping interval
clearHashSweeper() : void
Stops the hash sweeping interval
 delete(fullRoute: RouteLikeoptions?: RequestData) : Promise<unknown>
Runs a delete request from the api
 get(fullRoute: RouteLikeoptions?: RequestData) : Promise<unknown>
Runs a get request from the api
 patch(fullRoute: RouteLikeoptions?: RequestData) : Promise<unknown>
Runs a patch request from the api
 post(fullRoute: RouteLikeoptions?: RequestData) : Promise<unknown>
Runs a post request from the api
 put(fullRoute: RouteLikeoptions?: RequestData) : Promise<unknown>
Runs a put request from the api
 queueRequest(request: InternalRequest) : Promise<ResponseLike>
Queues a request to be sent
Returns: The response from the api request
 request(options: InternalRequest) : Promise<unknown>
Runs a request from the api
 setAgent(agent: Dispatcher) : this
Sets the default agent to use for requests performed by this manager
 setToken(token: string) : this
Sets the authorization token that should be used for requests