twiml-0.2.1.0: TwiML library for Haskell

Copyright(C) 2018 Mark Andrus Roberts
LicenseBSD-style (see the file LICENSE)
MaintainerMark Andrus Roberts <markandrusroberts@gmail.com>
Stabilityprovisional
Safe HaskellNone
LanguageHaskell98

Text.XML.Twiml.Verbs.Gather

Description

The example in this file assumes

{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE RecordWildCards #-}

import Prelude
import Control.Lens
import Data.Default
import Text.XML.Twiml
import qualified Text.XML.Twiml.Syntax as Twiml

For more information, refer to Twilio's TwiML Reference for <Gather>.

Synopsis

Documentation

gather :: (IsTwimlLike f Gather, Nest i In Gather) => GatherAttributes -> TwimlLike' VoiceVerbsF i Void -> TwimlLike f Gather () Source #

Example:

>>> :{
let example :: VoiceTwiml
    example =
      voiceResponse $ do
        gather (def & action .~ parseURL "/process_gather.php"
                    & method .~ Just GET) $ do
          say "Please enter your account number, followed by the pound sign" def
          end
        say "We didn't receive any input. Goodbye!" def
        end
      where Twiml.Syntax{..} = def
:}
>>> putStr $ show example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Gather action="/process_gather.php" method="GET">
    <Say>Please enter your account number, followed by the pound sign</Say>
  </Gather>
  <Say>We didn&#39;t receive any input. Goodbye!</Say>
</Response>

data GatherF i a Source #

Instances

Functor (GatherF i) Source # 

Methods

fmap :: (a -> b) -> GatherF i a -> GatherF i b #

(<$) :: a -> GatherF i b -> GatherF i a #

Functor1 [Type] GatherF Source # 

Methods

fmap1 :: (a -> b) -> f i a -> f i b Source #

Show a => Show (GatherF i a) Source # 

Methods

showsPrec :: Int -> GatherF i a -> ShowS #

show :: GatherF i a -> String #

showList :: [GatherF i a] -> ShowS #

ToXML a => ToXML (GatherF i a) Source # 

Methods

toXML :: GatherF i a -> [Element] Source #

data GatherAttributes Source #

Instances

Eq GatherAttributes Source # 
Data GatherAttributes Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GatherAttributes -> c GatherAttributes #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GatherAttributes #

toConstr :: GatherAttributes -> Constr #

dataTypeOf :: GatherAttributes -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c GatherAttributes) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GatherAttributes) #

gmapT :: (forall b. Data b => b -> b) -> GatherAttributes -> GatherAttributes #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GatherAttributes -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GatherAttributes -> r #

gmapQ :: (forall d. Data d => d -> u) -> GatherAttributes -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GatherAttributes -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GatherAttributes -> m GatherAttributes #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GatherAttributes -> m GatherAttributes #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GatherAttributes -> m GatherAttributes #

Ord GatherAttributes Source # 
Read GatherAttributes Source # 
Show GatherAttributes Source # 
Generic GatherAttributes Source # 
Default GatherAttributes Source # 
NFData GatherAttributes Source # 

Methods

rnf :: GatherAttributes -> () #

ToAttrs GatherAttributes Source # 
HasTimeout GatherAttributes (Maybe Natural) Source # 
HasNumDigits GatherAttributes (Maybe Natural) Source # 
HasMethod GatherAttributes (Maybe Method) Source # 
HasFinishOnKey GatherAttributes (Maybe Key) Source # 
HasAction GatherAttributes (Maybe URL) Source # 
type Rep GatherAttributes Source # 
type Rep GatherAttributes = D1 * (MetaData "GatherAttributes" "Text.XML.Twiml.Internal.Twiml" "twiml-0.2.1.0-8vOgp92H6HZKjscJQqq5Ao" False) (C1 * (MetaCons "GatherAttributes" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_gatherAction") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe URL))) (S1 * (MetaSel (Just Symbol "_gatherMethod") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Method)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gatherTimeout") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Natural))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gatherFinishOnKey") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Key))) (S1 * (MetaSel (Just Symbol "_gatherNumDigits") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Natural)))))))