Twilio.TwiML (twilio_elixir v0.1.1)

Copy Markdown View Source

Base module for TwiML XML generation.

TwiML (Twilio Markup Language) is the set of XML instructions Twilio uses to handle incoming calls and messages.

Use Twilio.TwiML.VoiceResponse or Twilio.TwiML.MessagingResponse to build TwiML documents.

Summary

Functions

Add an element to the TwiML document.

Render TwiML to an XML string.

Types

element()

@type element() :: {String.t(), map(), [element() | String.t()]}

t()

@type t() :: %Twilio.TwiML{elements: [element()]}

Functions

add_element(twiml, name, attrs \\ %{}, children \\ [])

@spec add_element(t(), String.t(), map(), [element() | String.t()]) :: t()

Add an element to the TwiML document.

to_xml(twi_ml, root_tag)

@spec to_xml(t(), String.t()) :: String.t()

Render TwiML to an XML string.