packages feed

battlenet-yesod 0.1.0.1 → 0.2.0.0

raw patch · 2 files changed

+10/−8 lines, 2 filesdep +textdep ~battlenetPVP ok

version bump matches the API change (PVP)

Dependencies added: text

Dependency ranges changed: battlenet

API changes (from Hackage documentation)

- BattleNet.Yesod: yesodBnet :: (MonadHandler m, YesodBattleNet (HandlerSite m)) => (Manager -> BattleNetApiKey -> IO a) -> m a
+ BattleNet.Yesod: yesodBnet :: (MonadHandler m, YesodBattleNet (HandlerSite m)) => Text -> (Manager -> BattleNetConnectionInfo -> IO a) -> m a
- BattleNet.Yesod: yesodBnetWithApp :: YesodBattleNet app => app -> (Manager -> BattleNetApiKey -> IO a) -> IO a
+ BattleNet.Yesod: yesodBnetWithApp :: YesodBattleNet app => Text -> app -> (Manager -> BattleNetConnectionInfo -> IO a) -> IO a

Files

BattleNet/Yesod.hs view
@@ -3,17 +3,18 @@ import BattleNet import Yesod.Core import Control.Monad+import Data.Text import Network.HTTP.Conduit  class YesodBattleNet app where     battleNetKey :: app -> BattleNetApiKey     battleNetHttp :: app -> Manager -yesodBnetWithApp :: (YesodBattleNet app) => app -> (Manager -> BattleNetApiKey -> IO a) -> IO a-yesodBnetWithApp yesod endpoint =-        endpoint manager key-    where key = battleNetKey yesod+yesodBnetWithApp :: (YesodBattleNet app) => Text -> app -> (Manager -> BattleNetConnectionInfo -> IO a) -> IO a+yesodBnetWithApp region yesod endpoint =+        endpoint manager settings+    where settings = BattleNetConnectionInfo (battleNetKey yesod) region           manager = battleNetHttp yesod -yesodBnet :: (MonadHandler m, YesodBattleNet (HandlerSite m)) => (Manager -> BattleNetApiKey -> IO a) -> m a-yesodBnet endpoint = getYesod >>= liftIO . (flip yesodBnetWithApp endpoint)+yesodBnet :: (MonadHandler m, YesodBattleNet (HandlerSite m)) => Text -> (Manager -> BattleNetConnectionInfo -> IO a) -> m a+yesodBnet region endpoint = getYesod >>= liftIO . flip (yesodBnetWithApp region) endpoint
battlenet-yesod.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             0.1.0.1+version:             0.2.0.0  -- A short (one-line) description of the package. synopsis:            Yesod integration for the battlenet package@@ -62,7 +62,8 @@   -- Other library packages from which modules are imported.   build-depends:       base >=4.7 && <4.8,                        http-conduit >=2.1.4 && <2.2,-                       battlenet >=0.1 && <0.2,+                       battlenet >=0.2 && <0.3,+                       text >=1.2 && <1.3,                        yesod-core   -- Directories containing source files.   -- hs-source-dirs: