Pagination

    All list endpoints return paginated responses with a nextCursor field (the older nextToken field is kept as an alias). The SDKs hide this by default:list(...) returns a lazy iterator that fetches pages on demand and yields one item at a time.

    Auto-iteration (recommended)

    Iterate directly. The SDK fetches pages transparently.

    python
    from nopaque import Nopaque
    
    client = Nopaque()
    
    for job in client.mapping.list():
        print(job.id, job.name)

    Caller-supplied limit

    Supply limit to cap the total number of items yielded. This is different from the per-page size the server uses internally.

    python
    # Stop after the first 10 items; the iterator caps total yield, not page size
    for job in client.mapping.list(limit=10):
        print(job.id)

    Manual paging

    If you need explicit control - e.g. to store the cursor and resume later - use list_page (Python) / listPage (TypeScript) to fetch a single page.

    python
    # Explicit paging - get one page, inspect next_token, decide whether to continue
    page = client.mapping.list_page(limit=20)
    print(f"Got {len(page.items)} items, next_token={page.next_token}")
    
    if page.next_token:
        next_page = client.mapping.list_page(limit=20, next_token=page.next_token)