-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Library for postmarkapp.com HTTP Api -- -- postmark @package postmark @version 0.0.2 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 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 Eq PostmarkErrorType instance Eq PostmarkError instance Show PostmarkError instance Show PostmarkErrorType instance FromJSON PostmarkError module Network.Api.Postmark.Request data PostmarkRequest e a PostmarkRequest :: StdMethod -> Text -> RequestTransformer IO -> 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 Eq Sent instance Show Sent instance FromJSON Sent instance ToJSON Attachment instance ToJSON Email 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 Eq PostmarkUnexpectedType instance Show PostmarkUnexpectedType instance (Eq e, Eq a) => Eq (PostmarkResponse e a) instance (Show e, Show a) => Show (PostmarkResponse e a) 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 module Network.Api.Postmark