hailgun 0.4.0.5 → 0.4.1.0
raw patch · 6 files changed
+20/−4 lines, 6 filesdep ~tagsoupdep ~timedep ~transformers
Dependency ranges changed: tagsoup, time, transformers
Files
- Mail/Hailgun/Domains.hs +1/−0
- Mail/Hailgun/Errors.hs +1/−0
- Mail/Hailgun/Internal/Data.hs +12/−0
- Mail/Hailgun/Pagination.hs +1/−0
- Mail/Hailgun/SendEmail.hs +1/−0
- hailgun.cabal +4/−4
Mail/Hailgun/Domains.hs view
@@ -33,6 +33,7 @@ { hdrTotalCount :: Integer , hdrItems :: [HailgunDomain] }+ deriving (Show) instance FromJSON HailgunDomainResponse where parseJSON (Object v) = HailgunDomainResponse
Mail/Hailgun/Errors.hs view
@@ -18,6 +18,7 @@ data HailgunErrorResponse = HailgunErrorResponse { herMessage :: String -- ^ A generic message describing the error. }+ deriving (Show) toHailgunError :: String -> HailgunErrorResponse toHailgunError = HailgunErrorResponse
Mail/Hailgun/Internal/Data.hs view
@@ -46,6 +46,7 @@ , hailgunApiKey :: String -- ^ The API key for the mailgun account so that you can successfully make requests. Please note that it should include the 'key' prefix. , hailgunProxy :: Maybe NHC.Proxy }+ deriving (Show) -- | Any email content that you wish to send should be encoded into these types before it is sent. -- Currently, according to the API, you should always send a Text Only part in the email and you can@@ -68,7 +69,9 @@ { textContent :: B.ByteString -- ^ The text content that you wish to send (please note that many clients will take the HTML version first if it is present but that the text version is a great fallback). , htmlContent :: B.ByteString -- ^ The HTML content that you wish to send. }+ deriving (Show) + -- | A Hailgun Email message that may be sent. It contains important information such as the address -- that the email is from, the addresses that it should be going to, the subject of the message and -- the content of the message. Any email that you wish to send via this api must be converted into@@ -82,6 +85,7 @@ , messageBCC :: [TEV.EmailAddress] , messageAttachments :: [SpecificAttachment] }+ deriving (Show) -- TODO o:tag support -- TODO o:campaign support -- messageDKIMSupport :: Bool TODO o:dkim support@@ -101,17 +105,20 @@ { attachmentFilePath :: FilePath , attachmentBody :: AttachmentBody }+ deriving (Show) -- | An Attachment body is the raw data that you want to send with your attachment. data AttachmentBody = AttachmentBS B.ByteString -- ^ A strict ByteString representation of your data. | AttachmentLBS BL.ByteString -- ^ A lazy ByteString representation of your data.+ deriving (Show) data SpecificAttachment = SpecificAttachment { saType :: AttachmentType , saFilePath :: FilePath , saBody :: AttachmentBody }+ deriving (Show) data AttachmentType = Attached | Inline deriving (Eq, Show) @@ -131,6 +138,7 @@ , recipientsCC :: [UnverifiedEmailAddress] -- ^ The people to \"Carbon Copy\" into the email. Honestly, why is that term not deprecated yet? , recipientsBCC :: [UnverifiedEmailAddress] -- ^ The people to \"Blind Carbon Copy\" into the email. There really needs to be a better name for this too. }+ deriving (Show) -- The user should just give us a list of attachments and we should automatically make them inline or not -- We should consider sending the HTML message as a quoted-string: http://hackage.haskell.org/package/dataenc-0.14.0.5/docs/Codec-Binary-QuotedPrintable.html@@ -148,4 +156,8 @@ _ -> fail "could not parse Mailgun Style date" instance ParseTime HailgunTime where+#if MIN_VERSION_time(1,6,0)+ buildTime l input = HailgunTime . zonedTimeToUTC <$> buildTime l input+#else buildTime l = HailgunTime . zonedTimeToUTC . buildTime l+#endif
Mail/Hailgun/Pagination.hs view
@@ -11,6 +11,7 @@ { pageStart :: Integer , pageLength :: Integer }+ deriving (Show) pageToParams :: Page -> [(BC.ByteString, BC.ByteString)] pageToParams page =
Mail/Hailgun/SendEmail.hs view
@@ -65,6 +65,7 @@ { hsrMessage :: String -- ^ The freeform message from the mailgun API. , hsrId :: String -- ^ The ID of the message that has been accepted by the Mailgun api. }+ deriving (Show) instance FromJSON HailgunSendResponse where parseJSON (Object v) = HailgunSendResponse
hailgun.cabal view
@@ -10,7 +10,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.4.0.5+version: 0.4.1.0 -- A short (one-line) description of the package. synopsis: Mailgun REST api interface for Haskell.@@ -73,17 +73,17 @@ , bytestring >= 0.10.4 && <= 0.11 , aeson >= 0.8 && < 0.12 , text == 1.2.*- , transformers >= 0.3 && <0.5+ , transformers >= 0.3 && < 0.6 , http-client == 0.4.* , http-client-tls == 0.2.* , email-validate >= 2.0 && <2.3 , http-types >= 0.8 && < 0.10 , exceptions == 0.8.*- , tagsoup == 0.13.*+ , tagsoup >= 0.13 && < 0.15 , filepath >= 1 && < 2 if flag(newtime)- Build-Depends: time == 1.5.*+ Build-Depends: time >= 1.5 && < 1.7 else Build-Depends: time >= 1.2 && < 1.5, old-locale == 1.*