qbit-rs

Crates.ioqbit-rs
lib.rsqbit-rs
version0.4.6
sourcesrc
created_at2023-04-10 05:03:57.857558
updated_at2024-10-29 20:03:32.524717
descriptionA Rust library for interacting with qBittorrent's Web API
homepagehttps://github.com/George-Miao/qbit
repositoryhttps://github.com/George-Miao/qbit
max_upload_size
id834841
size119,835
Pop (George-Miao)

documentation

https://docs.rs/qbit-rs

README

Qbit-rs

crates.io docs.rs github

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
  9. Undocumented
    1. Export torrent1

Footnotes

  1. The endpoint is added in this PR

Commit count: 68

cargo fmt