Changeset 5842


Ignore:
Timestamp:
May 16, 2008, 7:31:22 AM (14 years ago)
Author:
charles
Message:

update the rpc spec.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/rpc-json-spec.txt

    r5837 r5842  
    7474   Response arguments: none
    7575
    76 3.2.  Torrent Info Requests
     763.2.  Torrent List
     77
     78   Method name: "torrent-list".
     79
     80   Request arguments: none.
     81
     82   Response arguments: "list", an array of objects that contain two keys:
     83   a torrent's name string, and its unique torrent id.
     84
     853.3.  Torrent Info Requests
    7786
    7887   Method name: "torrent-info".
    7988
    80    Request arguments: 3.1's optional "ids" argument.
     89   Request arguments: an "id" number specifying a torrent id number
    8190
    8291   Response arguments: "info", an array of objects based on libtransmission's
    83    tr_info struct but differ in the following ways:
     92   tr_info struct but different in the following ways:
    8493
    8594   (1) tr_info's "hash" field is omitted.
     
    9099
    91100      {
    92          "arguments": { "ids": [ 7, 10 ] }
     101         "arguments": { "id": 7 }
    93102         "method": "torrent-info",
    94103         "tag": 39693
     
    101110         "result": "success",
    102111         "arguments": {
    103             "info": [
    104                {
    105                   "id": 7,
    106                   "totalSize": 9803930483,
    107                   "pieceCount": 1209233,
    108                   "pieceSize": 4096,
    109                   "name": "Ubuntu x86_64 DVD",
    110                   ...
    111                },
    112                {
    113                   "id": 10,
    114                   "totalSize": 2398480394,
    115                   "pieceCount": 83943,
    116                   "pieceSize": 12345,
    117                   "name": "Ubuntu i386 DVD",
    118                   ...
    119                }
    120             ]
     112            "info": {
     113               "id": 7,
     114               "totalSize": 9803930483,
     115               "pieceCount": 1209233,
     116               "pieceSize": 4096,
     117               "name": "Ubuntu x86_64 DVD",
     118               ...
     119            }
    121120         }
    122121      }
    123122
    124 3.3.  Torrent Status Requests
     1233.4.  Torrent Status Requests
    125124
    126125   Method name: "torrent-status"
    127126
    128    Request arguments: 3.1's optional "ids" argument.
    129 
    130    Response arguments: "status", an array of objects based on
    131    libtransmission's tr_stat struct but which differ in the following ways:
     127   Request arguments: an "id" int specifying a torrent id number
     128
     129   Response arguments: "status", an object based on libtransmission's
     130   tr_stat struct but differerent in the following ways:
    132131
    133132   (1) tr_stat's "tracker" field is omitted.
     
    136135   (4) tr_info's "name" field is added.
    137136
    138 3.4.  Adding a Torrent
     1373.5.  Adding a Torrent
    139138
    140139   Method name: "torrent-add"
     
    152151
    153152   Response arguments: on success, a "torrent-added" object in the
    154                        form of one of 3.2's tr_info objects.
    155 
    156 3.5.  Other torrent settings
     153                       form of one of 3.3's tr_info objects.
     154
     1553.6.  Other torrent settings
    157156
    158157   Common arguments:
     
    166165   "speed-limit-up-enabled"   | boolean   true if the upload speed is limited
    167166
    168 3.5.1.  Mutators
     1673.6.1.  Mutators
    169168
    170169   Method name: "torrent-set"
    171    Request arguments: 3.1's "ids", plus one or more of 3.5's arguments
     170   Request arguments: 3.1's "ids", plus one or more of 3.6's arguments
    172171   Response arguments: none
    173172
    174 3.5.2.  Accessors
     1733.6.2.  Accessors
    175174
    176175   Method name: "torrent-get"
    177176   Request arguments: none
    178177   Response arguments: A "torrents" list of objects containing all
    179                        of 3.5's arguments plus the torrent's "id" int.
     178                       of 3.6's arguments plus the torrent's "id" int.
    180179                     
    181180
    182 3.6  File Priorities
     1813.7  File Priorities
    183182
    184183   Common arguments:
     
    192191   "priority-normal"  | array     indices of one or more normal-priority files
    193192
    194 3.6.1.  Mutators
     1933.7.1.  Mutators
    195194
    196195    Method name: "torrent-set-priorities"
    197     Request arguments: 3.1's "ids", plus one or more of 3.6's arguments
     196    Request arguments: 3.1's "ids", plus one or more of 3.7's arguments
    198197    Response arguments: none
    199198
    200 3.6.2.  Accessors
     1993.7.2.  Accessors
    201200
    202201    Method name: "torrent-get-priorities"
    203202    Request arguments: none
    204203    Response arguments: A "torrents" list of objects containing all
    205                         of 3.6's arguments plus the torrent's "id" int.
     204                        of 3.7's arguments plus the torrent's "id" int.
    206205   
    2072064.   Session Status Requests
Note: See TracChangeset for help on using the changeset viewer.