themoviedb 1.2.1 → 1.2.2
raw patch · 5 files changed
+19/−34 lines, 5 filesdep ~aesondep ~mtldep ~reludesetup-changed
Dependency ranges changed: aeson, mtl, relude, text, time
Files
- CHANGES.md +1/−0
- Setup.hs +0/−16
- src/Network/API/TheMovieDB/Internal/Date.hs +2/−2
- src/Network/API/TheMovieDB/Internal/Settings.hs +9/−9
- themoviedb.cabal +7/−7
CHANGES.md view
@@ -16,6 +16,7 @@ - 1.2.0.1 (October 27, 2020) - 1.2.1 (June 2, 2021)+ - 1.2.2 (July 13, 2022) (Thanks to ragreener1) ## 1.1.5.2 (April 15, 2019)
− Setup.hs
@@ -1,16 +0,0 @@--- |------ Copyright:--- This file is part of the package themoviedb. It is subject to--- the license terms in the LICENSE file found in the top-level--- directory of this distribution and at:------ https://github.com/pjones/themoviedb------ No part of this package, including this file, may be copied,--- modified, propagated, or distributed except according to the terms--- contained in the LICENSE file.------ License: MIT-import Distribution.Simple-main = defaultMain
src/Network/API/TheMovieDB/Internal/Date.hs view
@@ -32,7 +32,7 @@ newtype Date = Date {day :: Maybe Day} deriving (Eq, Show) -- | Aeson helper function to parse dates in TheMovieDB API.-parseDay :: Object -> Text -> Parser (Maybe Day)+parseDay :: Object -> Key -> Parser (Maybe Day) parseDay v key = do m <- date return (m >>= day)@@ -41,7 +41,7 @@ date = v .:? key <|> pure Nothing -- | Infix alias for 'parseDay'.-(.::) :: Object -> Text -> Parser (Maybe Day)+(.::) :: Object -> Key -> Parser (Maybe Day) (.::) = parseDay -- | Parse release dates in JSON.
src/Network/API/TheMovieDB/Internal/Settings.hs view
@@ -18,7 +18,7 @@ ) where -import Data.Aeson+import qualified Data.Aeson as Aeson import Network.API.TheMovieDB.Internal.Types -- | Settings used by this library.@@ -29,17 +29,17 @@ tmdbLanguage :: Maybe LanguageCode } -instance FromJSON Settings where- parseJSON = withObject "Settings" $ \v ->+instance Aeson.FromJSON Settings where+ parseJSON = Aeson.withObject "Settings" $ \v -> Settings- <$> v .: "key"- <*> v .: "lang"+ <$> v Aeson..: "key"+ <*> v Aeson..: "lang" -instance ToJSON Settings where+instance Aeson.ToJSON Settings where toJSON Settings {..} =- object- [ "key" .= tmdbKey,- "lang" .= tmdbLanguage+ Aeson.object+ [ "key" Aeson..= tmdbKey,+ "lang" Aeson..= tmdbLanguage ] -- | Default settings.
themoviedb.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: themoviedb-version: 1.2.1+version: 1.2.2 synopsis: Haskell API bindings for http://themoviedb.org homepage: https://github.com/pjones/themoviedb bug-reports: https://github.com/pjones/themoviedb/issues@@ -12,7 +12,7 @@ category: Network, API stability: stable build-type: Simple-tested-with: GHC ==8.8.4 || ==8.10.4 || ==9.0.1+tested-with: GHC ==8.10.7 || ==9.0.2 || ==9.2.3 description: This library provides functions for retrieving metadata from the <http://TheMovieDB.org> API. Documentation@@ -63,15 +63,15 @@ -------------------------------------------------------------------------------- common dependencies build-depends:- , aeson >=1.0 && <1.6+ , aeson >=2.0 && <2.2 , base >=4.6 && <5.0 , http-client >=0.4.31 && <0.8 , http-client-tls >=0.2.2 && <0.4 , http-types >=0.8 && <0.13- , mtl >=2.1 && <2.3- , relude ^>=1.0- , text >=0.11 && <1.3- , time >=1.5 && <1.12+ , mtl >=2.1 && <2.4+ , relude >=1.0 && <1.2+ , text >=0.11 && <2.1+ , time >=1.5 && <1.14 mixins: base hiding (Prelude),