Ir al contenido

ListPage

Esta página aún no está disponible en tu idioma.

Classtryyoursize

One page of a list.

A dict with data, has_more and next_cursor (also as attributes). auto_paging_iter() yields every item, fetching the following pages lazily.

class ListPage(Dict[str, Any])
datalistObligatorio

The items of this page.

has_moreboolObligatorio

Whether another page follows.

next_cursorOptional[str]Obligatorio

Cursor of the next page.

next_page()Optional[ListPage]Obligatorio

The following page, or None at the end.

auto_paging_iter()Iterator[Any]Obligatorio

Every item of this page and all following pages.

page = tys.products.list(limit=20)
while page is not None:
for product in page.data:
print(product["external_id"])
page = page.next_page()

¿Te ha resultado útil esta página?