in src/anthropic/pagination.py [0:0]
def next_page_info(self) -> Optional[PageInfo]:
if self._options.params.get("before_id"):
first_id = self.first_id
if not first_id:
return None
return PageInfo(params={"before_id": first_id})
last_id = self.last_id
if not last_id:
return None
return PageInfo(params={"after_id": last_id})