Copyright | (C) 2014-15 Mark Andrus Roberts |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Mark Andrus Roberts <markandrusroberts@gmail.com> |
Stability | provisional |
Safe Haskell | None |
Language | Haskell98 |
Text.XML.Twiml.Verbs.Play
Description
The example in this file assumes
{-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE RecordWildCards #-} import Prelude import Text.XML.Twiml import qualified Text.XML.Twiml.Syntax as Twiml
For more information, refer to Twilio's TwiML Reference for <Play>.
- play :: IsTwimlLike f Play => URL -> PlayAttributes -> TwimlLike f Play ()
- play' :: IsTwimlLike f Play => Maybe URL -> PlayAttributes -> TwimlLike f Play ()
- data Play
- data PlayF i a
- data PlayAttributes
Documentation
play :: IsTwimlLike f Play => URL -> PlayAttributes -> TwimlLike f Play ()
Example:
example :: VoiceTwiml example = response $ do play (fromJust $ parseURL "https://api.twilio.com/cowbell.mp3") def end where Twiml.Syntax{..} = def
>>>
show example
<?xml version="1.0" encoding="UTF-8"?> <Response> <Play>https://api.twilio.com/cowbell.mp3</Play> </Response>
play' :: IsTwimlLike f Play => Maybe URL -> PlayAttributes -> TwimlLike f Play ()
Example:
example :: VoiceTwiml example = response $ do play' Nothing $ def & digits .~ Just [W, W, W, W, D3] end where Twiml.Syntax{..} = def
>>>
show example
<?xml version="1.0" encoding="UTF-8"?> <Response> <Play digits="wwww3" /> </Response>
data Play
data PlayF i a