qbittorrent

Haxe client implementation for qBittorrent's Web API.
https://gitlab.com/haath/qbittorrent-haxe

To install, run:

haxelib install qbittorrent 2.83.11 

See using Haxelib in Haxelib documentation for more information.

README.md

qbittorrent-haxe

pipeline status coverage report license haxelib version haxelib downloads

Haxe client implementation for qBittorrent's Web API.

Releasing versions

The library is available on Haxelib.

haxelib install qbittorrent

Usage

The entire API is implemented through methods, so it is not strictly necessary to be familiar with the API's documentation. All options are available either as method parameters, or as documented structure types. Additionally, all return types are documented as structure types, so using this library is as intuitive as possible.

var qbt = new QBittorrentClient("localhost", 8080, "username", "password");

qbt.addTorrent('magnet:?xt=urn:btih:2C6B6858D61D...', {
    paused: true,
    savepath: '/downloads/'
});

qbt.torrentsPause('2c6b6858d61da9543d4231a71db4b1c9264b0685');

Torrents can be added as one or more URLs (http://, https://, magnet:, bc://bt/), or paths to torrent files.

qbt.addTorrents([
    'path/to/ubuntu-20.04.5-desktop-amd64.iso.torrent',
    'https://releases.ubuntu.com/20.04/ubuntu-20.04.5-live-server-amd64.iso.torrent',
    'magnet:?xt=urn:btih:2C6B6858D61D...'
]);

Most methods that operate on torrents, accept either:

  • A torrent hash, or a list of torrent hashes.
  • A torrent object, or a list of torrent objects.
  • The constant All.
qbt.torrentsPause([ '2c6b6858d61da9543d4231a71db4b1c9264b0685', 'C9A337562CB0360FD6F5AB40FD2B1B81D5325DBD' ]);

var torr: Torrent = qbt.getTorrent('2c6b6858d61da9543d4231a71db4b1c9264b0685');
qbt.torrentsResume(torr);

qbt.torrentsDelete(All);

Versioning & Compatibility

The version numbering of this Haxelib represents the compatibility with the corresponding versions of qBittorrent's WebUI API. Specifically, the number follows the format: QM.QmQp.Mp.

  • The QM part corresponds to the major numbers of the WebUI API.
  • The QmQp pair corresponds to the combined minor and patch version numbers of the WebUI API.
  • The Mp part is the major and patch number of the library. The major number will be incremented for breaking changes, and the patch number only for forward and backward compatible changes.

So for example, Haxelib versions v2.82.* should all be compatible with WebUI API version v2.8.2.

Contributors
Haath
Version
2.83.11
Published
4 years ago
Dependencies
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub

⌂