singer_sdk.pagination.LegacyStreamPaginator#
- class singer_sdk.pagination.LegacyStreamPaginator#
Paginator that works with REST streams as they exist today.
- __init__(stream: LegacyPaginatedStreamProtocol[TPageToken], *args: Any, **kwargs: Any) None #
Create a new paginator.
- Parameters:
stream – A RESTStream instance.
args – Paginator positional arguments for base class.
kwargs – Paginator keyword arguments for base class.
- get_next(response: Response) TPageToken | None #
Get next page value by calling the stream method.
- Parameters:
response – API response object.
- Returns:
- The next page token or index. Return None from this method to indicate
the end of pagination.