kraken 0.0.2 → 0.0.3
raw patch · 2 files changed
+4/−5 lines, 2 filesdep ~basedep ~bytestringdep ~http-clientPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, bytestring, http-client
API changes (from Hackage documentation)
Files
- kraken.cabal +1/−1
- src/Network/Kraken.hs +3/−4
kraken.cabal view
@@ -1,5 +1,5 @@ name: kraken-version: 0.0.2+version: 0.0.3 synopsis: Kraken.io API client description:
src/Network/Kraken.hs view
@@ -133,9 +133,8 @@ compressImage :: Handle -> Options -> ByteString -> IO (Either Error ByteString) compressImage h opt img = do- let Just req0 = parseUrl "https://api.kraken.io/v1/upload"- req <- insertRequestBody req0- res <- httpLbs (req { checkStatus = \_ _ _ -> Nothing }) (hManager h)+ req <- insertRequestBody $ parseRequest_ "https://api.kraken.io/v1/upload"+ res <- httpLbs req (hManager h) runExceptT $ do v <- case eitherDecode' (responseBody res) of@@ -167,7 +166,7 @@ downloadBinary :: Manager -> String -> IO (Either Error ByteString) downloadBinary m url = runExceptT $ do- req <- ExceptT $ return $ case parseUrl url of+ req <- ExceptT $ return $ case parseRequest url of Nothing -> throwError $ Error $ "Failed to parse download URL: " ++ url Just x -> return x