twiml-0.1.0.0: TwiML library for Haskell

Safe HaskellNone

Text.XML.Twiml.Types

Contents

Synopsis

Documentation

data URL Source

Instances

data Method Source

Constructors

GET 
POST 

Instances

data Key Source

Constructors

K0

0

K1

1

K2

2

K3

3

K4

4

K5

5

K6

6

K7

7

K8

8

K9

9

KStar

*

KPound

#

Instances

data Digit Source

The ‘digits’ attribute lets you play DTMF tones during a call. See https://www.twilio.com/docs/api/twiml/play#attributes-digits.

Constructors

D0

0

D1

1

D2

2

D3

3

D4

4

D5

5

D6

6

D7

7

D8

8

D9

9

W

w

Instances

<Say>

data LangAlice Source

Constructors

DaDK

Danish, Denmark

DeDE

German, Germany

EnAU

English, Australia

EnCA

English, Canada

EnGB

English, UK

EnIN

English, India

EnUS

English, United States

CaES

Catalan, Spain

EsES

Spanish, Spain

EsMX

Spanish, Mexico

FiFI

Finnish, Finland

FrCA

French, Canada

FrFR

French, France

ItIT

Italian, Italy

JaJP

Japanese, Japan

KoKR

Korean, Korea

NbNO

Norwegian, Norway

NlNL

Dutch, Netherlands

PlPL

Polish-Poland

PtBR

Portuguese, Brazil

PtPT

Portuguese, Portugal

RuRU

Russian, Russia

SvSE

Swedish, Sweden

ZhCN

Chinese (Mandarin)

ZhHK

Chinese (Cantonese)

ZhTW

Chinese (Taiwanese Mandarin)

Instances

<Play>

<Gather>

data Gather' Source

For some Twiml p t, the constraint (p :/~ Gather') lets us enforce TwiML nesting rules.

<Record>

<Sms>

<Dial>

<Number>

<Sip>

<Client>

<Conference>

<Queue>

<Enqueue>

<Redirect>

<Reject>

data Reason Source

The reason attribute takes the values "rejected" and "busy." This tells Twilio what message to play when rejecting a call. Selecting "busy" will play a busy signal to the caller, while selecting "rejected" will play a standard not-in-service response. See https://www.twilio.com/docs/api/twiml/reject#attributes-reason.

Constructors

Rejected 
Busy 

Instances

<Pause>

Lens Classes

class HasLoop t whereSource

Instances

HasLoop (Say p) 
HasLoop (Play p) 

class HasAction t whereSource

Methods

action :: Lens t t (Maybe URL) URLSource

Instances

class HasMethod t whereSource

Instances

class HasTimeout t whereSource

Instances

HasTimeout (Record p) 
HasTimeout (Dial p) 
Twiml p t => HasTimeout (t -> Gather p) 

class HasFinishOnKey t whereSource

Instances

Internal

Lens

The following section extracts a number of definitions required to get lenses, as defined in the lens package, working, without relying on the lens package itself. Rather than use the following functions, consider installing lens. See https://hackage.haskell.org/package/lens.

type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f tSource

type Lens' s a = Lens s s a aSource

lens :: (s -> a) -> (s -> b -> t) -> Lens s t a bSource

(^.) :: s -> Getting a s a -> aSource

over :: Profunctor p => Setting p s t a b -> p a b -> s -> tSource

to' :: (s -> a) -> IndexPreservingGetter s aSource

Fix & Foldable

The following definitions were extracted from the recursion-schemes package. See https://hackage.haskell.org/package/recursion-schemes.

newtype Fix f Source

Constructors

Fix 

Fields

unFix :: f (Fix f)
 

Instances

Twiml p (Twiml' p) 
Show (Twiml' p) 
Foldable (Fix (TwimlF p)) 

class Functor (Base t) => Foldable t whereSource

Methods

project :: t -> Base t tSource

cata :: (Base t a -> a) -> t -> aSource

Instances

type family Base t :: * -> *Source

Type Inequality

The following defines :/~ to mean inequality at the type level. Borrowed from HList. See http://okmij.org/ftp/Haskell/typeEQ.html.

class TypeEq x y No => x :/~ y Source

Instances

TypeEq x y No => x :/~ y 

data Yes Source

data No Source