#web-api #api #qbittorrent #bittorrent #torrent #web #qbit

qbit-rs

A Rust library for interacting with qBittorrent's Web API

10 releases

0.4.1 Nov 29, 2023
0.4.0 Nov 29, 2023
0.3.8 Nov 26, 2023
0.3.7 Oct 7, 2023
0.1.0 Apr 10, 2023

#1176 in Network programming

Download history 39/week @ 2024-01-22 74/week @ 2024-02-19 186/week @ 2024-02-26 15/week @ 2024-03-04 20/week @ 2024-03-11 35/week @ 2024-04-01 9/week @ 2024-04-08 8/week @ 2024-04-15

52 downloads per month

MIT license

105KB
2.5K SLoC

Qbit-rs

github documentation

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:

  1. Authentication
    1. Login
    2. Logout
  2. Application
    1. Get application version
    2. Get API version
    3. Get build info
    4. Shutdown application
    5. Get application preferences
    6. Set application preferences
    7. Get default save path
  3. Log
    1. Get log
    2. Get peer log
  4. Sync
    1. Get main data
    2. Get torrent peers data
  5. Transfer info
    1. Get global transfer info
    2. Get alternative speed limits state
    3. Toggle alternative speed limits
    4. Get global download limit
    5. Set global download limit
    6. Get global upload limit
    7. Set global upload limit
    8. Ban peers
  6. Torrent management
    1. Get torrent list
    2. Get torrent generic properties
    3. Get torrent trackers
    4. Get torrent web seeds
    5. Get torrent contents
    6. Get torrent pieces' states
    7. Get torrent pieces' hashes
    8. Add new torrent
    9. Pause torrents
    10. Resume torrents
    11. Delete torrents
    12. Recheck torrents
    13. Reannounce torrents
    14. Edit trackers
    15. Remove trackers
    16. Add peers
    17. Add trackers to torrent
    18. Increase torrent priority
    19. Decrease torrent priority
    20. Maximal torrent priority
    21. Minimal torrent priority
    22. Set file priority
    23. Get torrent download limit
    24. Set torrent download limit
    25. Set torrent share limit
    26. Get torrent upload limit
    27. Set torrent upload limit
    28. Set torrent location
    29. Set torrent name
    30. Set torrent category
    31. Get all categories
    32. Add new category
    33. Edit category
    34. Remove categories
    35. Add torrent tags
    36. Remove torrent tags
    37. Get all tags
    38. Create tags
    39. Delete tags
    40. Set automatic torrent management
    41. Toggle sequential download
    42. Set first/last piece priority
    43. Set force start
    44. Set super seeding
    45. Rename file
    46. Rename folder
  7. RSS (experimental)
    1. Add folder
    2. Add feed
    3. Remove item
    4. Move item
    5. Get all items
    6. Mark as read
    7. Refresh item
    8. Set auto-downloading rule
    9. Rename auto-downloading rule
    10. Remove auto-downloading rule
    11. Get all auto-downloading rules
    12. Get all articles matching a rule
  8. Search
    1. Start search
    2. Stop search
    3. Get search status
    4. Get search results
    5. Delete search
    6. Get search plugins
    7. Install search plugin
    8. Uninstall search plugin
    9. Enable search plugin
    10. Update search plugins

Dependencies

~5–19MB
~277K SLoC