Get started

Get all torrents

UTorrentClient client = new UTorrentClient("admin", "password");
var response = client.GetList();
List<Torrent> torrents = response.Result.Torrents;

Add new torrent from file

using(var file = new System.IO.File("mytool.torrent"))
{
    UTorrentClient client = new UTorrentClient("admin", "password");
    var response = client.PostTorrent(file, "tools");
    var torrent = response.AddedTorrent;
}

Send command

UTorrentClient client = new UTorrentClient("admin", "password");
string torrentId = "2D5B29C752CA5286D3B347591E7D08EAA13109CE";
client.StartTorrent(torrentId);
client.StopTorrent(torrentId);
client.PauseTorrent(torrentId);
client.RecheckTorrent(torrentId);
client.DeleteTorrent(torrentId);

List<string> torrentIds = new List<string>() { /* ... */ };
client.StopTorrent(torrentIds);

Last edited Jun 13, 2013 at 12:58 PM by latop2604, version 2

Comments

No comments yet.