chickadee » twilio » twilio-sms

twilio-sms text #!key to from action method status-callbackprocedure

Send an SMS; see http://www.twilio.com/docs/api/twiml/sms.

text
The text to send
to
The number to send it to
from
The number to send it from
action
Action URL
method
POST or GET for action
status-callback
Status callback URL
(define (twilio-sms text #!key to from action method status-callback)
  (let* ((parameters
           (lower-camel-filter-parameters
             `((to ,to)
               (from ,from)
               (action ,action)
               (method ,method)
               (status-callback ,status-callback)))))
    (if (null? parameters)
      `(Sms ,text)
      `(Sms (,at ,@(lower-camel-filter-parameters parameters)) ,text))))