Changeset 5802 for trunk/doc/ipc-json-spec.txt
- Timestamp:
- May 10, 2008, 4:38:42 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/ipc-json-spec.txt
r5801 r5802 20 20 21 21 There are only two message types: request and response. Both 22 are jsonobjects with two members: "headers" (described in 2.1)22 are JSON objects with two members: "headers" (described in 2.1) 23 23 and "body" (described in 2.2-2.3). 24 24 … … 34 34 Request bodies support two members: 35 35 (1) A required "name" string telling the name of the request. 36 (2) An optional "arguments" object of name/value argumentpairs.36 (2) An optional "arguments" object of name/value pairs. 37 37 38 38 2.3. Response Body 39 39 40 40 Response bodies support two members: 41 (1) An optional "arguments" object of argumentname/value pairs.41 (1) An optional "arguments" object of name/value pairs. 42 42 (2) An optional "error" string which may be omitted on success. 43 43 … … 55 55 Request names: "torrent-start", "torrent-stop", 56 56 "torrent-remove", "torrent-verify" 57 The only supported argument is 3.1's"ids" argument.58 The response has no arguments.57 Request arguments: 3.1's optional "ids" argument. 58 Response arguments: none. 59 59 60 60 3.3. Torrent Info Requests 61 61 62 62 Request name: "torrent-info". 63 The only supported argument is 3.1's"ids" argument.63 Request arguments: 3.1's optional "ids" argument. 64 64 65 The response will contain an "info" argument holding an array of 66 tr_info objects. these are a (nearly) 1-to-1 mapping of 67 libtransmission's tr_info struct, but differ in the following ways: 65 Response arguments: "info", an array of objects based on libtransmission's 66 tr_info struct but differ in the following ways: 68 67 69 68 (1) tr_info's "hash" field is omitted. … … 81 80 "arguments": { 82 81 "name": "torrent-info", 83 "ids": [ 1, 2]82 "ids": [ 7, 10 ] 84 83 } 85 84 } … … 97 96 "info": [ 98 97 { 99 "id": 1,98 "id": 7, 100 99 "totalSize": 9803930483, 101 100 "pieceCount": 1209233, … … 105 104 } 106 105 { 107 "id": 2,106 "id": 10, 108 107 "totalSize": 2398480394, 109 108 "pieceCount": 83943, … … 120 119 121 120 Request name is "torrent-status". 122 The only supported argument is 3.1's"ids" argument.121 Request arguments: 3.1's optional "ids" argument. 123 122 124 The response will contain a "status" argument holding an array of 125 tr_stat objects. these are a (nearly) 1-to-1 mapping of 126 libtransmission's tr_stat struct, but differ in the following ways: 123 Response arguments: "status", an array of objects based on 124 libtransmission's tr_stat struct but which differ the following ways: 127 125 128 126 (1) tr_stat's "tracker" field is omitted … … 132 130 3.5. Adding a Torrent 133 131 134 Request name is "torrent-add". 135 All arguments are optional except "filename". 136 Supported arguments are: 132 Request name: "torrent-add" 133 Request arguments: 137 134 138 135 string | value type & description … … 145 142 "speed-limit-up" | int maximum upload speed (in KiB/s) 146 143 144 The "filename" argument is required; all others are optional. 145 146 Response arguments: 3.1's "error" if the request failed. 147 147 148 148 4. Session Status Requests 149 149 150 4.1. Mutators 151 152 The request name to change the session's state is "session-set". 153 Supported arguments are: 150 4.1. Session Arguments 154 151 155 152 string | value type & description … … 165 162 "speed-limit-up" | int maximum global upload speed (in KiB/s) 166 163 164 4.2. Mutators 165 166 Request name: "session-set" 167 Request arguments: one or more of 4.1's session arguments 168 Response arguments: none 169 167 170 4.2. Accessors 168 171 169 172 Request name: "session-get" 170 173 Request arguments: none 171 Response arguments: all the arguments described in 4.1.174 Response arguments: all of 4.1's session arguments 172 175
Note: See TracChangeset
for help on using the changeset viewer.