Birb / AuthenticatedAPIEndpoint
Class: AuthenticatedAPIEndpoint<Params, Response, Body>
Type parameters
| Name | Type |
|---|---|
Params | Params |
Response | Response |
Body | any |
Hierarchy
-
APIEndpoint<Params,Response,Body>↳
AuthenticatedAPIEndpoint
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new AuthenticatedAPIEndpoint<Params, Response, Body>(client, method)
Type parameters
| Name | Type |
|---|---|
Params | Params |
Response | Response |
Body | any |
Parameters
| Name | Type |
|---|---|
client | Birb |
method | string |
Inherited from
Defined in
src/classes/api/APIEndpoint.ts:31
Properties
body
• body: undefined | Body
The request body.
Inherited from
Defined in
src/classes/api/APIEndpoint.ts:29
client
• client: Birb
The Birb client.
Inherited from
Defined in
src/classes/api/APIEndpoint.ts:10
headers
• headers: Object
The parameters to use.
Index signature
▪ [key: string]: string
Inherited from
Defined in
src/classes/api/APIEndpoint.ts:22
method
• Readonly method: string
The method for the endpoint.
Inherited from
Defined in
src/classes/api/APIEndpoint.ts:14
params
• params: undefined | Params
The parameters to use.
Inherited from
Defined in
src/classes/api/APIEndpoint.ts:18
Methods
buildURL
▸ Abstract buildURL(params): string
Parameters
| Name | Type |
|---|---|
params | Params |
Returns
string
Inherited from
Defined in
src/classes/api/APIEndpoint.ts:122
execute
▸ execute(): Promise<APIResponse<Response>>
Returns
Promise<APIResponse<Response>>
Inherited from
Defined in
src/classes/api/APIEndpoint.ts:51
furnishRequest
▸ Protected furnishRequest(): AuthenticatedAPIEndpoint<Params, Response, Body>
Returns
AuthenticatedAPIEndpoint<Params, Response, Body>
Overrides
APIEndpoint.furnishRequest
Defined in
src/classes/api/AuthenticatedAPIEndpoint.ts:9
setAuditLogReason
▸ setAuditLogReason(reason?): AuthenticatedAPIEndpoint<Params, Response, Body>
Parameters
| Name | Type |
|---|---|
reason? | string |
Returns
AuthenticatedAPIEndpoint<Params, Response, Body>
Defined in
src/classes/api/AuthenticatedAPIEndpoint.ts:20
setBody
▸ setBody(body): AuthenticatedAPIEndpoint<Params, Response, Body>
Parameters
| Name | Type |
|---|---|
body | undefined | Body |
Returns
AuthenticatedAPIEndpoint<Params, Response, Body>
Inherited from
Defined in
src/classes/api/APIEndpoint.ts:46
setHeaders
▸ setHeaders(headers): AuthenticatedAPIEndpoint<Params, Response, Body>
Parameters
| Name | Type |
|---|---|
headers | Object |
Returns
AuthenticatedAPIEndpoint<Params, Response, Body>
Inherited from
Defined in
src/classes/api/APIEndpoint.ts:36
setParams
▸ setParams(params): AuthenticatedAPIEndpoint<Params, Response, Body>
Parameters
| Name | Type |
|---|---|
params | Params |
Returns
AuthenticatedAPIEndpoint<Params, Response, Body>
Inherited from
Defined in
src/classes/api/APIEndpoint.ts:41
throwJSONError
▸ throwJSONError(response, json?): BirbAPIError
Parameters
| Name | Type |
|---|---|
response | Response |
json? | any |
Returns
Inherited from
Defined in
src/classes/api/APIEndpoint.ts:124