From 96b38188fc89b157e8f09c3c39deee6ff8b099e4 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Tue, 28 Apr 2009 15:59:56 +0000 Subject: [PATCH] add a doc string --- deluge/ui/web/json_api.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/deluge/ui/web/json_api.py b/deluge/ui/web/json_api.py index 73318894d..9f8ad78f8 100644 --- a/deluge/ui/web/json_api.py +++ b/deluge/ui/web/json_api.py @@ -361,7 +361,14 @@ class WebApi(JSONComponent): d.callback(file_tree.get_tree()) @export - def get_torrent_files(self, torrent_id): + def get_torrent_files(self, torrent_id): + """ + Gets the files for a torrent in tree format + + :param torrent_id: string, the id of the torrent to retrieve. + :returns: The torrents files in a tree + :rtype: dict + """ main_deferred = Deferred() d = client.core.get_torrent_status(torrent_id, FILES_KEYS) d.addCallback(self._on_got_files, main_deferred)