twiml-0.1.0.0: TwiML library for Haskell

Safe HaskellNone

Text.XML.Twiml.Verbs.Play

Contents

Synopsis

<Play>

This example

module Example where

import Control.Lens
import Text.XML.Twiml

example
  = respond
  . (play (parseURL "https://api.twilio.com/cowbell.mp3") <&> loop .~ 10)
  $ end

produces the following TwiML response:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Play loop="10">https://api.twilio.com/cowbell.mp3</Play>
</Response>

data Play p Source

Instances

Twiml p (Play p) 
HasLoop (Play p) 

Constructors

play :: Twiml p t => Maybe URL -> t -> Play pSource

play' :: Twiml p t => PlayAttributes -> Maybe URL -> t -> Play pSource

Attributes

Lenses