Safe Haskell | None |
---|---|
Language | Haskell2010 |
A dropbox client
Synopsis
- createClient :: IO (Dropbox (AsClientT IO))
- dropboxProxy :: Proxy (ToServant Dropbox AsApi)
- data Dropbox route = Dropbox {
- _dropbox_list_folder :: route :- ("2" :> ("files" :> ("list_folder" :> (Auth '[Bearer] Token :> (ReqBody '[JSON] ListFolderRequest :> Post '[JSON] ListFolderResponse)))))
- _dropbox_get_temporary_link :: route :- ("2" :> ("files" :> ("get_temporary_link" :> (Auth '[Bearer] Token :> (ReqBody '[JSON] LinkRequest :> Post '[JSON] LinkResponse)))))
- _dropbox_token :: route :- ("oauth2" :> ("token" :> (ReqBody '[FormUrlEncoded] TokenBody :> Post '[JSON] TokenRequest)))
- defListFolderRequest :: ListFolderRequest
- data FileTag
- data Entry = Entry {}
- newtype ListFolderResponse = ListFolderResponse {}
- data ListFolderRequest
- path :: ListFolderRequest -> String
- newtype LinkResponse = LinkResponse {}
- newtype LinkRequest = LinkRequest {}
Documentation
To use the various endpoints make sure you have the right
scope in your app
on dropbox: https://www.dropbox.com/developers/apps/info/t282kls5wbrtofs#permissions
then regenerate your token (because it's attached to that)
Dropbox | |
|
Instances
Eq Entry Source # | |
Show Entry Source # | |
Generic Entry Source # | |
FromJSON Entry Source # | |
type Rep Entry Source # | |
Defined in Dropbox type Rep Entry = D1 (MetaData "Entry" "Dropbox" "dropbox-0.0.1-IKAMKizX6ceG6nenEsdEaQ" False) (C1 (MetaCons "Entry" PrefixI True) ((S1 (MetaSel (Just "eTag") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FileTag) :*: S1 (MetaSel (Just "eName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) :*: (S1 (MetaSel (Just "ePathDisplay") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text) :*: S1 (MetaSel (Just "eId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))) |
newtype ListFolderResponse Source #
Instances
data ListFolderRequest Source #
Instances
path :: ListFolderRequest -> String Source #
newtype LinkResponse Source #
Instances
Show LinkResponse Source # | |
Defined in Dropbox showsPrec :: Int -> LinkResponse -> ShowS # show :: LinkResponse -> String # showList :: [LinkResponse] -> ShowS # | |
Generic LinkResponse Source # | |
Defined in Dropbox type Rep LinkResponse :: Type -> Type # from :: LinkResponse -> Rep LinkResponse x # to :: Rep LinkResponse x -> LinkResponse # | |
FromJSON LinkResponse Source # | |
Defined in Dropbox parseJSON :: Value -> Parser LinkResponse # parseJSONList :: Value -> Parser [LinkResponse] # | |
type Rep LinkResponse Source # | |
Defined in Dropbox type Rep LinkResponse = D1 (MetaData "LinkResponse" "Dropbox" "dropbox-0.0.1-IKAMKizX6ceG6nenEsdEaQ" True) (C1 (MetaCons "LinkResponse" PrefixI True) (S1 (MetaSel (Just "link") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))) |
newtype LinkRequest Source #
Instances
Generic LinkRequest Source # | |
Defined in Dropbox type Rep LinkRequest :: Type -> Type # from :: LinkRequest -> Rep LinkRequest x # to :: Rep LinkRequest x -> LinkRequest # | |
ToJSON LinkRequest Source # | |
Defined in Dropbox toJSON :: LinkRequest -> Value # toEncoding :: LinkRequest -> Encoding # toJSONList :: [LinkRequest] -> Value # toEncodingList :: [LinkRequest] -> Encoding # | |
type Rep LinkRequest Source # | |
Defined in Dropbox type Rep LinkRequest = D1 (MetaData "LinkRequest" "Dropbox" "dropbox-0.0.1-IKAMKizX6ceG6nenEsdEaQ" True) (C1 (MetaCons "LinkRequest" PrefixI True) (S1 (MetaSel (Just "linkPath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) |