View Source Zendesk.Comment (zendesk v0.0.3)

Link to this section Summary

Link to this section Types

@type t() :: %Zendesk.Comment{
  attachments: term(),
  audit_id: term(),
  author_id: term(),
  body: term(),
  created_at: term(),
  html_body: term(),
  id: term(),
  metadata: term(),
  plain_body: term(),
  public: term(),
  type: term(),
  via: term()
}

Link to this section Functions

Link to this function

create_for(ticket, comment_params)

View Source
@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).

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()