chickadee » twilio » twilio-play

twilio-play url #!key loopprocedure

Play something; see http://www.twilio.com/docs/api/twiml/play.

url
The audio file to play
loop
How many times to play it
(define (twilio-play url #!key loop)
  (let ((parameters (lower-camel-filter-parameters `((loop ,loop)))))
    (if (null? parameters)
      `(Play ,url)
      `(Play (,(string->symbol "@")
              ,@(lower-camel-filter-parameters parameters))
             ,url))))