Skip to main content

Module pagination

Module pagination 

Source
Expand description

Cursor-based pagination helpers.

All list endpoints in atrg use cursor-based pagination with the format: ?cursor=<opaque>&limit=<n> and return {"items": [...], "cursor": "<next>"}.

Structs§

PaginationParams
Pagination query parameters accepted by list endpoints.

Constants§

DEFAULT_LIMIT
Default items per page.
MAX_LIMIT
Maximum items per page.

Functions§

decode_cursor
Decode a cursor into (timestamp_ms, rkey).
encode_cursor
Encode a cursor from a timestamp and record key.
paginated_response
Build a paginated JSON response.