mirror of https://github.com/aria2/aria2
2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made XML-RPC method section more readable by adding indents and titles. * doc/aria2c.1.txtpull/1/head
parent
6e76f84857
commit
b6e2748937
|
@ -1,3 +1,9 @@
|
|||
2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Made XML-RPC method section more readable by adding indents and
|
||||
titles.
|
||||
* doc/aria2c.1.txt
|
||||
|
||||
2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Added command-line options cross reference in HTML man page.
|
||||
|
|
279
doc/aria2c.1
279
doc/aria2c.1
|
@ -2816,7 +2816,13 @@ GID(or gid) is the key to manage each download\&. Each download has an unique GI
|
|||
.sp
|
||||
All code examples come from Python2\&.7 interpreter\&.
|
||||
.sp
|
||||
\fBaria2\&.addUri\fR (\fIuris[, options[, position]]\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.addUri (uris[, options[, position]])\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method adds new HTTP(S)/FTP/BitTorrent Magnet URI\&. \fIuris\fR is of type array and its element is URI which is of type string\&. For BitTorrent Magnet URI, \fIuris\fR must have only one element and it should be BitTorrent Magnet URI\&. URIs in \fIuris\fR must point to the same file\&. If you mix other URIs which point to another file, aria2 does not complain but download may fail\&. \fIoptions\fR is of type struct and its members are a pair of option name and value\&. See \fBOptions\fR below for more details\&. If \fIposition\fR is given as an integer starting from 0, the new download is inserted at \fIposition\fR in the waiting queue\&. If \fIposition\fR is not given or \fIposition\fR is larger than the size of the queue, it is appended at the end of the queue\&. This method returns GID of registered download\&.
|
||||
.sp
|
||||
|
@ -2860,8 +2866,15 @@ Adding a download and insert it to the front of waiting downloads:
|
|||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.addTorrent\fR (\fItorrent[, uris[, options[, position]]]\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.addTorrent (torrent[, uris[, options[, position]]])\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method adds BitTorrent download by uploading \&.torrent file\&. If you want to add BitTorrent Magnet URI, use \fBaria2\&.addUri\fR method instead\&. \fItorrent\fR is of type base64 which contains Base64\-encoded \&.torrent file\&. \fIuris\fR is of type array and its element is URI which is of type string\&. \fIuris\fR is used for Web\-seeding\&. For single file torrents, URI can be a complete URI pointing to the resource or if URI ends with /, name in torrent file is added\&. For multi\-file torrents, name and path in torrent are added to form a URI for each file\&. \fIoptions\fR is of type struct and its members are a pair of option name and value\&. See \fBOptions\fR below for more details\&. If \fIposition\fR is given as an integer starting from 0, the new download is inserted at \fIposition\fR in the waiting queue\&. If \fIposition\fR is not given or \fIposition\fR is larger than the size of the queue, it is appended at the end of the queue\&. This method returns GID of registered download\&. Please note that the downloads added by this method are not saved by \fB\-\-save\-session\fR\&.
|
||||
.sp
|
||||
|
@ -2879,8 +2892,15 @@ Adding local file file\&.torrent to aria2:
|
|||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.addMetalink\fR (\fImetalink[, options[, position]]\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.addMetalink (metalink[, options[, position]])\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method adds Metalink download by uploading \&.metalink file\&. \fImetalink\fR is of type base64 which contains Base64\-encoded \&.metalink file\&. \fIoptions\fR is of type struct and its members are a pair of option name and value\&. See \fBOptions\fR below for more details\&. If \fIposition\fR is given as an integer starting from 0, the new download is inserted at \fIposition\fR in the waiting queue\&. If \fIposition\fR is not given or \fIposition\fR is larger than the size of the queue, it is appended at the end of the queue\&. This method returns array of GID of registered download\&. Please note that the downloads added by this method are not saved by \fB\-\-save\-session\fR\&.
|
||||
.sp
|
||||
|
@ -2898,8 +2918,15 @@ Adding local file file\&.meta4 to aria2:
|
|||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.remove\fR (\fIgid\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.remove (gid)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method removes the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. If specified download is in progress, it is stopped at first\&. The status of removed download becomes "removed"\&. This method returns GID of removed download\&.
|
||||
.sp
|
||||
|
@ -2917,36 +2944,92 @@ Removing download whose GID is \fI3\fR:
|
|||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.forceRemove\fR (\fIgid\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.forceRemove (gid)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method removes the download denoted by \fIgid\fR\&. This method behaves just like \fBaria2\&.remove\fR except that this method removes download without any action which takes time such as contacting BitTorrent tracker\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.pause\fR (\fIgid\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.pause (gid)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method pauses the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. The status of paused download becomes "paused"\&. If the download is active, the download is placed on the first position of waiting queue\&. As long as the status is "paused", the download is not started\&. To change status to "waiting", use \fBaria2\&.unpause\fR method\&. This method returns GID of paused download\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.pauseAll\fR ()
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.pauseAll ()\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method is equal to calling \fBaria2\&.pause\fR for every active/waiting download\&. This methods returns "OK" for success\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.forcePause\fR (\fIpid\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.forcePause (pid)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method pauses the download denoted by \fIgid\fR\&. This method behaves just like \fBaria2\&.pause\fR except that this method pauses download without any action which takes time such as contacting BitTorrent tracker\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.forcePauseAll\fR ()
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.forcePauseAll ()\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method is equal to calling \fBaria2\&.forcePause\fR for every active/waiting download\&. This methods returns "OK" for success\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.unpause\fR (\fIgid\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.unpause (gid)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method changes the status of the download denoted by \fIgid\fR from "paused" to "waiting"\&. This makes the download eligible to restart\&. \fIgid\fR is of type string\&. This method returns GID of unpaused download\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.unpauseAll\fR ()
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.unpauseAll ()\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method is equal to calling \fBaria2\&.unpause\fR for every active/waiting download\&. This methods returns "OK" for success\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.tellStatus\fR (\fIgid[, keys]\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.tellStatus (gid[, keys])\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method returns download progress of the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. \fIkeys\fR is array of string\&. If it is specified, the response contains only keys in \fIkeys\fR array\&. If \fIkeys\fR is empty or not specified, the response contains all keys\&. This is useful when you just want specific keys and avoid unnecessary transfers\&. For example, \fBaria2\&.tellStatus\fR("1", ["gid", "status"]) returns \fIgid\fR and \fIstatus\fR key\&. The response is of type struct and it contains following keys\&. The value type is string\&.
|
||||
.PP
|
||||
|
@ -3132,8 +3215,15 @@ Get information specifying keys you are interested in:
|
|||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.getUris\fR (\fIgid\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.getUris (gid)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method returns URIs used in the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. The response is of type array and its element is of type struct and it contains following keys\&. The value type is string\&.
|
||||
.PP
|
||||
|
@ -3150,8 +3240,15 @@ if the URI is already used\&.
|
|||
\fIwaiting\fR
|
||||
if the URI is waiting in the queue\&.
|
||||
.RE
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.getFiles\fR (\fIgid\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.getFiles (gid)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method returns file list of the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. The response is of type array and its element is of type struct and it contains following keys\&. The value type is string\&.
|
||||
.PP
|
||||
|
@ -3185,8 +3282,15 @@ Returns the list of URI for this file\&. The element of list is the same struct
|
|||
\fBaria2\&.getUris\fR
|
||||
method\&.
|
||||
.RE
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.getPeers\fR (\fIgid\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.getPeers (gid)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method returns peer list of the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. This method is for BitTorrent only\&. The response is of type array and its element is of type struct and it contains following keys\&. The value type is string\&.
|
||||
.PP
|
||||
|
@ -3234,8 +3338,15 @@ seeder
|
|||
.RS 4
|
||||
"true" is this client is a seeder\&. Otherwise "false"\&.
|
||||
.RE
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.getServers\fR (\fIgid\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.getServers (gid)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method returns currently connected HTTP(S)/FTP servers of the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. The response is of type array and its element is of type struct and it contains following keys\&. The value type is string\&.
|
||||
.PP
|
||||
|
@ -3263,12 +3374,26 @@ downloadSpeed
|
|||
Download speed (byte/sec)
|
||||
.RE
|
||||
.RE
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.tellActive\fR (\fI[keys]\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.tellActive ([keys])\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method returns the list of active downloads\&. The response is of type array and its element is the same struct returned by \fBaria2\&.tellStatus\fR method\&. For \fIkeys\fR parameter, please refer to \fBaria2\&.tellStatus\fR method\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.tellWaiting\fR (\fIoffset, num, [keys]\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.tellWaiting (offset, num, [keys])\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method returns the list of waiting download, including paused downloads\&. \fIoffset\fR is of type integer and specifies the offset from the download waiting at the front\&. \fInum\fR is of type integer and specifies the number of downloads to be returned\&. For \fIkeys\fR parameter, please refer to \fBaria2\&.tellStatus\fR method\&.
|
||||
.sp
|
||||
|
@ -3279,46 +3404,109 @@ If offset is a positive integer, this method returns downloads in the range of [
|
|||
For example, imagine that three downloads "A","B" and "C" are waiting in this order\&. aria2\&.tellWaiting(0, 1) returns ["A"]\&. aria2\&.tellWaiting(1, 2) returns ["B", "C"]\&. aria2\&.tellWaiting(\-1, 2) returns ["C", "B"]\&.
|
||||
.sp
|
||||
The response is of type array and its element is the same struct returned by \fBaria2\&.tellStatus\fR method\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.tellStopped\fR (\fIoffset, num, [keys]\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.tellStopped (offset, num, [keys])\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method returns the list of stopped download\&. \fIoffset\fR is of type integer and specifies the offset from the oldest download\&. \fInum\fR is of type integer and specifies the number of downloads to be returned\&. For \fIkeys\fR parameter, please refer to \fBaria2\&.tellStatus\fR method\&.
|
||||
.sp
|
||||
\fIoffset\fR and \fInum\fR have the same semantics as \fBaria2\&.tellWaiting\fR method\&.
|
||||
.sp
|
||||
The response is of type array and its element is the same struct returned by \fBaria2\&.tellStatus\fR method\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.changePosition\fR (\fIgid, pos, how\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.changePosition (gid, pos, how)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method changes the position of the download denoted by \fIgid\fR\&. \fIpos\fR is of type integer\&. \fIhow\fR is of type string\&. If \fIhow\fR is "POS_SET", it moves the download to a position relative to the beginning of the queue\&. If \fIhow\fR is "POS_CUR", it moves the download to a position relative to the current position\&. If \fIhow\fR is "POS_END", it moves the download to a position relative to the end of the queue\&. If the destination position is less than 0 or beyond the end of the queue, it moves the download to the beginning or the end of the queue respectively\&. The response is of type integer and it is the destination position\&.
|
||||
.sp
|
||||
For example, if GID#1 is placed in position 3, aria2\&.changePosition(1, \-1, POS_CUR) will change its position to 2\&. Additional aria2\&.changePosition(1, 0, POS_SET) will change its position to 0(the beginning of the queue)\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.changeUri\fR (\fIgid, fileIndex, delUris, addUris[, position]\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.changeUri (gid, fileIndex, delUris, addUris[, position])\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method removes URIs in \fIdelUris\fR from and appends URIs in \fIaddUris\fR to download denoted by \fIgid\fR\&. \fIdelUris\fR and \fIaddUris\fR are list of string\&. A download can contain multiple files and URIs are attached to each file\&. \fIfileIndex\fR is used to select which file to remove/attach given URIs\&. \fIfileIndex\fR is 1\-based\&. \fIposition\fR is used to specify where URIs are inserted in the existing waiting URI list\&. \fIposition\fR is 0\-based\&. When \fIposition\fR is omitted, URIs are appended to the back of the list\&. This method first execute removal and then addition\&. \fIposition\fR is the position after URIs are removed, not the position when this method is called\&. When removing URI, if same URIs exist in download, only one of them is removed for each URI in \fIdelUris\fR\&. In other words, there are three URIs "http://example\&.org/aria2" and you want remove them all, you have to specify (at least) 3 "http://example\&.org/aria2" in \fIdelUris\fR\&. This method returns a list which contains 2 integers\&. The first integer is the number of URIs deleted\&. The second integer is the number of URIs added\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.getOption\fR (\fIgid\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.getOption (gid)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method returns options of the download denoted by \fIgid\fR\&. The response is of type struct\&. Its key is the name of option\&. The value type is string\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.changeOption\fR (\fIgid, options\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.changeOption (gid, options)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method changes options of the download denoted by \fIgid\fR dynamically\&. \fIgid\fR is of type string\&. \fIoptions\fR is of type struct and the available options are: \fBbt\-max\-peers\fR, \fBbt\-request\-peer\-speed\-limit\fR, \fBmax\-download\-limit\fR and \fBmax\-upload\-limit\fR\&. This method returns "OK" for success\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.getGlobalOption\fR ()
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.getGlobalOption ()\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method returns global options\&. The response is of type struct\&. Its key is the name of option\&. The value type is string\&. Because global options are used as a template for the options of newly added download, the response contains keys returned by \fBaria2\&.getOption\fR method\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.changeGlobalOption\fR (\fIoptions\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.changeGlobalOption (options)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method changes global options dynamically\&. \fIoptions\fR is of type struct and the available options are \fBmax\-concurrent\-downloads\fR, \fBmax\-overall\-download\-limit\fR, \fBmax\-overall\-upload\-limit\fR, \fBlog\-level\fR and \fBlog\fR\&. Using \fBlog\fR option, you can dynamically start logging or change log file\&. To stop logging, give empty string("") as a parameter value\&. Note that log file is always opened in append mode\&. This method returns "OK" for success\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.purgeDownloadResult\fR ()
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.purgeDownloadResult ()\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method purges completed/error/removed downloads to free memory\&. This method returns "OK"\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.getVersion\fR ()
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.getVersion ()\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method returns version of the program and the list of enabled features\&. The response is of type struct and contains following keys\&.
|
||||
.PP
|
||||
|
@ -3354,8 +3542,15 @@ List of enabled features\&. Each feature name is of type string\&.
|
|||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.getSessionInfo\fR ()
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.getSessionInfo ()\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method returns session information\&. The response is of type struct and contains following key\&.
|
||||
.PP
|
||||
|
@ -3376,16 +3571,37 @@ Session ID, which is generated each time when aria2 is invoked\&.
|
|||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.shutdown\fR ()
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.shutdown ()\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method shutdowns aria2\&. This method returns "OK"\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBaria2\&.forceShutdown\fR ()
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBaria2.forceShutdown ()\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This method shutdowns aria2\&. This method behaves like \fBaria2\&.shutdown\fR except that any actions which takes time such as contacting BitTorrent tracker are skipped\&. This method returns "OK"\&.
|
||||
.RE
|
||||
.sp
|
||||
\fBsystem\&.multicall\fR (\fImethods\fR)
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBsystem.multicall (methods)\fR
|
||||
.RS 4
|
||||
.sp
|
||||
This methods encapsulates multiple method calls in a single request\&. \fImethods\fR is of type array and its element is struct\&. The struct contains two keys: "methodName" and "params"\&. "methodName" is the method name to call and "params" is array containing parameters to the method\&. This method returns array of responses\&. The element of array will either be a one\-item array containing the return value of each method call or struct of fault element if an encapsulated method call fails\&.
|
||||
.sp
|
||||
|
@ -3407,6 +3623,7 @@ In the following example, we add 2 downloads\&. First one is http://example\&.or
|
|||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.SS "Error Handling"
|
||||
.sp
|
||||
In case of error, aria2 returns faultCode=1 and the error message in faultString\&.
|
||||
|
|
|
@ -3267,7 +3267,8 @@ GID
|
|||
</dl></div>
|
||||
<h3 id="_methods">Methods</h3><div style="clear:left"></div>
|
||||
<div class="paragraph"><p>All code examples come from Python2.7 interpreter.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.addUri</strong> (<em>uris[, options[, position]]</em>)</p></div>
|
||||
<h4 id="_strong_aria2_adduri_strong_em_uris_options_position_em"><strong>aria2.addUri</strong> (<em>uris[, options[, position]]</em>)</h4>
|
||||
<h5 id="_description_2">Description</h5>
|
||||
<div class="paragraph"><p>This method adds new HTTP(S)/FTP/BitTorrent Magnet URI. <em>uris</em> is of
|
||||
type array and its element is URI which is of type string. For
|
||||
BitTorrent Magnet URI, <em>uris</em> must have only one element and it should
|
||||
|
@ -3300,7 +3301,8 @@ GID of registered download.</p></div>
|
|||
<pre><tt>>>> s.aria2.addUri(['http://example.org/file'], {}, 0)
|
||||
'3'</tt></pre>
|
||||
</div></div>
|
||||
<div class="paragraph"><p><strong>aria2.addTorrent</strong> (<em>torrent[, uris[, options[, position]]]</em>)</p></div>
|
||||
<h4 id="_strong_aria2_addtorrent_strong_em_torrent_uris_options_position_em"><strong>aria2.addTorrent</strong> (<em>torrent[, uris[, options[, position]]]</em>)</h4>
|
||||
<h5 id="_description_3">Description</h5>
|
||||
<div class="paragraph"><p>This method adds BitTorrent download by uploading .torrent file. If
|
||||
you want to add BitTorrent Magnet URI, use <strong>aria2.addUri</strong> method
|
||||
instead. <em>torrent</em> is of type base64 which contains Base64-encoded
|
||||
|
@ -3325,7 +3327,8 @@ Please note that the downloads added by this method are not saved by
|
|||
>>> s.aria2.addTorrent(xmlrpclib.Binary(open('file.torrent').read()))
|
||||
'6'</tt></pre>
|
||||
</div></div>
|
||||
<div class="paragraph"><p><strong>aria2.addMetalink</strong> (<em>metalink[, options[, position]]</em>)</p></div>
|
||||
<h4 id="_strong_aria2_addmetalink_strong_em_metalink_options_position_em"><strong>aria2.addMetalink</strong> (<em>metalink[, options[, position]]</em>)</h4>
|
||||
<h5 id="_description_4">Description</h5>
|
||||
<div class="paragraph"><p>This method adds Metalink download by uploading .metalink file.
|
||||
<em>metalink</em> is of type base64 which contains Base64-encoded .metalink
|
||||
file. <em>options</em> is of type struct and its members are a pair of
|
||||
|
@ -3344,7 +3347,8 @@ method are not saved by <strong><a href="#aria2_optref_save_session">--save-sess
|
|||
>>> s.aria2.addMetalink(xmlrpclib.Binary(open('file.meta4').read()))
|
||||
['8']</tt></pre>
|
||||
</div></div>
|
||||
<div class="paragraph"><p><strong>aria2.remove</strong> (<em>gid</em>)</p></div>
|
||||
<h4 id="_strong_aria2_remove_strong_em_gid_em"><strong>aria2.remove</strong> (<em>gid</em>)</h4>
|
||||
<h5 id="_description_5">Description</h5>
|
||||
<div class="paragraph"><p>This method removes the download denoted by <em>gid</em>. <em>gid</em> is of type
|
||||
string. If specified download is in progress, it is stopped at
|
||||
first. The status of removed download becomes "removed". This method
|
||||
|
@ -3357,38 +3361,46 @@ returns GID of removed download.</p></div>
|
|||
>>> s.aria2.remove('3')
|
||||
'3'</tt></pre>
|
||||
</div></div>
|
||||
<div class="paragraph"><p><strong>aria2.forceRemove</strong> (<em>gid</em>)</p></div>
|
||||
<h4 id="_strong_aria2_forceremove_strong_em_gid_em"><strong>aria2.forceRemove</strong> (<em>gid</em>)</h4>
|
||||
<h5 id="_description_6">Description</h5>
|
||||
<div class="paragraph"><p>This method removes the download denoted by <em>gid</em>. This method
|
||||
behaves just like <strong>aria2.remove</strong> except that this method removes
|
||||
download without any action which takes time such as contacting
|
||||
BitTorrent tracker.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.pause</strong> (<em>gid</em>)</p></div>
|
||||
<h4 id="_strong_aria2_pause_strong_em_gid_em"><strong>aria2.pause</strong> (<em>gid</em>)</h4>
|
||||
<h5 id="_description_7">Description</h5>
|
||||
<div class="paragraph"><p>This method pauses the download denoted by <em>gid</em>. <em>gid</em> is of type
|
||||
string. The status of paused download becomes "paused". If the
|
||||
download is active, the download is placed on the first position of
|
||||
waiting queue. As long as the status is "paused", the download is not
|
||||
started. To change status to "waiting", use <strong>aria2.unpause</strong> method.
|
||||
This method returns GID of paused download.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.pauseAll</strong> ()</p></div>
|
||||
<h4 id="_strong_aria2_pauseall_strong"><strong>aria2.pauseAll</strong> ()</h4>
|
||||
<h5 id="_description_8">Description</h5>
|
||||
<div class="paragraph"><p>This method is equal to calling <strong>aria2.pause</strong> for every active/waiting
|
||||
download. This methods returns "OK" for success.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.forcePause</strong> (<em>pid</em>)</p></div>
|
||||
<h4 id="_strong_aria2_forcepause_strong_em_pid_em"><strong>aria2.forcePause</strong> (<em>pid</em>)</h4>
|
||||
<h5 id="_description_9">Description</h5>
|
||||
<div class="paragraph"><p>This method pauses the download denoted by <em>gid</em>. This method
|
||||
behaves just like <strong>aria2.pause</strong> except that this method pauses
|
||||
download without any action which takes time such as contacting
|
||||
BitTorrent tracker.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.forcePauseAll</strong> ()</p></div>
|
||||
<h4 id="_strong_aria2_forcepauseall_strong"><strong>aria2.forcePauseAll</strong> ()</h4>
|
||||
<h5 id="_description_10">Description</h5>
|
||||
<div class="paragraph"><p>This method is equal to calling <strong>aria2.forcePause</strong> for every
|
||||
active/waiting download. This methods returns "OK" for success.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.unpause</strong> (<em>gid</em>)</p></div>
|
||||
<h4 id="_strong_aria2_unpause_strong_em_gid_em"><strong>aria2.unpause</strong> (<em>gid</em>)</h4>
|
||||
<h5 id="_description_11">Description</h5>
|
||||
<div class="paragraph"><p>This method changes the status of the download denoted by <em>gid</em> from
|
||||
"paused" to "waiting". This makes the download eligible to restart.
|
||||
<em>gid</em> is of type string. This method returns GID of unpaused
|
||||
download.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.unpauseAll</strong> ()</p></div>
|
||||
<h4 id="_strong_aria2_unpauseall_strong"><strong>aria2.unpauseAll</strong> ()</h4>
|
||||
<h5 id="_description_12">Description</h5>
|
||||
<div class="paragraph"><p>This method is equal to calling <strong>aria2.unpause</strong> for every active/waiting
|
||||
download. This methods returns "OK" for success.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.tellStatus</strong> (<em>gid[, keys]</em>)</p></div>
|
||||
<h4 id="_strong_aria2_tellstatus_strong_em_gid_keys_em"><strong>aria2.tellStatus</strong> (<em>gid[, keys]</em>)</h4>
|
||||
<h5 id="_description_13">Description</h5>
|
||||
<div class="paragraph"><p>This method returns download progress of the download denoted by
|
||||
<em>gid</em>. <em>gid</em> is of type string. <em>keys</em> is array of string. If it is
|
||||
specified, the response contains only keys in <em>keys</em> array. If <em>keys</em>
|
||||
|
@ -3664,7 +3676,8 @@ name
|
|||
>>> pprint(r)
|
||||
{'completedLength': '34896138', 'gid': '1', 'totalLength': '34896138'}</tt></pre>
|
||||
</div></div>
|
||||
<div class="paragraph"><p><strong>aria2.getUris</strong> (<em>gid</em>)</p></div>
|
||||
<h4 id="_strong_aria2_geturis_strong_em_gid_em"><strong>aria2.getUris</strong> (<em>gid</em>)</h4>
|
||||
<h5 id="_description_14">Description</h5>
|
||||
<div class="paragraph"><p>This method returns URIs used in the download denoted by <em>gid</em>. <em>gid</em>
|
||||
is of type string. The response is of type array and its element is of
|
||||
type struct and it contains following keys. The value type is string.</p></div>
|
||||
|
@ -3687,7 +3700,8 @@ status
|
|||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
<div class="paragraph"><p><strong>aria2.getFiles</strong> (<em>gid</em>)</p></div>
|
||||
<h4 id="_strong_aria2_getfiles_strong_em_gid_em"><strong>aria2.getFiles</strong> (<em>gid</em>)</h4>
|
||||
<h5 id="_description_15">Description</h5>
|
||||
<div class="paragraph"><p>This method returns file list of the download denoted by <em>gid</em>. <em>gid</em>
|
||||
is of type string. The response is of type array and its element is of
|
||||
type struct and it contains following keys. The value type is string.</p></div>
|
||||
|
@ -3737,7 +3751,8 @@ uris
|
|||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
<div class="paragraph"><p><strong>aria2.getPeers</strong> (<em>gid</em>)</p></div>
|
||||
<h4 id="_strong_aria2_getpeers_strong_em_gid_em"><strong>aria2.getPeers</strong> (<em>gid</em>)</h4>
|
||||
<h5 id="_description_16">Description</h5>
|
||||
<div class="paragraph"><p>This method returns peer list of the download denoted by <em>gid</em>. <em>gid</em>
|
||||
is of type string. This method is for BitTorrent only. The response
|
||||
is of type array and its element is of type struct and it contains
|
||||
|
@ -3819,7 +3834,8 @@ seeder
|
|||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
<div class="paragraph"><p><strong>aria2.getServers</strong> (<em>gid</em>)</p></div>
|
||||
<h4 id="_strong_aria2_getservers_strong_em_gid_em"><strong>aria2.getServers</strong> (<em>gid</em>)</h4>
|
||||
<h5 id="_description_17">Description</h5>
|
||||
<div class="paragraph"><p>This method returns currently connected HTTP(S)/FTP servers of the download denoted by <em>gid</em>. <em>gid</em> is of type string. The response
|
||||
is of type array and its element is of type struct and it contains
|
||||
following keys. The value type is string.</p></div>
|
||||
|
@ -3869,12 +3885,14 @@ downloadSpeed
|
|||
</dl></div>
|
||||
</dd>
|
||||
</dl></div>
|
||||
<div class="paragraph"><p><strong>aria2.tellActive</strong> (<em>[keys]</em>)</p></div>
|
||||
<h4 id="_strong_aria2_tellactive_strong_em_keys_em"><strong>aria2.tellActive</strong> (<em>[keys]</em>)</h4>
|
||||
<h5 id="_description_18">Description</h5>
|
||||
<div class="paragraph"><p>This method returns the list of active downloads. The response is of
|
||||
type array and its element is the same struct returned by
|
||||
<strong>aria2.tellStatus</strong> method. For <em>keys</em> parameter, please refer to
|
||||
<strong>aria2.tellStatus</strong> method.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.tellWaiting</strong> (<em>offset, num, [keys]</em>)</p></div>
|
||||
<h4 id="_strong_aria2_tellwaiting_strong_em_offset_num_keys_em"><strong>aria2.tellWaiting</strong> (<em>offset, num, [keys]</em>)</h4>
|
||||
<h5 id="_description_19">Description</h5>
|
||||
<div class="paragraph"><p>This method returns the list of waiting download, including paused
|
||||
downloads. <em>offset</em> is of type integer and specifies the offset from
|
||||
the download waiting at the front. <em>num</em> is of type integer and
|
||||
|
@ -3892,7 +3910,8 @@ in this order. aria2.tellWaiting(0, 1) returns
|
|||
aria2.tellWaiting(-1, 2) returns ["C", "B"].</p></div>
|
||||
<div class="paragraph"><p>The response is of type array and its element is the same struct
|
||||
returned by <strong>aria2.tellStatus</strong> method.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.tellStopped</strong> (<em>offset, num, [keys]</em>)</p></div>
|
||||
<h4 id="_strong_aria2_tellstopped_strong_em_offset_num_keys_em"><strong>aria2.tellStopped</strong> (<em>offset, num, [keys]</em>)</h4>
|
||||
<h5 id="_description_20">Description</h5>
|
||||
<div class="paragraph"><p>This method returns the list of stopped download. <em>offset</em> is of type
|
||||
integer and specifies the offset from the oldest download. <em>num</em> is of
|
||||
type integer and specifies the number of downloads to be returned.
|
||||
|
@ -3901,7 +3920,8 @@ For <em>keys</em> parameter, please refer to <strong>aria2.tellStatus</strong> m
|
|||
method.</p></div>
|
||||
<div class="paragraph"><p>The response is of type array and its element is the same struct
|
||||
returned by <strong>aria2.tellStatus</strong> method.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.changePosition</strong> (<em>gid, pos, how</em>)</p></div>
|
||||
<h4 id="_strong_aria2_changeposition_strong_em_gid_pos_how_em"><strong>aria2.changePosition</strong> (<em>gid, pos, how</em>)</h4>
|
||||
<h5 id="_description_21">Description</h5>
|
||||
<div class="paragraph"><p>This method changes the position of the download denoted by
|
||||
<em>gid</em>. <em>pos</em> is of type integer. <em>how</em> is of type string. If <em>how</em> is
|
||||
"POS_SET", it moves the download to a position relative to the
|
||||
|
@ -3916,7 +3936,8 @@ destination position.</p></div>
|
|||
-1, POS_CUR) will change its position to 2. Additional
|
||||
aria2.changePosition(1, 0, POS_SET) will change its position to 0(the
|
||||
beginning of the queue).</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.changeUri</strong> (<em>gid, fileIndex, delUris, addUris[, position]</em>)</p></div>
|
||||
<h4 id="_strong_aria2_changeuri_strong_em_gid_fileindex_deluris_adduris_position_em"><strong>aria2.changeUri</strong> (<em>gid, fileIndex, delUris, addUris[, position]</em>)</h4>
|
||||
<h5 id="_description_22">Description</h5>
|
||||
<div class="paragraph"><p>This method removes URIs in <em>delUris</em> from and appends URIs in
|
||||
<em>addUris</em> to download denoted by <em>gid</em>. <em>delUris</em> and <em>addUris</em> are
|
||||
list of string. A download can contain multiple files and URIs are
|
||||
|
@ -3934,23 +3955,27 @@ specify (at least) 3 "http://example.org/aria2" in <em>delUris</em>. This
|
|||
method returns a list which contains 2 integers. The first integer is
|
||||
the number of URIs deleted. The second integer is the number of URIs
|
||||
added.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.getOption</strong> (<em>gid</em>)</p></div>
|
||||
<h4 id="_strong_aria2_getoption_strong_em_gid_em"><strong>aria2.getOption</strong> (<em>gid</em>)</h4>
|
||||
<h5 id="_description_23">Description</h5>
|
||||
<div class="paragraph"><p>This method returns options of the download denoted by <em>gid</em>. The
|
||||
response is of type struct. Its key is the name of option. The value type
|
||||
is string.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.changeOption</strong> (<em>gid, options</em>)</p></div>
|
||||
<h4 id="_strong_aria2_changeoption_strong_em_gid_options_em"><strong>aria2.changeOption</strong> (<em>gid, options</em>)</h4>
|
||||
<h5 id="_description_24">Description</h5>
|
||||
<div class="paragraph"><p>This method changes options of the download denoted by <em>gid</em>
|
||||
dynamically. <em>gid</em> is of type string. <em>options</em> is of type struct
|
||||
and the available options are: <strong>bt-max-peers</strong>,
|
||||
<strong>bt-request-peer-speed-limit</strong>, <strong>max-download-limit</strong> and
|
||||
<strong>max-upload-limit</strong>. This method returns "OK" for success.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.getGlobalOption</strong> ()</p></div>
|
||||
<h4 id="_strong_aria2_getglobaloption_strong"><strong>aria2.getGlobalOption</strong> ()</h4>
|
||||
<h5 id="_description_25">Description</h5>
|
||||
<div class="paragraph"><p>This method returns global options. The response is of type
|
||||
struct. Its key is the name of option. The value type is string.
|
||||
Because global options are used as a template for the options of newly
|
||||
added download, the response contains keys returned by
|
||||
<strong>aria2.getOption</strong> method.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.changeGlobalOption</strong> (<em>options</em>)</p></div>
|
||||
<h4 id="_strong_aria2_changeglobaloption_strong_em_options_em"><strong>aria2.changeGlobalOption</strong> (<em>options</em>)</h4>
|
||||
<h5 id="_description_26">Description</h5>
|
||||
<div class="paragraph"><p>This method changes global options dynamically. <em>options</em> is of type
|
||||
struct and the available options are <strong>max-concurrent-downloads</strong>,
|
||||
<strong>max-overall-download-limit</strong>, <strong>max-overall-upload-limit</strong>, <strong>log-level</strong>
|
||||
|
@ -3958,10 +3983,12 @@ and <strong>log</strong>. Using <strong>log</strong> option, you can dynamically
|
|||
change log file. To stop logging, give empty string("") as a parameter
|
||||
value. Note that log file is always opened in append mode. This method
|
||||
returns "OK" for success.</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.purgeDownloadResult</strong> ()</p></div>
|
||||
<h4 id="_strong_aria2_purgedownloadresult_strong"><strong>aria2.purgeDownloadResult</strong> ()</h4>
|
||||
<h5 id="_description_27">Description</h5>
|
||||
<div class="paragraph"><p>This method purges completed/error/removed downloads to free memory.
|
||||
This method returns "OK".</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.getVersion</strong> ()</p></div>
|
||||
<h4 id="_strong_aria2_getversion_strong"><strong>aria2.getVersion</strong> ()</h4>
|
||||
<h5 id="_description_28">Description</h5>
|
||||
<div class="paragraph"><p>This method returns version of the program and the list of enabled
|
||||
features. The response is of type struct and contains following keys.</p></div>
|
||||
<div class="dlist"><dl>
|
||||
|
@ -3999,7 +4026,8 @@ enabledFeatures
|
|||
'XML-RPC'],
|
||||
'version': '1.10.5'}</tt></pre>
|
||||
</div></div>
|
||||
<div class="paragraph"><p><strong>aria2.getSessionInfo</strong> ()</p></div>
|
||||
<h4 id="_strong_aria2_getsessioninfo_strong"><strong>aria2.getSessionInfo</strong> ()</h4>
|
||||
<h5 id="_description_29">Description</h5>
|
||||
<div class="paragraph"><p>This method returns session information.
|
||||
The response is of type struct and contains following key.</p></div>
|
||||
<div class="dlist"><dl>
|
||||
|
@ -4019,13 +4047,16 @@ sessionId
|
|||
>>> s.aria2.getSessionInfo()
|
||||
{'sessionId': 'cd6a3bc6a1de28eb5bfa181e5f6b916d44af31a9'}</tt></pre>
|
||||
</div></div>
|
||||
<div class="paragraph"><p><strong>aria2.shutdown</strong> ()</p></div>
|
||||
<h4 id="_strong_aria2_shutdown_strong"><strong>aria2.shutdown</strong> ()</h4>
|
||||
<h5 id="_description_30">Description</h5>
|
||||
<div class="paragraph"><p>This method shutdowns aria2. This method returns "OK".</p></div>
|
||||
<div class="paragraph"><p><strong>aria2.forceShutdown</strong> ()</p></div>
|
||||
<h4 id="_strong_aria2_forceshutdown_strong"><strong>aria2.forceShutdown</strong> ()</h4>
|
||||
<h5 id="_description_31">Description</h5>
|
||||
<div class="paragraph"><p>This method shutdowns aria2. This method behaves like <strong>aria2.shutdown</strong>
|
||||
except that any actions which takes time such as contacting BitTorrent
|
||||
tracker are skipped. This method returns "OK".</p></div>
|
||||
<div class="paragraph"><p><strong>system.multicall</strong> (<em>methods</em>)</p></div>
|
||||
<h4 id="_strong_system_multicall_strong_em_methods_em"><strong>system.multicall</strong> (<em>methods</em>)</h4>
|
||||
<h5 id="_description_32">Description</h5>
|
||||
<div class="paragraph"><p>This methods encapsulates multiple method calls in a single request.
|
||||
<em>methods</em> is of type array and its element is struct. The struct
|
||||
contains two keys: "methodName" and "params". "methodName" is the
|
||||
|
@ -4550,7 +4581,7 @@ files in the program, then also delete it here.</p></div>
|
|||
<div id="footnotes"><hr /></div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2010-10-30 18:35:50 JST
|
||||
Last updated 2010-10-30 18:54:38 JST
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
124
doc/aria2c.1.txt
124
doc/aria2c.1.txt
|
@ -1450,6 +1450,10 @@ Methods
|
|||
All code examples come from Python2.7 interpreter.
|
||||
|
||||
*aria2.addUri* ('uris[, options[, position]]')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method adds new HTTP(S)/FTP/BitTorrent Magnet URI. 'uris' is of
|
||||
type array and its element is URI which is of type string. For
|
||||
|
@ -1485,6 +1489,10 @@ Adding a download and insert it to the front of waiting downloads:
|
|||
---------------------------------------------------------------
|
||||
|
||||
*aria2.addTorrent* ('torrent[, uris[, options[, position]]]')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method adds BitTorrent download by uploading .torrent file. If
|
||||
you want to add BitTorrent Magnet URI, use *aria2.addUri* method
|
||||
|
@ -1512,6 +1520,10 @@ Adding local file file.torrent to aria2:
|
|||
---------------------------------------------------------------------
|
||||
|
||||
*aria2.addMetalink* ('metalink[, options[, position]]')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method adds Metalink download by uploading .metalink file.
|
||||
'metalink' is of type base64 which contains Base64-encoded .metalink
|
||||
|
@ -1533,6 +1545,10 @@ Adding local file file.meta4 to aria2:
|
|||
--------------------------------------------------------------------
|
||||
|
||||
*aria2.remove* ('gid')
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method removes the download denoted by 'gid'. 'gid' is of type
|
||||
string. If specified download is in progress, it is stopped at
|
||||
|
@ -1548,6 +1564,10 @@ Removing download whose GID is '3':
|
|||
--------------------------------------------------------------------
|
||||
|
||||
*aria2.forceRemove* ('gid')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method removes the download denoted by 'gid'. This method
|
||||
behaves just like *aria2.remove* except that this method removes
|
||||
|
@ -1555,6 +1575,10 @@ download without any action which takes time such as contacting
|
|||
BitTorrent tracker.
|
||||
|
||||
*aria2.pause* ('gid')
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method pauses the download denoted by 'gid'. 'gid' is of type
|
||||
string. The status of paused download becomes "paused". If the
|
||||
|
@ -1564,11 +1588,19 @@ started. To change status to "waiting", use *aria2.unpause* method.
|
|||
This method returns GID of paused download.
|
||||
|
||||
*aria2.pauseAll* ()
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method is equal to calling *aria2.pause* for every active/waiting
|
||||
download. This methods returns "OK" for success.
|
||||
|
||||
*aria2.forcePause* ('pid')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method pauses the download denoted by 'gid'. This method
|
||||
behaves just like *aria2.pause* except that this method pauses
|
||||
|
@ -1576,11 +1608,19 @@ download without any action which takes time such as contacting
|
|||
BitTorrent tracker.
|
||||
|
||||
*aria2.forcePauseAll* ()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method is equal to calling *aria2.forcePause* for every
|
||||
active/waiting download. This methods returns "OK" for success.
|
||||
|
||||
*aria2.unpause* ('gid')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method changes the status of the download denoted by 'gid' from
|
||||
"paused" to "waiting". This makes the download eligible to restart.
|
||||
|
@ -1588,11 +1628,19 @@ This method changes the status of the download denoted by 'gid' from
|
|||
download.
|
||||
|
||||
*aria2.unpauseAll* ()
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method is equal to calling *aria2.unpause* for every active/waiting
|
||||
download. This methods returns "OK" for success.
|
||||
|
||||
*aria2.tellStatus* ('gid[, keys]')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method returns download progress of the download denoted by
|
||||
'gid'. 'gid' is of type string. 'keys' is array of string. If it is
|
||||
|
@ -1767,6 +1815,10 @@ Get information specifying keys you are interested in:
|
|||
--------------------------------------------------------------------------
|
||||
|
||||
*aria2.getUris* ('gid')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method returns URIs used in the download denoted by 'gid'. 'gid'
|
||||
is of type string. The response is of type array and its element is of
|
||||
|
@ -1782,6 +1834,10 @@ status::
|
|||
in the queue.
|
||||
|
||||
*aria2.getFiles* ('gid')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method returns file list of the download denoted by 'gid'. 'gid'
|
||||
is of type string. The response is of type array and its element is of
|
||||
|
@ -1812,6 +1868,10 @@ uris::
|
|||
same struct used in *aria2.getUris* method.
|
||||
|
||||
*aria2.getPeers* ('gid')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method returns peer list of the download denoted by 'gid'. 'gid'
|
||||
is of type string. This method is for BitTorrent only. The response
|
||||
|
@ -1858,6 +1918,10 @@ seeder::
|
|||
"true" is this client is a seeder. Otherwise "false".
|
||||
|
||||
*aria2.getServers* ('gid')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method returns currently connected HTTP(S)/FTP servers of the download denoted by 'gid'. 'gid' is of type string. The response
|
||||
is of type array and its element is of type struct and it contains
|
||||
|
@ -1886,6 +1950,10 @@ servers::
|
|||
Download speed (byte/sec)
|
||||
|
||||
*aria2.tellActive* ('[keys]')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method returns the list of active downloads. The response is of
|
||||
type array and its element is the same struct returned by
|
||||
|
@ -1893,6 +1961,10 @@ type array and its element is the same struct returned by
|
|||
*aria2.tellStatus* method.
|
||||
|
||||
*aria2.tellWaiting* ('offset, num, [keys]')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method returns the list of waiting download, including paused
|
||||
downloads. 'offset' is of type integer and specifies the offset from
|
||||
|
@ -1917,6 +1989,10 @@ The response is of type array and its element is the same struct
|
|||
returned by *aria2.tellStatus* method.
|
||||
|
||||
*aria2.tellStopped* ('offset, num, [keys]')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method returns the list of stopped download. 'offset' is of type
|
||||
integer and specifies the offset from the oldest download. 'num' is of
|
||||
|
@ -1930,6 +2006,10 @@ The response is of type array and its element is the same struct
|
|||
returned by *aria2.tellStatus* method.
|
||||
|
||||
*aria2.changePosition* ('gid, pos, how')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method changes the position of the download denoted by
|
||||
'gid'. 'pos' is of type integer. 'how' is of type string. If 'how' is
|
||||
|
@ -1948,6 +2028,10 @@ aria2.changePosition(1, 0, POS_SET) will change its position to 0(the
|
|||
beginning of the queue).
|
||||
|
||||
*aria2.changeUri* ('gid, fileIndex, delUris, addUris[, position]')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method removes URIs in 'delUris' from and appends URIs in
|
||||
'addUris' to download denoted by 'gid'. 'delUris' and 'addUris' are
|
||||
|
@ -1968,12 +2052,20 @@ the number of URIs deleted. The second integer is the number of URIs
|
|||
added.
|
||||
|
||||
*aria2.getOption* ('gid')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method returns options of the download denoted by 'gid'. The
|
||||
response is of type struct. Its key is the name of option. The value type
|
||||
is string.
|
||||
|
||||
*aria2.changeOption* ('gid, options')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method changes options of the download denoted by 'gid'
|
||||
dynamically. 'gid' is of type string. 'options' is of type struct
|
||||
|
@ -1982,6 +2074,10 @@ and the available options are: *bt-max-peers*,
|
|||
*max-upload-limit*. This method returns "OK" for success.
|
||||
|
||||
*aria2.getGlobalOption* ()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method returns global options. The response is of type
|
||||
struct. Its key is the name of option. The value type is string.
|
||||
|
@ -1990,6 +2086,10 @@ added download, the response contains keys returned by
|
|||
*aria2.getOption* method.
|
||||
|
||||
*aria2.changeGlobalOption* ('options')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method changes global options dynamically. 'options' is of type
|
||||
struct and the available options are *max-concurrent-downloads*,
|
||||
|
@ -2000,11 +2100,19 @@ value. Note that log file is always opened in append mode. This method
|
|||
returns "OK" for success.
|
||||
|
||||
*aria2.purgeDownloadResult* ()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method purges completed/error/removed downloads to free memory.
|
||||
This method returns "OK".
|
||||
|
||||
*aria2.getVersion* ()
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method returns version of the program and the list of enabled
|
||||
features. The response is of type struct and contains following keys.
|
||||
|
@ -2035,6 +2143,10 @@ enabledFeatures::
|
|||
--------------------------------------------------------------------
|
||||
|
||||
*aria2.getSessionInfo* ()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method returns session information.
|
||||
The response is of type struct and contains following key.
|
||||
|
@ -2051,16 +2163,28 @@ sessionId::
|
|||
--------------------------------------------------------------------
|
||||
|
||||
*aria2.shutdown* ()
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method shutdowns aria2. This method returns "OK".
|
||||
|
||||
*aria2.forceShutdown* ()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This method shutdowns aria2. This method behaves like *aria2.shutdown*
|
||||
except that any actions which takes time such as contacting BitTorrent
|
||||
tracker are skipped. This method returns "OK".
|
||||
|
||||
*system.multicall* ('methods')
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description
|
||||
+++++++++++
|
||||
|
||||
This methods encapsulates multiple method calls in a single request.
|
||||
'methods' is of type array and its element is struct. The struct
|
||||
|
|
Loading…
Reference in New Issue