Safe Haskell | None |
---|
- data Gather p
- gather :: (Twiml Gather' n, Twiml p t, p :/~ Gather') => n -> t -> Gather p
- gather' :: (Twiml Gather' n, Twiml p t, p :/~ Gather') => GatherAttributes -> n -> t -> Gather p
- data GatherAttributes = GatherAttributes {}
- defaultGatherAttributes :: GatherAttributes
- gatherAttributes :: Lens' (Gather p) GatherAttributes
- numDigits :: Lens (Gather p) (Gather p) (Maybe Natural) Natural
- action :: HasAction t => Lens t t (Maybe URL) URL
- method :: HasMethod t => Lens t t (Maybe Method) Method
- timeout :: HasTimeout t => Lens t t (Maybe Natural) Natural
- finishOnKey :: HasFinishOnKey t => Lens t t (Maybe Key) Key
<Gather>
This example
module Example where import Control.Lens import Text.XML.Twiml example = respond . (gather <&> timeout .~ 10 <&> finishOnKey .~ KStar $ say "Please enter your pin number and then press star." $ end) $ end
produces the following TwiML response:
<?xml version="1.0" encoding="UTF-8"?> <Response> <Gather timeout="10" finishOnKey="*"> <Say>Please enter your pin number and then press star.</Say> </Gather> </Response>
Constructors
gather' :: (Twiml Gather' n, Twiml p t, p :/~ Gather') => GatherAttributes -> n -> t -> Gather pSource
Attributes
data GatherAttributes Source
Lenses
finishOnKey :: HasFinishOnKey t => Lens t t (Maybe Key) KeySource