qbittorrent_api

Last updated:

0 purchases

qbittorrent_api Image
qbittorrent_api Images
Add to Cart

Description:

qbittorrent api

qbittorrent_api #
Dart wrapper for qBittorrent Web API.

Overview #
This package provides a Dart wrapper for qBittorrent Web API.
To use this package, you will need a qBittorrent server running with the Web API enabled.
Web API Version #
Supported Web API version: qBittorrent v4.1+
Setup #
Create a QBittorrentApiV2 instance by providing the URL of your qBittorrent server.
final qbittorrent = QBittorrentApiV2(
baseUrl: 'http://localhost:8080', // Replace with the actual URL of your qBittorrent server
cookiePath: '.', // Path where login cookies is stored
logger: true, // Enable logging
);
copied to clipboard
Basic Usage #
This package provides methods to interact with various API endpoints. Belows are some of the examples.
To see all available methods, check out qBittorrent WebUI API Documentation.
Login #
await qbittorent.auth.login(username: 'username', password: 'password');
copied to clipboard
Add New Torrent #
// Add torrents by urls.
final torrents = NewTorrents.urls(urls: ['https://example.torrent', 'https://example-2.torrent']);
await qbittorrent.torrents.addNewTorrents(torrents: torrents);

// Add torrents by files.
final torrents = NewTorrents.files(files: [File('./example.torrent')]);
await qbittorrent.torrents.addNewTorrents(torrents: torrents);

// Add torrent by bytes.
final newTorrents = NewTorrents.bytes(bytes: [FileBytes(filename: 'example.torrent', bytes: bytes)]);
await qbittorrent.torrents.addNewTorrents(torrents: torrents);
copied to clipboard
Subscribe to Torrent List #
const interval = Duration(seconds: 3); // Refresh interval
final stream = qbittorrent.sync.subscribeMainData(interval: interval).listen((data) {
// Handle main data update
});
copied to clipboard
Subscribe to Torrent Properties #
const hash = "123123"; // Torrent hash
const interval = Duration(seconds: 3); // Refresh interval
final stream = qbittorrent.torrents.subscribeProperties(hash: hash, interval: interval).listen((data) {
// Handle torrent properties update
});
copied to clipboard
Having Bugs? #

This package is under active development. If you find any bug, please create an issue on Github.

Support #

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.