Pagination
Pagination
PagePaginatedResource
pythonCopy codeclass PagePaginatedResource:
"""Represents resources using page-based pagination."""
total_count: int # Total number of results available
current_page: int # Current page being viewed
results: List # List of results on the current page
def next(self) -> Optional[PagePaginatedResource]:
"""Fetch the next page of results, or return None if no further pages exist."""
def previous(self) -> Optional[PagePaginatedResource]:
"""Fetch the previous page of results, or return None if no earlier pages exist."""CursorPaginatedResource
Last updated