fix some docstrings in t...
Content-type: text/plain

Author: damoxc

Revision: 5535

Log:
        add autodoc for ui.common
fix some docstrings in the json_api module

Diff:
Modified: trunk/deluge/ui/web/json_api.py
===================================================================
--- trunk/deluge/ui/web/json_api.py     2009-07-23 00:23:48 UTC (rev 5534)
+++ trunk/deluge/ui/web/json_api.py     2009-07-23 00:24:07 UTC (rev 5535)
@@ -97,7 +97,7 @@
 
 class JSON(resource.Resource, component.Component):
     """
-    A Twisted Web resource that exposes a JSON-RPC interface for web clients
+    A Twisted Web resource that exposes a JSON-RPC interface for web clients \
     to use.
     """
 
@@ -469,14 +469,19 @@
 
         :param filename: the path to the torrent
         :type filename: string
-        :returns:
-        {
-            "filename": the torrent file
-            "name": the torrent name
-            "size": the total size of the torrent
-            "files": the files the torrent contains
-            "info_hash" the torrents info_hash
-        }
+        
+        :returns: information about the torrent:
+        
+        ::
+        
+            {
+                "filename": the torrent file,
+                "name": the torrent name,
+                "size": the total size of the torrent,
+                "files": the files the torrent contains,
+                "info_hash" the torrents info_hash
+            }
+            
         :rtype: dictionary
         """
         d = Deferred()
@@ -492,15 +497,17 @@
         """
         Add torrents by file
 
-        :param torrents: A list of dictionaries containing the torrent
+        :param torrents: A list of dictionaries containing the torrent \
         path and torrent options to add with.
         :type torrents: list
 
         **Usage**
+        
         >>> json_api.web.add_torrents([{
                 "path": "/tmp/deluge-web/some-torrent-file.torrent",
                 "options": {"download_path": "/home/deluge/"}
             }])
+            
         """
         for torrent in torrents:
             filename = os.path.basename(torrent["path"])

Added: trunk/docs/source/modules/ui/common.rst
===================================================================
--- trunk/docs/source/modules/ui/common.rst                             (rev 0)
+++ trunk/docs/source/modules/ui/common.rst     2009-07-23 00:24:07 UTC (rev 
5535)
@@ -0,0 +1,5 @@
+:mod:`deluge.ui.common`
+====================
+
+.. automodule:: deluge.ui.common
+  :members:



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to