SwitchX.Event (SwitchX v1.0.1)
View SourceSummary
Functions
Dumps a SwitchX.Event into a string URI encoded
Callback implementation for Access.fetch/2
.
Callback implementation for Access.get_and_update/3
.
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
Callback implementation for Access.pop/2
.
Functions
@spec 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"
Callback implementation for Access.fetch/2
.
Callback implementation for Access.get_and_update/3
.
@spec merge(event :: SwitchX.Event, new :: SwitchX.Event) :: SwitchX.Event
Updates a SwitchX.Event with another event message and body, see Map.merge/2
@spec new() :: SwitchX.Event
@spec new(message :: String) :: SwitchX.Event
@spec new(headers :: SwitchX.Event.Header) :: SwitchX.Event
Create a Event from a plain message from freeswitch,
@spec new(headers :: SwitchX.Event.Header, body :: String) :: SwitchX.Event
Given a SwichX.Event.Headers and a body string create a new Event
Callback implementation for Access.pop/2
.