improve the docstring for the add_torrents method

This commit is contained in:
Damien Churchill 2009-06-18 08:25:14 +00:00
parent 9a55987ecb
commit f6b90c0097
1 changed files with 8 additions and 1 deletions

View File

@ -474,8 +474,15 @@ class WebApi(JSONComponent):
""" """
Add torrents by file Add torrents by file
:param torrents: dict, a list of dictionaries containing the torrent :param torrents: A list of dictionaries containing the torrent
path and torrent options to add with. path and torrent options to add with.
:type torrents: list
**Usage**
>>> json_api.add_torrents([{
"path": "/tmp/deluge-web/some-torrent-file.torrent",
"options": {"download_path": "/home/deluge/"}
}])
""" """
for torrent in torrents: for torrent in torrents:
filename = os.path.basename(torrent["path"]) filename = os.path.basename(torrent["path"])