Skip to content

ListRoute

Defined in: packages/core/src/api.ts:67

A route that lists things and can follow its pages.

Item

readonly path: string

Defined in: packages/core/src/api.ts:58

The path this route stands for, such as /guilds/123/members.

Route.path

all(options?): Promise<Item[]>

Defined in: packages/core/src/api.ts:74

Collects pages into one array.

PageOptions<Item> & object

Promise<Item[]>


delete<R>(options?): Promise<R>

Defined in: packages/core/src/api.ts:63

R = void

RouteOptions

Promise<R>

Route.delete


get<R>(options?): Promise<R>

Defined in: packages/core/src/api.ts:59

R = Item[]

RouteOptions

Promise<R>

Route.get


pages(options?): AsyncGenerator<Item[], void>

Defined in: packages/core/src/api.ts:69

Yields one page at a time, following the cursor until the list ends.

PageOptions<Item>

AsyncGenerator<Item[], void>


patch<R>(body?, options?): Promise<R>

Defined in: packages/core/src/api.ts:62

R = Item

unknown

RouteOptions

Promise<R>

Route.patch


post<R>(body?, options?): Promise<R>

Defined in: packages/core/src/api.ts:60

R = Item

unknown

RouteOptions

Promise<R>

Route.post


put<R>(body?, options?): Promise<R>

Defined in: packages/core/src/api.ts:61

R = void

unknown

RouteOptions

Promise<R>

Route.put