View Source Zendesk.Client.Streamable (zendesk v0.0.1)

Handle streamable (i.e., paginated) responses from the API.

Link to this section Summary

Link to this section Types

@type t() :: %Zendesk.Client.Streamable{
  closed: boolean(),
  cursor: String.t(),
  operation: Zendesk.Client.Operation.t()
}

Link to this section Functions

Produce a Stream for a given Zendesk.Client.Operation.

For instance:

 # get 400 tickets
 Zendesk.Ticket.list()
 |> Zendesk.stream!()
 |> Stream.take(400)
 |> Enum.to_list()
 |> IO.inspect()