hedwig_sms v0.1.0 Hedwig.Adapters.SMS

Hedwig adapter that communicates via SMS using the Twilio API.

Summary

Functions

Callback implementation for c:Hedwig.Adapter.emote/2

Sends the Twilio request body from the callback to the robot with the specified name. req_body is assumed to be the post body string or a map with keys "From" and "Body"

Callback implementation for c:Hedwig.Adapter.reply/2

Callback implementation for c:Hedwig.Adapter.send/2

Functions

emote(pid, msg)

Callback implementation for c:Hedwig.Adapter.emote/2.

handle_message(name, req_body)

Specs

handle_message(String.t, String.t | Map.t) ::
  {:error, :not_found} |
  :ok

Sends the Twilio request body from the callback to the robot with the specified name. req_body is assumed to be the post body string or a map with keys "From" and "Body".

Use this function if you are defining your on receive callback from Twilio

reply(pid, msg)

Callback implementation for c:Hedwig.Adapter.reply/2.

send(pid, msg)

Callback implementation for c:Hedwig.Adapter.send/2.