packages feed

google-maps-geocoding 0.5.0.1 → 0.7.0.0

raw patch · 3 files changed

+34/−16 lines, 3 filesdep ~aesondep ~basedep ~google-static-mapsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aeson, base, google-static-maps, http-client, servant, servant-client

API changes (from Hackage documentation)

+ Web.Google.Geocoding: Afrikaans :: Language
+ Web.Google.Geocoding: Amharic :: Language
+ Web.Google.Geocoding: Armenian :: Language
+ Web.Google.Geocoding: Azerbaijani :: Language
+ Web.Google.Geocoding: Bosnian :: Language
+ Web.Google.Geocoding: Chinese :: Language
+ Web.Google.Geocoding: ChineseHongKong :: Language
+ Web.Google.Geocoding: Estonian :: Language
+ Web.Google.Geocoding: FrenchCanadian :: Language
+ Web.Google.Geocoding: Georgian :: Language
+ Web.Google.Geocoding: Icelandic :: Language
+ Web.Google.Geocoding: Khmer :: Language
+ Web.Google.Geocoding: Lao :: Language
+ Web.Google.Geocoding: Malay :: Language
+ Web.Google.Geocoding: Mongolian :: Language
+ Web.Google.Geocoding: Nepali :: Language
+ Web.Google.Geocoding: Sinhalese :: Language
+ Web.Google.Geocoding: SpanishLatinAmerican :: Language
+ Web.Google.Geocoding: Swahili :: Language
+ Web.Google.Geocoding: Urdu :: Language
+ Web.Google.Geocoding: Zulu :: Language

Files

changelog.md view
@@ -1,3 +1,9 @@+# 0.7.0.0
+
+* Add additional languages
+
+* Update dependencies for GHC 8.10.4 and revisit upper bounds
+
 # 0.5.0.1
 
 * Update dependencies for GHC 8.8.1
google-maps-geocoding.cabal view
@@ -1,5 +1,5 @@ name:                google-maps-geocoding
-version:             0.5.0.1
+version:             0.7.0.0
 synopsis:            Bindings to the Google Geocoding API (formerly Maps
                      Geocoding API)
 description:         The
@@ -34,14 +34,15 @@ library
   hs-source-dirs:      src
   exposed-modules:     Web.Google.Geocoding
-  build-depends:       base >= 4.8 && < 4.14
-                     , aeson >= 1.1 && < 1.5
-                     , google-static-maps >= 0.6 && < 0.7
-                     , http-client >= 0.5 && < 0.7
-                     , servant >= 0.16 && < 0.17
-                     , servant-client >= 0.16 && < 0.17
+  build-depends:       base >= 4.8 && < 4.15
+                     , aeson >= 1.1 && < 1.6
+                     , google-static-maps >= 0.7 && < 0.8
+                     , http-client >= 0.5 && < 0.8
+                     , servant >= 0.16 && < 0.19
+                     , servant-client >= 0.16 && < 0.19
                      , text >= 1.2 && < 1.3
   default-language:    Haskell2010
+  ghc-options:         -Wall
 
 source-repository head
   type:                git
src/Web/Google/Geocoding.hs view
@@ -114,18 +114,23 @@     , LocationType         (..)
     ) where
 
-import Data.Aeson hiding (Result)
-import Data.Aeson.Types (Options (..))
+import Data.Aeson (FromJSON (parseJSON), Options (fieldLabelModifier),
+    defaultOptions, genericParseJSON, withText)
 import Data.List (intersperse)
-import Data.Proxy
+import Data.Proxy (Proxy (..))
 import Data.Text (Text)
 import qualified Data.Text as T (concat, unpack)
 import GHC.Generics (Generic)
 import Network.HTTP.Client (Manager)
-import Servant.API
-import Servant.Client
-import Web.Google.Maps.Common (Address (..), googleMapsApis, Key (..),
-    Language (..), LatLng (..), Location (..), Region (..))
+import Servant.API (type (:<|>) (..), type (:>), Get, JSON, QueryParam,
+    ToHttpApiData (toUrlPiece))
+import Servant.Client (ClientError, ClientEnv (ClientEnv), ClientM, client,
+    runClientM)
+#if MIN_VERSION_servant_client(0,17,0)
+import Servant.Client (defaultMakeClientRequest)
+#endif
+import Web.Google.Maps.Common (Address (..), Key (..), Language (..),
+    LatLng (..), Location (..), Region (..), googleMapsApis)
 
 -- | Fliter component: a component that can be used to filter the results
 -- returned in a geocoding response.
@@ -348,8 +353,11 @@     regionOpt
     = runClientM (geocode' (Just key) addressOpt filterComponentsOpt viewportOpt
           languageOpt regionOpt)
+-- makeClientRequest supported from servant-client-0.17
+#if MIN_VERSION_servant_client(0,17,0)
+          (ClientEnv mgr googleMapsApis Nothing defaultMakeClientRequest)
 -- CookieJar supported from servant-client-0.13
-#if MIN_VERSION_servant_client(0,13,0)
+#elif MIN_VERSION_servant_client(0,13,0)
           (ClientEnv mgr googleMapsApis Nothing)
 #else
           (ClientEnv mgr googleMapsApis)
@@ -381,8 +389,11 @@     languageOpt
     = runClientM (backGeocode' (Just key) latLngOpt placeIdOpt addressTypeOpt
           locationTypeOpt languageOpt)
+-- makeClientRequest supported from servant-client-0.17
+#if MIN_VERSION_servant_client(0,17,0)
+          (ClientEnv mgr googleMapsApis Nothing defaultMakeClientRequest)
 -- CookieJar supported from servant-client-0.13
-#if MIN_VERSION_servant_client(0,13,0)
+#elif MIN_VERSION_servant_client(0,13,0)
           (ClientEnv mgr googleMapsApis Nothing)
 #else
           (ClientEnv mgr googleMapsApis)