View Source Zendesk.Comment (zendesk v0.0.3)
Link to this section Summary
Functions
Get a list of Zendesk.Comments.
Link to this section Types
Link to this section Functions
@spec create_for(Zendesk.Ticket.t(), map()) :: Zendesk.Client.Operation.t()
Create a Zendesk.Comment.
If passed to Zendesk.request!/1 it will return the entity which the comment was added to (e.g., a Zendesk.Ticket).
@spec list_for(Zendesk.Ticket.t()) :: Zendesk.Client.Operation.t()
Get a list of Zendesk.Comments.
If passed to Zendesk.request!/1 it will return only the first results from the list.
You can create a Stream to paginate over all results by calling Zendesk.stream!/1.
For instance:
# get 400 comments for a ticket
ticket
|> Zendesk.Comment.list_for()
|> Zendesk.stream!()
|> Stream.take(400)
|> Enum.to_list()
|> IO.inspect()