forked from bdarnell/async_dropbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
24 lines (20 loc) · 799 Bytes
/
Copy pathREADME
File metadata and controls
24 lines (20 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Introduction
============
This is an asynchronous python interface to the Dropbox API, using the
Tornado IOLoop. It is designed to be similar to the existing interfaces
in the `tornado.auth` module.
Example usage
=============
class MainHandler(tornado.web.RequestHandler,
async_dropbox.DropboxMixin):
@tornado.web.authenticated
@tornado.web.asynchronous
def get(self):
self.dropbox_request(
"api", "/1/metadata/sandbox/"
access_token=self.current_user["access_token"],
callback=self._on_metadata)
def _on_metadata(self, response):
response.rethrow()
metadata = json.loads(response.body)
self.render("main.html", metadata=metadata)