XML-RPC API
FmTorrent is designed to allow any kind of slave. You can use whatever programming language you want, given that it supports the XML-RPC RPC model.
addTorrentFromData
addTorrentFromData(torrentFilename, str) -> 1
Add a new torrent to the queue, given the destination filename and its content.
addTorrentFromURL
addTorrentFromURL(str) -> str
Add a new torrent to the queue, given its full URL. This method returns the filename of the new torrent.
getFeeds
getFeeds() -> list of feed names
Fetch the feeds list and return it as a list of string identifiers (like ['foo','bar'])
getStatus
getStatus() -> dict keyed by torrent name
Each item of the dictionnary is another dictionnary:
{'state': str, 'status': status,
'progress': str, 'peers': int,
'seeds': int, 'seedsmsg': str,
'dist': int, 'uprate': float,
'dnrate': float, 'upamt': int,
'dnamt': int, 'size': int, 't': int,
'msg': str}
Return informations about current torrents, as a dictionnary, hashed by torrent name
pauseTorrent
pauseTorrent(torrentName) -> int
Pause a torrent, given its name (cf. getStatus() for torrent names)
resumeTorrent
resumeTorrent(torrentName) -> int
Resume a torrent, given its name (cf. getStatus() for torrent names)
stopTorrent
stopTorrent(torrentName) -> int
Stop a torrent, given its name (cf. getStatus() for torrent names)
updateFeed
updateFeed(feedName) -> 0|1
Updates the feed identified by its name. If some torrents are found during update, add them to the queue and returns 1. Either returns 0.