campfire 0.0.1 → 0.1.1
raw patch · 2 files changed
+18/−17 lines, 2 filesdep ~aesondep ~attoparsecdep ~http-enumeratorPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson, attoparsec, http-enumerator
API changes (from Hackage documentation)
Files
- Web/Campfire.hs +14/−13
- campfire.cabal +4/−4
Web/Campfire.hs view
@@ -312,19 +312,20 @@ where req = genRequest key sub pth [] meth pay genRequest :: T.Text -> T.Text -> T.Text -> Query -> Method -> LBS.ByteString -> Request IO-genRequest key sub pth params meth pay = applyBasicAuth bkey "X" Request { - method = meth,- secure = True,- checkCerts = \_ -> return True, -- uhhh- host = h,- port = 443,- path = encodeUtf8 pth,- queryString = params,- requestHeaders = headers,- requestBody = RequestBodyLBS pay }- where h = encodeUtf8 $ T.concat [sub, ".campfirenow.com"]- headers = [headerContentType "application/json"]- bkey = encodeUtf8 key+genRequest key sub pth params meth pay = applyBasicAuth bkey "X" req+ where req = def {+ method = meth,+ secure = True,+ host = h,+ port = 443,+ path = encodeUtf8 pth,+ queryString = params,+ requestHeaders = headers,+ requestBody = RequestBodyLBS pay+ } + h = encodeUtf8 $ T.concat [sub, ".campfirenow.com"]+ headers = [headerContentType "application/json"]+ bkey = encodeUtf8 key handleResponse :: (Int, LBS.ByteString) -> Either Int T.Text handleResponse (200, str) = Right $ T.pack $ LBS.unpack str
campfire.cabal view
@@ -1,5 +1,5 @@ name: campfire-version: 0.0.1+version: 0.1.1 synopsis: Haskell implementation of the Campfire API description: Implements the Campfire REST API. Campfire is a business group chat system@@ -26,11 +26,11 @@ Web.Campfire.Monad Ghc-Options: -Wall build-depends: base >= 4 && < 5,- aeson >= 0.3.1.1 && < 0.4,+ aeson >= 0.3.2.12 && < 0.4, bytestring >= 0.9.1.10 && < 0.10, text >= 0.11.0.5 && < 0.12,- attoparsec >= 0.8.5.0 && < 0.9,- http-enumerator >= 0.6.5 && < 0.7,+ attoparsec >= 0.9 && < 0.10,+ http-enumerator >= 0.7.1 && < 0.8, mtl >= 2.0.1.0 && < 2.1, time >= 1.2.0.3 && < 1.3, transformers >= 0.2.2.0 && < 0.3,