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

Contents

Description

The examples in this file assume

{-# 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 <Dial>.

Synopsis

Documentation

dial :: IsTwimlLike f Dial => String -> DialAttributes -> TwimlLike f Dial ()

Dial a number. Example:

example :: VoiceTwiml
example =
  response $ do
    dial "415-123-4567" def
    say "Goodbye" def
    end
  where Twiml.Syntax{..} = def
>>> show example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>415-123-4567</Dial>
  <Say>Goodbye</Say>
</Response>

dial' :: IsTwimlLike f Dial => Either DialNoun String -> DialAttributes -> TwimlLike f Dial ()

Dial a number or DialNoun. Example:

example :: VoiceTwiml
example =
  response $ do
    dial' (Left . dialNoun $ number "+15558675309" def) $ def
             & callerId .~ Just "+15551112222"
    end
  where Twiml.Syntax{..} = def
>>> show example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial callerId="+15551112222">
    <Number>+15558675309</Number>
  </Dial>
</Response>

data Dial

data DialF i a

Instances

Functor (DialF i) 
Functor1 [*] DialF 
Show a => Show (DialF i a) 
ToXML a => ToXML (DialF i a) 

Nouns

data DialNounF i a

Instances

Functor (DialNounF i) 
Show1 [*] DialNounF 
Functor1 [*] DialNounF 
(:<:) (f i) ((:+:) * (ClientF i) ((:+:) * (ConferenceF i) ((:+:) * (NumberF i) ((:+:) * (QueueF i) (SipF i))))) => (f i) :<: (DialNounF i) 
Show a => Show (DialNounF i a) 
Generic (DialNounF i a) 
ToXML a => ToXML (DialNounF i a) 
ToXML (IxFree * DialNounF i Void) 
type Rep (DialNounF i a) 

Client

data Client

data ClientF i a

Instances

Functor (ClientF i) 
Functor1 [*] ClientF 
Show a => Show (ClientF i a) 
ToXML (ClientF i a) 

Conference

data ConferenceF i a

Number

data Number

data NumberF i a

Instances

Functor (NumberF i) 
Functor1 [*] NumberF 
Show a => Show (NumberF i a) 
ToXML (NumberF i a) 

Queue

data Queue

data QueueF i a

Instances

Functor (QueueF i) 
Functor1 [*] QueueF 
Show a => Show (QueueF i a) 
ToXML (QueueF i a) 

Sip

data Sip

data SipF i a

Instances

Functor (SipF i) 
Functor1 [*] SipF 
Show a => Show (SipF i a) 
ToXML (SipF i a)