Changeset 5837


Ignore:
Timestamp:
May 15, 2008, 5:11:50 AM (14 years ago)
Author:
charles
Message:

added "download-dir" to session variables.
added section describing uri notation.

File:
1 edited

Legend:

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

    r5829 r5837  
    3939   (2) An optional "arguments" object of name/value pairs
    4040   (3) An optional "tag" integer as described in 2.1.
     41
     422.3.  Request IPC Notation
     43
     44   As a convenience, a casual URI notation is supported for requests via the
     45   query portion of a URI.  The advantage of this is that all current requests
     46   can be invoked via a very simple http GET request.  The possible future
     47   disadvantage is that it limits nesting and listing structured requests.
     48
     49   The URI notation works as follows:
     50   (1) Any key not "tag" or "method" is assumed to be in "arguments".
     51   (2) The "arguments" key isn't needed, since data isn't nested.
     52   (3) If the entire value in a key/value pair can be parsed as an integer,
     53       it's parsed into a JSON number.
     54       Otherwise, if the value can be parsed as comma-delimited integers,
     55       it's parsed into a JSON array of integers.
     56       Otherwise, the value is treated as a string.
     57
     58   Examples:
     59   ?method=torrent-start&ids=1,2
     60   ?method=session-set&speed-limit-down=50&speed-limit-down-enabled=1
    4161
    42623.  Torrent Requests
     
    114134   (2) a new string, "announce-url", is added.
    115135   (3) a new string, "scrape-url", is added.
     136   (4) tr_info's "name" field is added.
    116137
    1171383.4.  Adding a Torrent
     
    123144   string             | value type & description
    124145   -------------------+-------------------------------------------------
    125    "destination"      | string    path to download the torrent to
     146   "download-dir"     | string    path to download the torrent to
    126147   "filename"         | string    location of the .torrent file
    127148   "paused"           | boolean   if true, don't start the torrent
     
    165186   string             | value type & description
    166187   -------------------+-------------------------------------------------
     188   "files-wanted"     | array     indices of one or more file to download
     189   "files-unwanted"   | array     indices of one or more file to not download
    167190   "priority-high"    | array     indices of one or more high-priority files
    168191   "priority-low"     | array     indices of one or more low-priority files
    169192   "priority-normal"  | array     indices of one or more normal-priority files
    170    "download"         | array     indices of one or more file to download
    171    "no-download"      | array     indices of one or more file to not download
    172193
    1731943.6.1.  Mutators
     
    191212   ---------------------------+-------------------------------------------------
    192213   "encryption"               | string   "required", "preferred", "tolerated"
     214   "download-dir"             | string   default path to download torrents
    193215   "peer-limit"               | int      maximum global number of peers
    194216   "pex-allowed"              | boolean  true means allow pex in public torrents
Note: See TracChangeset for help on using the changeset viewer.