Practice for using Dropbox API on Clojure.
Dependes clj-oauth
version 1.2.10.
-
Make Account on Dropbox.
-
Create "My Apps" on Dropbox for Developers page.
-
Get API Keys (
developer-token
anddeveloper-secret
). -
lein deps
,lein repl
- Getting Dropbox account info.
on repl :
(use 'dropbox-api-practice.core)
;; get access token
(def my-consumer (new-consumer "developer-token" "developer-secret"))
(def my-access-token (get-access-token my-consumer "user mailaddress" "password"))
;; API call
(get-account-info my-consumer my-access-token)
- Getting file metadata.
Before run this code, make test file ~/Dropbox/api_test/test.txt
.
(get-metadata my-consumer myaccess-token "/api_test/test.txt")
Edit test file, after run same code, check to update metadata.
http://d.hatena.ne.jp/teru_kusu/20110120/1295520678
https://www.dropbox.com/developers/docs
https://github.com/mattrepl/clj-oauth
http://tzmtk.pbworks.com/w/page/7618696/OAuthCore10aJP
https://github.com/aria42/clj-dropbox
Copyright (c) 2011 MISUMI Masaru(deltam@gmail.com).
Licensed under the MIT License (http://www.opensource.org/licenses/mit-license.php)