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

Description

The example in this file assumes

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

import Prelude
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 <Message>.

Synopsis

Documentation

message :: IsTwimlLike f Message => String -> MessageAttributes -> TwimlLike f Message () Source #

Example:

>>> :{
let example :: MessagingTwiml
    example =
      messagingResponse $ do
        message "Store Location: 123 Easy St." def
        end
      where Twiml.Syntax{..} = def
:}
>>> putStr $ show example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Message>Store Location: 123 Easy St.</Message>
</Response>

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

Instances

Functor (MessageF i) Source # 

Methods

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

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

Functor1 [Type] MessageF Source # 

Methods

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

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

Methods

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

show :: MessageF i a -> String #

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

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

Methods

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

data MessageAttributes Source #

Instances

Eq MessageAttributes Source # 
Data MessageAttributes Source # 

Methods

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

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

toConstr :: MessageAttributes -> Constr #

dataTypeOf :: MessageAttributes -> DataType #

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

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

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

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

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

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

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

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

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

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

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

Methods

rnf :: MessageAttributes -> () #

ToAttrs MessageAttributes Source # 
HasMethod MessageAttributes (Maybe Method) Source # 
HasAction MessageAttributes (Maybe URL) Source # 
HasTo MessageAttributes (Maybe String) Source # 
HasStatusCallback MessageAttributes (Maybe URL) Source # 
HasFrom MessageAttributes (Maybe String) Source # 
type Rep MessageAttributes Source # 
type Rep MessageAttributes = D1 * (MetaData "MessageAttributes" "Text.XML.Twiml.Internal.Twiml" "twiml-0.2.1.0-8vOgp92H6HZKjscJQqq5Ao" False) (C1 * (MetaCons "MessageAttributes" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_messageTo") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe String))) (S1 * (MetaSel (Just Symbol "_messageFrom") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe String)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_messageAction") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe URL))) ((:*:) * (S1 * (MetaSel (Just Symbol "_messageMethod") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Method))) (S1 * (MetaSel (Just Symbol "_messageStatusCallback") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe URL)))))))