Skip to content

Interface: UsageApi ​

The methods of Talkline.usage.

Methods ​

iterate() ​

ts
iterate(query?): AsyncIterable<UsageGroup>;

GET /v1/usage, every group of one window. An absent to is read as now, so the window is the one the first page answered, and each later page asks for it by its bounds.

Parameters ​

ParameterType
query?Pageless<UsageQuery>

Returns ​

AsyncIterable<UsageGroup>


list() ​

ts
list(query?): Promise<UsagePage>;

GET /v1/usage: one page of groups. A seat counts in the window it started in; a live one as of the last flush (final: false).

Parameters ​

ParameterType
query?UsageQuery

Returns ​

Promise<UsagePage>


rates() ​

ts
rates(): Promise<UsageRates>;

GET /v1/usage/rates: what a credit buys. A dimension the table does not name costs nothing.

Returns ​

Promise<UsageRates>


setRates() ​

ts
setRates(body): Promise<UsageRates>;

PUT /v1/usage/rates: the whole table; a dimension left out is free from now on.

Parameters ​

ParameterType
bodyUsageRates

Returns ​

Promise<UsageRates>

Talkline documentation