A Rust library for interacting with qBittorrent's Web API.
Implemented according to WebUI API (qBittorrent 4.1). Since the official documentation often lags behind releases, this crate also includes support for newer, undocumented features to stay current. The implementation is based on the API behavior of qBittorrent v5.1.2. For the most accurate and complete list of supported API methods and model fields, please refer to this crate's documentation on docs.rs.
Add dependency by running:
cargo add qbit-rsor manually add to Cargo.toml:
[dependencies]
qbit-rs = "0.4"Then use it in your code:
use qbit_rs::Qbit;
use qbit_rs::model::Credential;
let credential = Credential::new("username", "password");
let api = Qbit::new("http://my-qb-instance.domain", credential);
let torrents = api.get_version().await;or use the builder pattern:
use qbit_rs::Qbit;
let api = Qbit::builder()
.endpoint("http://my-qb-instance.domain")
.cookie("SID=1234567890")
.build();
let torrents = api.get_version().await;For more methods, see Qbit.
Most of the API is covered, except RSS and Search. PR is welcomed if you need that part of the API. The following is a list of the implementation status:
- Authentication
- Application
- Log
- Sync
- Transfer info
- Torrent management
- Get torrent list
- Get torrent generic properties
- Get torrent trackers
- Get torrent web seeds
- Get torrent contents
- Get torrent pieces' states
- Get torrent pieces' hashes
- Add new torrent
- Pause torrents
- Resume torrents
- Delete torrents
- Recheck torrents
- Reannounce torrents
- Edit trackers
- Remove trackers
- Add peers
- Add trackers to torrent
- Increase torrent priority
- Decrease torrent priority
- Maximal torrent priority
- Minimal torrent priority
- Set file priority
- Get torrent download limit
- Set torrent download limit
- Set torrent share limit
- Get torrent upload limit
- Set torrent upload limit
- Set torrent location
- Set torrent name
- Set torrent category
- Get all categories
- Add new category
- Edit category
- Remove categories
- Add torrent tags
- Remove torrent tags
- Get all tags
- Create tags
- Delete tags
- Set automatic torrent management
- Toggle sequential download
- Set first/last piece priority
- Set force start
- Set super seeding
- Rename file
- Rename folder
- RSS (experimental)
- Add folder
- Add feed
- Remove item
- Move item
- Get all items
- Mark as read
- Refresh item
- Set auto-downloading rule
- Rename auto-downloading rule
- Remove auto-downloading rule
- Get all auto-downloading rules
- Get all articles matching a rule
- Search
- Start search
- Stop search
- Get search status
- Get search results
- Delete search
- Get search plugins
- Install search plugin
- Uninstall search plugin
- Enable search plugin
- Update search plugins
- Undocumented