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

Description

The example in this file assumes

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

import Prelude
import Data.Default
import Data.Maybe
import Text.XML.Twiml
import qualified Text.XML.Twiml.Syntax as Twiml

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

Synopsis

Documentation

redirect :: IsTwimlLike f Redirect => URL -> RedirectAttributes -> TwimlLike f Redirect a Source #

Example:

>>> :{
let example :: VoiceTwiml
    example =
      voiceResponse $ do
        dial "415-123-4567" def
        redirect (fromJust $ parseURL "http://www.foo.com/nextInstructions") def
        end
      where Twiml.Syntax{..} = def
:}
>>> putStr $ show example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>415-123-4567</Dial>
  <Redirect>http://www.foo.com/nextInstructions</Redirect>
</Response>

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

Instances

Functor (RedirectF i) Source # 

Methods

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

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

Functor1 [Type] RedirectF Source # 

Methods

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

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

Methods

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

show :: RedirectF i a -> String #

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

ToXML (RedirectF i a) Source # 

Methods

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

data RedirectAttributes Source #

Instances

Eq RedirectAttributes Source # 
Data RedirectAttributes Source # 

Methods

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

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

toConstr :: RedirectAttributes -> Constr #

dataTypeOf :: RedirectAttributes -> DataType #

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

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

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

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

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

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

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

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

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

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

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

Methods

rnf :: RedirectAttributes -> () #

ToAttrs RedirectAttributes Source # 
HasMethod RedirectAttributes (Maybe Method) Source # 
type Rep RedirectAttributes Source # 
type Rep RedirectAttributes = D1 * (MetaData "RedirectAttributes" "Text.XML.Twiml.Internal.Twiml" "twiml-0.2.1.0-8vOgp92H6HZKjscJQqq5Ao" False) (C1 * (MetaCons "RedirectAttributes" PrefixI True) (S1 * (MetaSel (Just Symbol "_redirectMethod") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Method))))