packages feed

themoviedb 1.1.3.0 → 1.1.4.0

raw patch · 5 files changed

+33/−22 lines, 5 filesdep −eitherdep ~aesondep ~http-typesdep ~tastyPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: either

Dependency ranges changed: aeson, http-types, tasty, tasty-hunit, time

API changes (from Hackage documentation)

- Network.API.TheMovieDB.Internal.TheMovieDB: type RequestFunction = Path -> QueryText -> IO (Either Error Body)
+ Network.API.TheMovieDB.Internal.TheMovieDB: type RequestFunction = (Path -> QueryText -> IO (Either Error Body))

Files

CHANGES.md view
@@ -1,5 +1,11 @@ # Version History +## 1.1.4.0 (March 20, 2018)++  - Update dependency versions++  - Replace `Control.Monad.Trans.Either` with `ExceptT`+ ## 1.1.3.0 (March 19, 2017)    - Widen dependencies for LTS-7.20
LICENSE view
@@ -1,6 +1,6 @@ # Copyright and Authors -    Copyright (C) 2012-2017 Peter Jones <pjones@devalot.com>+    Copyright (C) 2012-2018 Peter Jones <pjones@devalot.com>  # License (MIT) 
README.md view
@@ -1,6 +1,5 @@-# TheMovieDB API for Haskell--[![Build Status](https://travis-ci.org/pjones/themoviedb.svg?branch=master)](https://travis-ci.org/pjones/themoviedb)+TheMovieDB API for Haskell [![Hackage][hackage-shield]][hackage] [![Travis][travis-shield]][travis]+==========================  This is a simple library that provides functions for retrieving movie metadata from [TheMovieDB][] API.  To use this library you need to@@ -10,15 +9,23 @@ [TheMovieDB]: http://themoviedb.org [API]: http://docs.themoviedb.apiary.io -# Documentation+Documentation+=============  See the [Network.API.TheMovieDB][] module for complete documentation.  [Network.API.TheMovieDB]: https://github.com/pjones/themoviedb/blob/master/src/Network/API/TheMovieDB.hs -# Example+Example+=======  There's an [example][] application in the `example` directory. Surprising, I know.  [example]: https://github.com/pjones/themoviedb/blob/master/example/Main.hs++[hackage]: http://hackage.haskell.org/package/themoviedb+[hackage-shield]: https://img.shields.io/badge/hackage-v1.1.4.0-blue.svg++[travis]: https://travis-ci.org/pjones/themoviedb+[travis-shield]: https://travis-ci.org/pjones/themoviedb.svg?branch=master
src/Network/API/TheMovieDB/Internal/TheMovieDB.hs view
@@ -25,7 +25,7 @@ -------------------------------------------------------------------------------- import Control.Applicative import Control.Monad.Reader-import Control.Monad.Trans.Either+import Control.Monad.Trans.Except import Data.Aeson import Network.API.TheMovieDB.Internal.HTTP import Network.API.TheMovieDB.Internal.Types@@ -47,7 +47,7 @@ -------------------------------------------------------------------------------- -- | Result type for operations involving TheMovieDB API. newtype TheMovieDB a =-  TheMovieDB {unTMDB :: ReaderT RequestFunction (EitherT Error IO) a}+  TheMovieDB {unTMDB :: ReaderT RequestFunction (ExceptT Error IO) a}   deriving (Functor, Applicative, Monad, MonadIO)  --------------------------------------------------------------------------------@@ -56,8 +56,7 @@ runRequest :: Path -> QueryText -> TheMovieDB Body runRequest path params = TheMovieDB $ do   func   <- ask-  result <- liftIO (func path params)-  lift (hoistEither result)+  lift (ExceptT $ liftIO (func path params))  -------------------------------------------------------------------------------- -- | Helper function to preform an HTTP GET and decode the JSON result.@@ -72,7 +71,7 @@ -------------------------------------------------------------------------------- -- | Create a 'TheMovieDB' value representing an error. tmdbError :: Error -> TheMovieDB a-tmdbError = TheMovieDB . lift . left+tmdbError = TheMovieDB . lift . throwE  -------------------------------------------------------------------------------- -- | Execute requests for TheMovieDB with the given API key and produce@@ -109,4 +108,4 @@   :: RequestFunction            -- ^ The request function to use.   -> TheMovieDB a               -- ^ The API calls to make.   -> IO (Either Error a)        -- ^ Response.-runTheMovieDBWithRequestFunction f t = runEitherT $ runReaderT (unTMDB t) f+runTheMovieDBWithRequestFunction f t = runExceptT $ runReaderT (unTMDB t) f
themoviedb.cabal view
@@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- name:          themoviedb-version:       1.1.3.0+version:       1.1.4.0 synopsis:      Haskell API bindings for http://themoviedb.org homepage:      http://github.com/pjones/themoviedb bug-reports:   http://github.com/pjones/themoviedb/issues@@ -8,12 +8,12 @@ license-file:  LICENSE author:        Peter Jones <pjones@devalot.com> maintainer:    Peter Jones <pjones@devalot.com>-copyright:     Copyright: (c) 2012-2017 Peter Jones+copyright:     Copyright: (c) 2012-2018 Peter Jones category:      Network, API stability:     experimental-tested-with:   GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1+tested-with:   GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1 build-type:    Simple-cabal-version: >=1.10+cabal-version: 1.18 description:   This library provides functions for retrieving metadata                from the <http://TheMovieDB.org> API.  Documentation                can be found in the "Network.API.TheMovieDB" module.@@ -60,18 +60,17 @@   if flag(maintainer)     ghc-options: -Werror -  build-depends: aeson              >= 0.6    && < 1.2+  build-depends: aeson              >= 0.6    && < 1.4                , base               >= 4.6    && < 5.0                , binary             >= 0.7    && < 0.10                , bytestring         >= 0.9    && < 0.11-               , either             >= 4.3    && < 4.5                , http-client        >= 0.4.31 && < 0.6                , http-client-tls    >= 0.2.2  && < 0.4-               , http-types         >= 0.8    && < 0.10+               , http-types         >= 0.8    && < 0.13                , mtl                >= 2.1    && < 2.3                , text               >= 0.11   && < 1.3                , text-binary        >= 0.1    && < 0.3-               , time               >= 1.5    && < 1.9+               , time               >= 1.5    && < 1.10                , time-locale-compat >= 0.1    && < 0.2                , transformers       >= 0.3    && < 0.6 @@ -109,8 +108,8 @@    build-depends: base                , bytestring-               , tasty       >= 0.10 && < 0.12-               , tasty-hunit >= 0.9  && < 0.10+               , tasty       >= 0.10 && < 1.1+               , tasty-hunit >= 0.9  && < 0.11                , text                , themoviedb                , time