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.Record

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 <Record>.

Synopsis

Documentation

record :: IsTwimlLike f Record => RecordAttributes -> TwimlLike f Record () Source #

Example:

>>> :{
let example :: VoiceTwiml
    example =
      voiceResponse $ do
        say "Please leave a message at the beep. Press the star key when finished." def
        record $ def & action      .~ parseURL "http://foo.edu/handleRecording.php"
                     & method      .~ Just GET
                     & maxLength   .~ Just 20
                     & finishOnKey .~ Just KStar
        say "I did not receive a recording" def
        end
      where Twiml.Syntax{..} = def
:}
>>> putStr $ show example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say>Please leave a message at the beep. Press the star key when finished.</Say>
  <Record action="http://foo.edu/handleRecording.php" method="GET" finishOnKey="*" maxLength="20" />
  <Say>I did not receive a recording</Say>
</Response>

data RecordF (i :: [Type]) a Source #

Instances

Functor (RecordF i) Source # 

Methods

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

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

Functor1 [Type] RecordF Source # 

Methods

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

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

Methods

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

show :: RecordF i a -> String #

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

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

Methods

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

data RecordAttributes Source #

Instances

Eq RecordAttributes Source # 
Data RecordAttributes Source # 

Methods

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

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

toConstr :: RecordAttributes -> Constr #

dataTypeOf :: RecordAttributes -> DataType #

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

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

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

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

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

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

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

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

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

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

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

Methods

rnf :: RecordAttributes -> () #

ToAttrs RecordAttributes Source # 
HasTimeout RecordAttributes (Maybe Natural) Source # 
HasMethod RecordAttributes (Maybe Method) Source # 
HasFinishOnKey RecordAttributes (Maybe Key) Source # 
HasAction RecordAttributes (Maybe URL) Source # 
HasTranscribeCallback RecordAttributes (Maybe URL) Source # 
HasTranscribe RecordAttributes (Maybe Bool) Source # 
HasPlayBeep RecordAttributes (Maybe Bool) Source # 
HasMaxLength RecordAttributes (Maybe Natural) Source # 
type Rep RecordAttributes Source # 
type Rep RecordAttributes = D1 * (MetaData "RecordAttributes" "Text.XML.Twiml.Internal.Twiml" "twiml-0.2.1.0-8vOgp92H6HZKjscJQqq5Ao" False) (C1 * (MetaCons "RecordAttributes" PrefixI True) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_recordAction") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe URL))) (S1 * (MetaSel (Just Symbol "_recordMethod") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Method)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_recordTimeout") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Natural))) (S1 * (MetaSel (Just Symbol "_recordFinishOnKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Key))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_recordMaxLength") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Natural))) (S1 * (MetaSel (Just Symbol "_recordTranscribe") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Bool)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_recordTranscribeCallback") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe URL))) (S1 * (MetaSel (Just Symbol "_recordPlayBeep") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Bool)))))))