-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Library for postmarkapp.com HTTP Api -- -- postmark @package postmark @version 0.2.0 module Network.Api.Postmark.Settings data PostmarkSettings PostmarkSettings :: Text -> Text -> PostmarkSettings [apiUrl] :: PostmarkSettings -> Text [apiToken] :: PostmarkSettings -> Text postmarkTestToken :: Text postmarkHttpTest :: PostmarkSettings postmarkHttpsTest :: PostmarkSettings postmarkHttp :: Text -> PostmarkSettings postmarkHttps :: Text -> PostmarkSettings instance GHC.Show.Show Network.Api.Postmark.Settings.PostmarkSettings instance GHC.Classes.Eq Network.Api.Postmark.Settings.PostmarkSettings module Network.Api.Postmark.Error data PostmarkError PostmarkError :: PostmarkErrorType -> Text -> PostmarkError [errorType] :: PostmarkError -> PostmarkErrorType [errorMessage] :: PostmarkError -> Text data PostmarkErrorType PostmarkBadApiToken :: PostmarkErrorType PostmarkInvalidEmail :: PostmarkErrorType PostmarkSenderNotFound :: PostmarkErrorType PostmarkSenderNotConfirmed :: PostmarkErrorType PostmarkInvalidJson :: PostmarkErrorType PostmarkIncompatibleJson :: PostmarkErrorType PostmarkNotAllowed :: PostmarkErrorType PostmarkInactive :: PostmarkErrorType PostmarkBounceNotFound :: PostmarkErrorType PostmarkBounceQueryException :: PostmarkErrorType PostmarkJsonRequired :: PostmarkErrorType PostmarkTooManyMessages :: PostmarkErrorType PostmarkUnkownError :: Int -> PostmarkErrorType instance GHC.Show.Show Network.Api.Postmark.Error.PostmarkError instance GHC.Classes.Eq Network.Api.Postmark.Error.PostmarkError instance GHC.Classes.Eq Network.Api.Postmark.Error.PostmarkErrorType instance Data.Aeson.Types.Class.FromJSON Network.Api.Postmark.Error.PostmarkError instance GHC.Show.Show Network.Api.Postmark.Error.PostmarkErrorType module Network.Api.Postmark.Request data PostmarkRequest e a [PostmarkRequest] :: (FromJSON e, FromJSON a) => StdMethod -> Text -> RequestTransformer -> PostmarkRequest e a type PostmarkRequest' a = PostmarkRequest PostmarkError a module Network.Api.Postmark.Data -- | Email data type. It is recommended that you use the defaultEmail -- function and selector syntax to build an email, e.g.: -- --
--   defaultEmail {
--       emailFrom = "you@yourdomain.com"
--     , emailTo = "person@example.com"
--     , emailSubject = "This is an example email!"
--     }
--   
data Email Email :: Text -> [Text] -> [Text] -> [Text] -> Text -> Maybe Text -> Maybe Text -> Maybe Text -> Text -> Map Text Text -> [Attachment] -> Email [emailFrom] :: Email -> Text [emailTo] :: Email -> [Text] [emailCc] :: Email -> [Text] [emailBcc] :: Email -> [Text] [emailSubject] :: Email -> Text [emailTag] :: Email -> Maybe Text [emailHtml] :: Email -> Maybe Text [emailText] :: Email -> Maybe Text [emailReplyTo] :: Email -> Text [emailHeaders] :: Email -> Map Text Text [emailAttachments] :: Email -> [Attachment] data Attachment Attachment :: Text -> Text -> Text -> Attachment [attachmentName] :: Attachment -> Text [attachmentContent] :: Attachment -> Text [attachmentContentType] :: Attachment -> Text defaultEmail :: Email data Sent Sent :: Text -> Text -> Text -> Sent [postmarkMessageId] :: Sent -> Text [postmarkSubmittedAt] :: Sent -> Text [postmarkTo] :: Sent -> Text ojson :: ToJSON a => Text -> Maybe a -> Maybe (Text, Value) oljson :: ToJSON b => Text -> [a] -> ([a] -> b) -> Maybe (Text, Value) omjson :: (ToJSON a) => Text -> Map Text a -> Maybe (Text, Value) toText :: ByteString -> Text instance GHC.Show.Show Network.Api.Postmark.Data.Sent instance GHC.Classes.Eq Network.Api.Postmark.Data.Sent instance Data.Aeson.Types.Class.ToJSON Network.Api.Postmark.Data.Email instance Data.Aeson.Types.Class.ToJSON Network.Api.Postmark.Data.Attachment instance Data.Aeson.Types.Class.FromJSON Network.Api.Postmark.Data.Sent module Network.Api.Postmark.Response data PostmarkResponse e a PostmarkSuccess :: a -> PostmarkResponse e a PostmarkUnauthorized :: PostmarkResponse e a PostmarkFailure :: e -> PostmarkResponse e a PostmarkUnexpected :: PostmarkUnexpectedType -> Int -> (Maybe Text) -> (Maybe Text) -> PostmarkResponse e a data PostmarkUnexpectedType ServerError :: PostmarkUnexpectedType UnexpectedResponseCode :: PostmarkUnexpectedType JsonSyntaxError :: PostmarkUnexpectedType JsonFormatError :: PostmarkUnexpectedType type PostmarkResponse' a = PostmarkResponse PostmarkError a syntaxErr :: Int -> ByteString -> Text -> PostmarkResponse e a formatErr :: Int -> ByteString -> Text -> PostmarkResponse e a instance (GHC.Show.Show e, GHC.Show.Show a) => GHC.Show.Show (Network.Api.Postmark.Response.PostmarkResponse e a) instance (GHC.Classes.Eq e, GHC.Classes.Eq a) => GHC.Classes.Eq (Network.Api.Postmark.Response.PostmarkResponse e a) instance GHC.Show.Show Network.Api.Postmark.Response.PostmarkUnexpectedType instance GHC.Classes.Eq Network.Api.Postmark.Response.PostmarkUnexpectedType module Network.Api.Postmark.Core -- | Send a single email: -- http://developer.postmarkapp.com/developer-build.html email :: Email -> PostmarkRequest' Sent -- | Bulk send emails: -- http://developer.postmarkapp.com/developer-build.html#batching-messages emails :: [Email] -> PostmarkRequest' [Sent] -- | Run the specified request with the specified settings. request :: PostmarkSettings -> PostmarkRequest e a -> IO (PostmarkResponse e a) -- | Library for postmarkapp.com HTTP Api. -- -- To get start see some examples in the Tutorial module at -- http://hackage.haskell.org/packages/archive/postmark/0.0.2/doc/html/Network-Api-Postmark-Tutorial.html. -- -- Source and more information can be found at -- https://github.com/apiengine/postmark. -- -- To experiment with a live demo try: > $ git clone -- https://github.com/apiengine/postmark > $ cd postmark > $ -- cabal install --only-dependencies && cabal configure -f demo -- && cabal build > $ -- .distbuildpostmark-demopostmark-demo -- -- Issues can be reported at -- https://github.com/apiengine/postmark/issues. module Network.Api.Postmark -- | postmark is a haskell toolkit for dealing with the -- postmarkapp.com api for sending and receiving email. module Network.Api.Postmark.Tutorial