Class PagedRequest<ItemType>Abstract

Interface to iterate through results from API endpoints that return results in pages. Use in one of three ways:

  1. Get all results as an array: await request.exec() == <array>
  2. Get each page of results: await request.nextPage() == { current, total, items: <array> }
  3. Use for await to get all results one at a time: for await (let hit of request) { }

Type Parameters

  • ItemType

Hierarchy (View Summary)

Implements

Properties

current: number
done: boolean
options: Required<Rev.SearchOptions<ItemType>>
total: undefined | number

Methods