Class

REST

HTTP client for the Fluxer API.

Extends EventEmitter

Constructor

new REST(options: RESTOptions)
ParamTypeDescription
optionsRESTOptions

Properties

requestManager: RequestManager (readonly)
Routes: any (readonly)
token: string | null (readonly)

Methods

delete(route: string, options?: RequestOptions): Promise<>
ParamTypeDescription
routestring
options?RequestOptions
get(route: string, options?: Pick<RequestOptions, 'auth' | 'signal' | 'headers'>): Promise<>
ParamTypeDescription
routestring
options?Pick<RequestOptions, 'auth' | 'signal' | 'headers'>
patch(route: string, options?: RequestOptions): Promise<>
ParamTypeDescription
routestring
options?RequestOptions
post(route: string, options?: RequestOptions): Promise<>
ParamTypeDescription
routestring
options?RequestOptions
put(route: string, options?: RequestOptions): Promise<>
ParamTypeDescription
routestring
options?RequestOptions
setToken(token: string | null): this
ParamTypeDescription
tokenstring | null