twiml-0.2.0.0: TwiML library for Haskell

Copyright(C) 2014-15 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 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:

example :: VoiceTwiml
example =
  response $ 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
>>> 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