Copyright | (C) 2017- Mark Andrus Roberts |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Mark Andrus Roberts <markandrusroberts@gmail.com> |
Stability | provisional |
Safe Haskell | None |
Language | Haskell98 |
Synopsis
- class Get r where
- get :: r
- class Get0 r where
- get0 :: MonadThrow m => TwilioT m r
- class Get1 a r where
- get1 :: MonadThrow m => a -> TwilioT m r
- class Get2 a b r where
- get2 :: MonadThrow m => a -> b -> TwilioT m r
- class Post r where
- post :: r
- class Post0 r where
- post0 :: MonadThrow m => TwilioT m r
- class Post1 a r where
- post1 :: MonadThrow m => a -> TwilioT m r
- class Post2 a b r where
- post2 :: MonadThrow m => a -> b -> TwilioT m r
- class Post3 a b c r where
- post3 :: MonadThrow m => a -> b -> c -> TwilioT m r
- class Delete r where
- delete :: r
- class Delete1 a where
- delete1 :: MonadThrow m => a -> TwilioT m ()
- parseJSONFromResponse :: (FromJSON a, MonadThrow m) => Response ByteString -> m a
Documentation
This module repackages functionality exposed by MonadRequest
into a
set of classes that REST resources can easily consume. It also provides
functions get
and post
that work well with type inference.
Get
represents REST resources that support HTTP GET requests with any number of arguments.
Instances
(MonadThrow m, Get2 a b r) => Get (a -> b -> TwilioT m r) Source # | |
Defined in Twilio.Internal.Resource | |
(MonadThrow m, Get1 a r) => Get (a -> TwilioT m r) Source # | |
Defined in Twilio.Internal.Resource | |
(MonadThrow m, Get0 r) => Get (TwilioT m r) Source # | |
Defined in Twilio.Internal.Resource |
Get0
represents REST resources that support HTTP GET requests with 0 arguments.
get0 :: MonadThrow m => TwilioT m r Source #
Instances
Get1
represents REST resources that support HTTP GET requests with 1 argument.
get1 :: MonadThrow m => a -> TwilioT m r Source #
Instances
class Get2 a b r where Source #
Get2
represents REST resources that support HTTP GET requests with 2 arguments.
get2 :: MonadThrow m => a -> b -> TwilioT m r Source #
Instances
Get2 ConferenceSID CallSID Participant Source # | |
Defined in Twilio.Conference.Participant get2 :: MonadThrow m => ConferenceSID -> CallSID -> TwilioT m Participant Source # | |
Get2 QueueSID CallSID Member Source # | |
Defined in Twilio.Queue.Member | |
Get2 MessageSID MediaSID Media Source # | |
Defined in Twilio.Message.Media get2 :: MonadThrow m => MessageSID -> MediaSID -> TwilioT m Media Source # |
Post
represents REST resources that support HTTP POST requests with any number of arguments.
Instances
(MonadThrow m, Post3 a b c r) => Post (a -> b -> c -> TwilioT m r) Source # | |
Defined in Twilio.Internal.Resource | |
(MonadThrow m, Post2 a b r) => Post (a -> b -> TwilioT m r) Source # | |
Defined in Twilio.Internal.Resource | |
(MonadThrow m, Post1 a r) => Post (a -> TwilioT m r) Source # | |
Defined in Twilio.Internal.Resource | |
(MonadThrow m, Post0 r) => Post (TwilioT m r) Source # | |
Defined in Twilio.Internal.Resource |
Post0
represents REST resources that support HTTP POST requests with 0 arguments.
post0 :: MonadThrow m => TwilioT m r Source #
class Post1 a r where Source #
Post1
represents REST resources that support HTTP POST requests with 1 argument.
post1 :: MonadThrow m => a -> TwilioT m r Source #
Instances
Post1 Integer Token Source # | |
Defined in Twilio.Tokens | |
Post1 Text Account Source # | |
Defined in Twilio.Accounts | |
Post1 PostQueues Queue Source # | |
Defined in Twilio.Queues post1 :: MonadThrow m => PostQueues -> TwilioT m Queue Source # | |
Post1 PostCopilotMessage Message Source # | |
Defined in Twilio.Messages post1 :: MonadThrow m => PostCopilotMessage -> TwilioT m Message Source # | |
Post1 PostMessage Message Source # | |
Defined in Twilio.Messages post1 :: MonadThrow m => PostMessage -> TwilioT m Message Source # | |
Post1 PostCalls Call Source # | |
Defined in Twilio.Calls | |
Post1 (Maybe Integer) Token Source # | |
Defined in Twilio.Tokens | |
Post1 (Maybe Text) Account Source # | |
Defined in Twilio.Accounts |
class Post2 a b r where Source #
Post2
represents REST resources that support HTTP POST requests with 2 arguments.
post2 :: MonadThrow m => a -> b -> TwilioT m r Source #
class Post3 a b c r where Source #
Post3
represents REST resources that support HTTP POST requests with 3 arguments.
post3 :: MonadThrow m => a -> b -> c -> TwilioT m r Source #
Delete
represents REST resources that support HTTP DELETE requests with any number of arguments.
class Delete1 a where Source #
Delete1
represents REST resources that support HTTP POST requests with 1 argument.
delete1 :: MonadThrow m => a -> TwilioT m () Source #
Instances
Delete1 QueueSID Source # | |
Defined in Twilio.Queue | |
Delete1 RecordingSID Source # | |
Defined in Twilio.Recording delete1 :: MonadThrow m => RecordingSID -> TwilioT m () Source # |
parseJSONFromResponse :: (FromJSON a, MonadThrow m) => Response ByteString -> m a Source #