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