declare class REST extends AsyncEventEmitter<RestEvents>
Represents the class that manages handlers for endpoints
externalDispatcher | null agent :
The Agent for all requests performed by this manager.
readonlyexternalCDN cdn :
externalnumber globalRemaining :
The number of requests remaining in the global bucket
externalnumber globalReset :
The timestamp at which the global bucket resets
readonlyexternalCollection<string, IHandler> handlers :
Request handlers created from the bucket hash and the major parameters
readonlyexternalCollection<string, HashData> hashes :
API bucket hashes that are cached from provided routes
readonlyexternalRESTOptions options :
external clearHandlerSweepervoid () :
Stops the request handler sweeping interval
external clearHashSweepervoid () :
Stops the hash sweeping interval
external deletefullRoute: RouteLikeoptions?: RequestData) : Promise<unknown> (
Runs a delete request from the api
external getfullRoute: RouteLikeoptions?: RequestData) : Promise<unknown> (
Runs a get request from the api
external patchfullRoute: RouteLikeoptions?: RequestData) : Promise<unknown> (
Runs a patch request from the api
external postfullRoute: RouteLikeoptions?: RequestData) : Promise<unknown> (
Runs a post request from the api
external putfullRoute: RouteLikeoptions?: RequestData) : Promise<unknown> (
Runs a put request from the api
external queueRequestrequest: InternalRequest) : Promise<ResponseLike> (
Queues a request to be sent
Returns: The response from the api request
external requestoptions: InternalRequest) : Promise<unknown> (
Runs a request from the api
external setAgentagent: Dispatcher) : this (
Sets the default agent to use for requests performed by this manager
external setTokentoken: string) : this (
Sets the authorization token that should be used for requests