SwitchX v0.1.0 SwitchX.Event View Source

Link to this section Summary

Functions

Dumps a SwitchX.Event into a string URI encoded

Updates a SwitchX.Event with another event message and body, see Map.merge/2

Create a Event from a plain message from freeswitch,

Given a SwichX.Event.Headers and a body string create a new Event

Link to this section Functions

Link to this function dump(event) View Source
dump(event :: SwitchX.Event) :: event_string :: String

Dumps a SwitchX.Event into a string URI encoded

Returns

  event_string

Example

iex> SwitchX.Event.new(SwitchX.Event.Headers.new(%{foo: "bar 53"}), "body")
     |> SwitchX.Event.dump()

"foo: bar%2053

body"
Link to this function merge(event, new) View Source
merge(event :: SwitchX.Event, new :: SwitchX.Event) :: SwitchX.Event

Updates a SwitchX.Event with another event message and body, see Map.merge/2

Link to this function new() View Source
new() :: SwitchX.Event
Link to this function new(message) View Source
new(message :: String) :: SwitchX.Event
new(headers :: SwitchX.Event.Header) :: SwitchX.Event

Create a Event from a plain message from freeswitch,

Link to this function new(headers, body) View Source
new(headers :: SwitchX.Event.Header, body :: String) :: SwitchX.Event

Given a SwichX.Event.Headers and a body string create a new Event