gogol 0.1.1 → 0.2.0
raw patch · 7 files changed
+47/−9 lines, 7 filesdep ~gogol-corePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: gogol-core
API changes (from Hackage documentation)
- Network.Google: _Error :: Prism' a Error
+ Network.Google: _Error :: AsError a => Prism' a Error
- Network.Google: _SerializeError :: Prism' a SerializeError
+ Network.Google: _SerializeError :: AsError a => Prism' a SerializeError
- Network.Google: _ServiceError :: Prism' a ServiceError
+ Network.Google: _ServiceError :: AsError a => Prism' a ServiceError
- Network.Google: _TransportError :: Prism' a HttpException
+ Network.Google: _TransportError :: AsError a => Prism' a HttpException
Files
- CHANGELOG.md +23/−1
- gogol.cabal +2/−2
- src/Network/Google.hs +1/−1
- src/Network/Google/Auth.hs +1/−1
- src/Network/Google/Auth/InstalledApplication.hs +1/−1
- src/Network/Google/Auth/ServiceAccount.hs +3/−3
- src/Network/Google/Internal/Auth.hs +16/−0
CHANGELOG.md view
@@ -1,5 +1,28 @@ # Change Log +## [0.2.0](https://github.com/brendanhay/gogol/tree/0.2.0)++Released: **12 February, 2017**, Compare: [0.1.1](https://github.com/brendanhay/gogol/compare/0.1.1...0.2.0)++### Fixed++- Removal of 'smart'-deserialisation of Base64-encoded byte streams. [\#47](https://github.com/brendanhay/gogol/issues/47) [\#58](https://github.com/brendanhay/gogol/pull/58)+- Various fixes for Installed Application AuthN/AuthZ example. [\#39](https://github.com/brendanhay/gogol/pull/39)+- Various fixes for token-based refresh requests. [\#37](https://github.com/brendanhay/gogol/pull/37) [\#53](https://github.com/brendanhay/gogol/pull/53) [\#55](https://github.com/brendanhay/gogol/pull/55) [\#57](https://github.com/brendanhay/gogol/pull/57)+- CSV quote parameters in BigQuery should be optional. [\#52](https://github.com/brendanhay/gogol/issues/52)+- Fixed the incocrrect construction of URL's containing mode suffixes, such as `:commit`. [\#33](https://github.com/brendanhay/gogol/issues/33) [\#34](https://github.com/brendanhay/gogol/pull/34) [\#49](https://github.com/brendanhay/gogol/issues/49)++### New Libraries++- `gogol-manufacturers`: [Manage](https://developers.google.com/manufacturers/) your product listings for [Google Manufacturer Center](https://www.google.com/retail/manufacturer-center/).+- `gogol-slides`: [Slides Overview](https://developers.google.com/slides/how-tos/overview).+- `gogol-language`: [Natural Language Overview](https://cloud.google.com/natural-language/).++### Updated Service Definitions++- All service definitions have been updated to their latest respective versions.++ ## [0.1.1](https://github.com/brendanhay/gogol/tree/0.1.1) Released: **03 November, 2016**, Compare: [0.1.0](https://github.com/brendanhay/gogol/compare/0.1.0...0.1.1) @@ -8,7 +31,6 @@ - Fixes for incorrectly serialised project/commit URL identifiers. [\#34](https://github.com/brendanhay/gogol/pull/34) - Correcting `/computeMetadta/V1` path prefix for metadata token refresh URLs. [\#37](https://github.com/brendanhay/gogol/pull/37) - Fixes for Installed Application authentication flow. [\#39](https://github.com/brendanhay/gogol/pull/34)- ### Updated Service Definitions
gogol.cabal view
@@ -1,5 +1,5 @@ name: gogol-version: 0.1.1+version: 0.2.0 synopsis: Comprehensive Google Services SDK. homepage: https://github.com/brendanhay/gogol bug-reports: https://github.com/brendanhay/gogol/issues@@ -66,7 +66,7 @@ , directory >= 1.2 , exceptions >= 0.6 , filepath >= 1.2- , gogol-core == 0.1.1.*+ , gogol-core == 0.2.0.* , http-client >= 0.5 && < 1 , http-conduit >= 2.2 && < 3 , http-media >= 0.6
src/Network/Google.hs view
@@ -312,7 +312,7 @@ > bkt = "my-storage-bucket" > > runResourceT . runGoogle env $ -- (5)-> upload (objectsInsert bkt object' & oiName ?~ key) bkt+> upload (objectsInsert bkt object' & oiName ?~ key) body Breaking down the above example, we have the following points of interest:
src/Network/Google/Auth.hs view
@@ -145,7 +145,7 @@ FromClient x n -> exchangeCode x n FromUser u -> authorizedUserToken u Nothing --- | Refresh an existing 'OAuthToken' using+-- | Refresh an existing 'OAuthToken'. refresh :: forall m s. (MonadIO m, MonadCatch m, AllowScopes s) => Auth s -> Logger
src/Network/Google/Auth/InstalledApplication.hs view
@@ -109,7 +109,7 @@ -> Manager -> m (OAuthToken s) exchangeCode c n = refreshRequest $- accountsRequest+ tokenRequest { Client.requestBody = textBody $ "grant_type=authorization_code" <> "&client_id=" <> toQueryParam (_clientId c)
src/Network/Google/Auth/ServiceAccount.hs view
@@ -68,7 +68,7 @@ -> Manager -> m (OAuthToken s) authorizedUserToken u r = refreshRequest $- accountsRequest+ tokenRequest { Client.requestBody = textBody $ "grant_type=refresh_token" <> "&client_id=" <> toQueryParam (_userId u)@@ -86,7 +86,7 @@ -> m (OAuthToken s) serviceAccountToken s p l m = do b <- encodeBearerJWT s p- let rq = accountsRequest+ let rq = tokenRequest { Client.requestBody = RequestBodyBS $ "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer" <> "&assertion="@@ -126,7 +126,7 @@ ] payload = base64Encode- [ "aud" .= accountsURL+ [ "aud" .= tokenURL , "scope" .= concatScopes (allowScopes p) , "iat" .= n , "exp" .= (n + seconds maxTokenLifetime)
src/Network/Google/Internal/Auth.hs view
@@ -260,6 +260,22 @@ ] } +-- | @https://www.googleapis.com/oauth2/v4/token@.+tokenURL :: Text+tokenURL = "https://www.googleapis.com/oauth2/v4/token"++tokenRequest :: Client.Request+tokenRequest = Client.defaultRequest+ { Client.host = "www.googleapis.com"+ , Client.port = 443+ , Client.secure = True+ , Client.method = "POST"+ , Client.path = "/oauth2/v4/token"+ , Client.requestHeaders =+ [ (hContentType, "application/x-www-form-urlencoded")+ ]+ }+ refreshRequest :: (MonadIO m, MonadCatch m) => Client.Request -> Logger