This package provides utilities and interfaces for handling paginated API responses.
The exported functionality includes:
- Cursor-Based Pagination: Fetch paginated data using a cursor token returned by the API.
- Link-Based Pagination: Retrieve paginated data by following next links provided in the API response.
- Page Number Pagination: Access specific pages of data by specifying page numbers in the request.
- Offset-Based Pagination: Retrieve paginated data by specifying a starting offset and the number of records to fetch.
The exported interfaces and classes include:
- CursorPagedResponse: Represents a paginated API response using cursor-based pagination.
- LinkPagedResponse: PRepresents a paginated API response using link-based pagination.
- NumberPagedResponse: Represents a paginated API response using explicit page numbers.
- OffsetPagedResponse: Represents a paginated API response using offset-based pagination.
- PagedData: An AsyncIterable class that supports both item-wise and page-wise iteration over paginated API responses. It dynamically determines and applies the most suitable pagination strategy from the provided options, ensuring compatibility with various pagination formats.
This library is used by JavaScript SDKs generated by the APIMatic Code Generator. For details on supported platforms and build artifacts, see the Build and Usage Section.