Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
github-actions[bot] edited this page Aug 11, 2023 · 10 revisions

Class: Rest

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Rest(hue)

Parameters

Name Type
hue Hue

Defined in

src/connections/Rest.ts:30

Properties

dispatcher

Readonly dispatcher: Agent

Defined in

src/connections/Rest.ts:27


hue

Readonly hue: Hue

Defined in

src/connections/Rest.ts:26


limits

Readonly limits: Collection<string, Limit>

Defined in

src/connections/Rest.ts:28

Methods

_getLimit

_getLimit(route): Limit

Parameters

Name Type
route string

Returns

Limit

Defined in

src/connections/Rest.ts:104


_queue

_queue(route, method, data?): Promise<any>

Parameters

Name Type
route string
method RestRequestType
data? Record<string, any>

Returns

Promise<any>

Defined in

src/connections/Rest.ts:59


_sanitizeRoute

_sanitizeRoute(route): string

Parameters

Name Type
route string

Returns

string

Defined in

src/connections/Rest.ts:108


delete

delete(route): Promise<any>

Parameters

Name Type
route string

Returns

Promise<any>

Defined in

src/connections/Rest.ts:55


get

get(route): Promise<any>

Parameters

Name Type
route string

Returns

Promise<any>

Defined in

src/connections/Rest.ts:43


post

post(route, data): Promise<any>

Parameters

Name Type
route string
data Record<string, any>

Returns

Promise<any>

Defined in

src/connections/Rest.ts:51


put

put(route, data): Promise<any>

Parameters

Name Type
route string
data Record<string, any>

Returns

Promise<any>

Defined in

src/connections/Rest.ts:47

hue.ts

Clone this wiki locally