qbit
qbit copied to clipboard
A Rust library for interacting with qBittorrent's Web API
Qbit-rs
A Rust library for interacting with qBittorrent's Web API.
Implemented according to WebUI API (qBittorrent 4.1).
Usage
Add dependency by running:
cargo add qbit-rs
or 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
.
API Coverage
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:
- [x] Authentication
- [x] Application
- [x] Log
- [x] Get log
- [x] Get peer log
- [x] Sync
- [x] Get main data
- [x] Get torrent peers data
- [x] Transfer info
- [x] Torrent management
- [x] Get torrent list
- [x] Get torrent generic properties
- [x] Get torrent trackers
- [x] Get torrent web seeds
- [x] Get torrent contents
- [x] Get torrent pieces' states
- [x] Get torrent pieces' hashes
- [x] Add new torrent
- [x] Pause torrents
- [x] Resume torrents
- [x] Delete torrents
- [x] Recheck torrents
- [x] Reannounce torrents
- [x] Edit trackers
- [x] Remove trackers
- [x] Add peers
- [x] Add trackers to torrent
- [x] Increase torrent priority
- [x] Decrease torrent priority
- [x] Maximal torrent priority
- [x] Minimal torrent priority
- [x] Set file priority
- [x] Get torrent download limit
- [x] Set torrent download limit
- [x] Set torrent share limit
- [x] Get torrent upload limit
- [x] Set torrent upload limit
- [x] Set torrent location
- [x] Set torrent name
- [x] Set torrent category
- [x] Get all categories
- [x] Add new category
- [x] Edit category
- [x] Remove categories
- [x] Add torrent tags
- [x] Remove torrent tags
- [x] Get all tags
- [x] Create tags
- [x] Delete tags
- [x] Set automatic torrent management
- [x] Toggle sequential download
- [x] Set first/last piece priority
- [x] Set force start
- [x] Set super seeding
- [x] Rename file
- [x] Rename folder
- [ ] RSS (experimental)
- [x] Add folder
- [x] Add feed
- [x] Remove item
- [x] Move item
- [ ] Get all items
- [x] Mark as read
- [x] Refresh item
- [ ] Set auto-downloading rule
- [x] Rename auto-downloading rule
- [x] 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
- [x] Export torrent[^1]
[^1]: The endpoint is added in this PR