dropbox 0.0.2 → 0.0.3
raw patch · 4 files changed
+26/−15 lines, 4 filesdep ~basedep ~servant-clientPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, servant-client
API changes (from Hackage documentation)
+ Dropbox: TokenBody :: Maybe Text -> Maybe Text -> Text -> Text -> Text -> Text -> TokenBody
+ Dropbox: TokenRequest :: Text -> Maybe Int -> Text -> Maybe Text -> Text -> Text -> Text -> TokenRequest
+ Dropbox: [client_id] :: TokenBody -> Text
+ Dropbox: [client_secret] :: TokenBody -> Text
+ Dropbox: [code] :: TokenBody -> Maybe Text
+ Dropbox: [grant_type] :: TokenBody -> Text
+ Dropbox: [redirect_uri] :: TokenBody -> Text
+ Dropbox: [refresh_token] :: TokenBody -> Maybe Text
+ Dropbox: [trAccessToken] :: TokenRequest -> Text
+ Dropbox: [trAccountId] :: TokenRequest -> Text
+ Dropbox: [trExpiresIn] :: TokenRequest -> Maybe Int
+ Dropbox: [trRefreshToken] :: TokenRequest -> Maybe Text
+ Dropbox: [trScope] :: TokenRequest -> Text
+ Dropbox: [trTokenType] :: TokenRequest -> Text
+ Dropbox: [trUid] :: TokenRequest -> Text
+ Dropbox: data TokenBody
+ Dropbox: data TokenRequest
Files
- Changelog.md +11/−0
- Readme.md +5/−7
- dropbox.cabal +7/−7
- src/Dropbox.hs +3/−1
Changelog.md view
@@ -1,5 +1,16 @@ # Change log for dropbox +## Version 0.0.3+++ Expose token body and token response.+ Api is unusable without these++ Add upper restrictions on ghc and servant+++## Version 0.0.2++Fix github links on hackage+ ## Version 0.0.1 Fix haddock issue
Readme.md view
@@ -8,13 +8,6 @@ generic type definition. Additional endpoints are welcome, feel free to make a PR! ---## History-This is the result from the great riskbook hackathon-of oktober 2020-(also known as festoberhack).- ## Usage There is an example in `app/exe.hs`.@@ -38,3 +31,8 @@ ``` make ghcid ```++## History+This is the result from the great riskbook hackathon+of oktober 2020+(also known as festoberhack).
dropbox.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: dropbox-version: 0.0.2+version: 0.0.3 synopsis: Dropbox API client description: A dropbox API client generated through servant generic. category: API@@ -36,13 +36,13 @@ ghc-options: -Wall -Wcompat -Wincomplete-uni-patterns -Wredundant-constraints -Wincomplete-record-updates -Widentities build-depends: aeson- , base >=4.7 && <5+ , base >=4.7 && <4.15.0 , http-api-data , http-client-tls , servant , servant-auth , servant-auth-client- , servant-client+ , servant-client <0.19 , servant-client-core , text default-language: Haskell2010@@ -56,14 +56,14 @@ ghc-options: -Wall -Wcompat -Wincomplete-uni-patterns -Wredundant-constraints -Wincomplete-record-updates -Widentities -threaded -rtsopts -with-rtsopts=-N build-depends: aeson- , base >=4.7 && <5+ , base >=4.7 && <4.15.0 , dropbox , http-api-data , http-client-tls , servant , servant-auth , servant-auth-client- , servant-client+ , servant-client <0.19 , servant-client-core , text default-language: Haskell2010@@ -81,7 +81,7 @@ build-depends: aeson , aeson-qq- , base >=4.7 && <5+ , base >=4.7 && <4.15.0 , dropbox , hspec , hspec-core@@ -90,7 +90,7 @@ , servant , servant-auth , servant-auth-client- , servant-client+ , servant-client <0.19 , servant-client-core , text default-language: Haskell2010
src/Dropbox.hs view
@@ -31,6 +31,8 @@ , path , LinkResponse(..) , LinkRequest(..)+ , TokenRequest(..)+ , TokenBody(..) ) where import Control.Exception(throwIO)@@ -103,7 +105,6 @@ { entries :: [Entry] } deriving (Generic, FromJSON, Show, Eq) --- https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token data TokenRequest = TokenRequest { trAccessToken :: Text , trExpiresIn :: Maybe Int -- seconds@@ -146,6 +147,7 @@ _dropbox_list_folder :: route :- "2" :> "files" :> "list_folder" :> Auth '[Bearer] Token :> ReqBody '[JSON] ListFolderRequest :> Post '[JSON] ListFolderResponse -- | https://www.dropbox.com/developers/documentation/http/documentation#files-get_temporary_link , _dropbox_get_temporary_link :: route :- "2" :> "files" :> "get_temporary_link" :> Auth '[Bearer] Token :> ReqBody '[JSON] LinkRequest :> Post '[JSON] LinkResponse+ -- | https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token , _dropbox_token :: route :- "oauth2" :> "token" :> ReqBody '[FormUrlEncoded] TokenBody :> Post '[JSON] TokenRequest } deriving Generic