sinch.core.pagination module
- class sinch.core.pagination.Paginator(sinch, endpoint, result: RM | None = None)[source]
Bases:
ABC,Generic[RM,BM]Public interface for paginated list responses.
- Parameters:
RM – Result model is the server response wrapper can be accessed by
result.BM – Body model is the type of a single item yielded by
content()/iterator().result (RM | None)
Use
content(),next_page()anditerator()to traverse the result set without dealing with the underlying pagination scheme.- content() list[BM][source]
Return the items contained in the current page.
- Returns:
The list of items in the current page.
- Return type:
list[BM]