Link Search Menu Expand Document (external link)

Birb / AuthenticatedAPIEndpoint

Class: AuthenticatedAPIEndpoint<Params, Response, Body>

Type parameters

Name Type
Params Params
Response Response
Body any

Hierarchy

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

APIEndpoint.constructor

Defined in

src/classes/api/APIEndpoint.ts:31

Properties

body

• body: undefined | Body

The request body.

Inherited from

APIEndpoint.body

Defined in

src/classes/api/APIEndpoint.ts:29


client

• client: Birb

The Birb client.

Inherited from

APIEndpoint.client

Defined in

src/classes/api/APIEndpoint.ts:10


headers

• headers: Object

The parameters to use.

Index signature

▪ [key: string]: string

Inherited from

APIEndpoint.headers

Defined in

src/classes/api/APIEndpoint.ts:22


method

• Readonly method: string

The method for the endpoint.

Inherited from

APIEndpoint.method

Defined in

src/classes/api/APIEndpoint.ts:14


params

• params: undefined | Params

The parameters to use.

Inherited from

APIEndpoint.params

Defined in

src/classes/api/APIEndpoint.ts:18

Methods

buildURL

▸ Abstract buildURL(params): string

Parameters

Name Type
params Params

Returns

string

Inherited from

APIEndpoint.buildURL

Defined in

src/classes/api/APIEndpoint.ts:122


execute

▸ execute(): Promise<APIResponse<Response>>

Returns

Promise<APIResponse<Response>>

Inherited from

APIEndpoint.execute

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

APIEndpoint.setBody

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

APIEndpoint.setHeaders

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

APIEndpoint.setParams

Defined in

src/classes/api/APIEndpoint.ts:41


throwJSONError

▸ throwJSONError(response, json?): BirbAPIError

Parameters

Name Type
response Response
json? any

Returns

BirbAPIError

Inherited from

APIEndpoint.throwJSONError

Defined in

src/classes/api/APIEndpoint.ts:124