Paginated result from a Twilio list endpoint.
Handles both pagination formats transparently:
- Meta wrapper (v1/v2/v3):
meta.next_page_url,meta.key - Flat format (v2010):
next_page_uriat top level, nometa
Summary
Functions
Parse a raw API response into a Page struct.
Check if there are more pages.
Auto-page through all results as a lazy stream.
Types
@type t() :: %Twilio.Page{ first_page_url: String.t() | nil, items: [map()], key: String.t(), next_page_url: String.t() | nil, page: non_neg_integer() | nil, page_size: non_neg_integer() | nil, previous_page_url: String.t() | nil, url: String.t() | nil }
Functions
Parse a raw API response into a Page struct.
Auto-detects the pagination format:
- If a
"meta"key is present -> v1/v2/v3 meta wrapper format - Otherwise -> v2010 flat format (uses
*_uriinstead of*_url)
Check if there are more pages.
@spec stream((map() -> {:ok, t()} | {:error, term()}), String.t()) :: Enumerable.t()
Auto-page through all results as a lazy stream.