packages feed

google-oauth2 0.2.0 → 0.2.1

raw patch · 2 files changed

+7/−5 lines, 2 filesdep ~HTTPdep ~aesonPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: HTTP, aeson

API changes (from Hackage documentation)

- Network.Google.OAuth2: accessToken :: OAuth2Tokens -> !OAuth2Token
- Network.Google.OAuth2: clientId :: OAuth2Client -> !String
- Network.Google.OAuth2: clientSecret :: OAuth2Client -> !String
- Network.Google.OAuth2: credsClient :: Credentials -> OAuth2Client
- Network.Google.OAuth2: credsTokens :: Credentials -> OAuth2Tokens
- Network.Google.OAuth2: expiresIn :: OAuth2Tokens -> !Int
- Network.Google.OAuth2: instance FromJSON OAuth2Tokens
- Network.Google.OAuth2: instance FromJSON RefreshResponse
- Network.Google.OAuth2: instance Read Credentials
- Network.Google.OAuth2: instance Read OAuth2Client
- Network.Google.OAuth2: instance Read OAuth2Tokens
- Network.Google.OAuth2: instance Show Credentials
- Network.Google.OAuth2: instance Show OAuth2Client
- Network.Google.OAuth2: instance Show OAuth2Tokens
- Network.Google.OAuth2: refreshToken :: OAuth2Tokens -> !OAuth2Token
- Network.Google.OAuth2: tokenType :: OAuth2Tokens -> !String
+ Network.Google.OAuth2: [accessToken] :: OAuth2Tokens -> !OAuth2Token
+ Network.Google.OAuth2: [clientId] :: OAuth2Client -> !String
+ Network.Google.OAuth2: [clientSecret] :: OAuth2Client -> !String
+ Network.Google.OAuth2: [credsClient] :: Credentials -> OAuth2Client
+ Network.Google.OAuth2: [credsTokens] :: Credentials -> OAuth2Tokens
+ Network.Google.OAuth2: [expiresIn] :: OAuth2Tokens -> !Int
+ Network.Google.OAuth2: [refreshToken] :: OAuth2Tokens -> !OAuth2Token
+ Network.Google.OAuth2: [tokenType] :: OAuth2Tokens -> !String
+ Network.Google.OAuth2: instance Data.Aeson.Types.Class.FromJSON Network.Google.OAuth2.OAuth2Tokens
+ Network.Google.OAuth2: instance Data.Aeson.Types.Class.FromJSON Network.Google.OAuth2.RefreshResponse
+ Network.Google.OAuth2: instance GHC.Read.Read Network.Google.OAuth2.Credentials
+ Network.Google.OAuth2: instance GHC.Read.Read Network.Google.OAuth2.OAuth2Client
+ Network.Google.OAuth2: instance GHC.Read.Read Network.Google.OAuth2.OAuth2Tokens
+ Network.Google.OAuth2: instance GHC.Show.Show Network.Google.OAuth2.Credentials
+ Network.Google.OAuth2: instance GHC.Show.Show Network.Google.OAuth2.OAuth2Client
+ Network.Google.OAuth2: instance GHC.Show.Show Network.Google.OAuth2.OAuth2Tokens

Files

google-oauth2.cabal view
@@ -1,5 +1,5 @@ Name:                   google-oauth2-Version:                0.2.0+Version:                0.2.1 Author:                 Pat Brisbin <pbrisbin@gmail.com> Maintainer:             Pat Brisbin <pbrisbin@gmail.com> License:                MIT@@ -56,8 +56,8 @@   GHC-Options:          -Wall   Exposed-Modules:      Network.Google.OAuth2   Build-Depends:        base >= 4 && < 5-                      , HTTP            >= 4000.2       && < 4000.3-                      , aeson           >= 0.8          && < 0.9+                      , HTTP            >= 4000.2       && < 4000.4+                      , aeson           >= 0.8          && < 0.10                       , bytestring                       , http-conduit   Default-Extensions:   OverloadedStrings
src/Network/Google/OAuth2.hs view
@@ -33,8 +33,9 @@ import Network.HTTP.Conduit     ( Response(..)     , httpLbs+    , newManager     , parseUrl-    , withManager+    , tlsManagerSettings     , urlEncodedBody     ) import Network.HTTP.Base (urlEncode)@@ -188,7 +189,8 @@      let params' = map (second C8.pack) params -    fmap unsafeDecode $ withManager $ httpLbs $ urlEncodedBody params' request+    mngr <- newManager tlsManagerSettings+    unsafeDecode <$> httpLbs (urlEncodedBody params' request) mngr  cachedValue :: Read a => FilePath -> IO (Maybe a) cachedValue tokenFile = do