hoshii / Exports / RequestHandler
RequestHandler
Represents a request handler to handle requests to the Guilded API
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new RequestHandler(client
, options?
)
Create a new RequestHandler
Parameters
Name | Type | Description |
---|---|---|
client | Client | The client |
options | RESTOptions | The options for the request handler |
Defined in
Properties
_client
• Private
_client: Client
The client
Defined in
globalBlock
• globalBlock: boolean
= false
Whether the request is globally blocked
Defined in
latencyRef
• latencyRef: LatencyRef
The latency reference
Defined in
options
• options: RESTOptions
The options for the request handler
Defined in
ratelimits
• ratelimits: Record
<string
, SequentialBucket
> = {}
The ratelimits for the request handler
Defined in
readyQueue
• readyQueue: () => void
[] = []
The ready queue for the request handler
Defined in
Methods
authRequest
▸ authRequest<T
>(options
): Promise
<T
>
Sends an authenticated request to the Guilded API
Type parameters
Name | Type |
---|---|
T | unknown |
Parameters
Name | Type | Description |
---|---|---|
options | Omit <RequestOptions , "auth" > | The request options |
Returns
Promise
<T
>
Defined in
lib/rest/RequestHandler.ts:122
globalUnblock
▸ Private
globalUnblock(): void
Unblock the request handler
Returns
void
Defined in
lib/rest/RequestHandler.ts:134
request
▸ request<T
>(options
): Promise
<T
>
Sends a request to the Guilded API
Type parameters
Name | Type |
---|---|
T | unknown |
Parameters
Name | Type | Description |
---|---|---|
options | RequestOptions | The request options |
Returns
Promise
<T
>