Safe Haskell | None |
---|
- data Play p
- play :: Twiml p t => Maybe URL -> t -> Play p
- play' :: Twiml p t => PlayAttributes -> Maybe URL -> t -> Play p
- data PlayAttributes = PlayAttributes {}
- defaultPlayAttributes :: PlayAttributes
- playAttributes :: Lens' (Play p) PlayAttributes
- digits :: Lens (Play p) (Play p) (Maybe [Digit]) [Digit]
- loop :: HasLoop t => Lens t t (Maybe Natural) Natural
<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>