File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## UNRELEASED (YYYY-MM-DD)
99
10+ ### Added
11+
12+ - ` QBittorrentClient::qbittorrent_version ` returns the qbittorrent daemon version
13+
1014## Version 0.2.1 (2025-08-28)
1115
1216This is a minor release only updating the docs, to specify the qBittorrent API versions supported.
Original file line number Diff line number Diff line change @@ -26,6 +26,13 @@ pub struct QBittorrentClient {
2626}
2727
2828impl QBittorrentClient {
29+ /// Returns the qBittorrent version, in a `vX.Y.Z` format.
30+ pub async fn qbittorrent_version ( & self ) -> Result < String , Error > {
31+ let res = self . _get ( self . _endpoint ( "app/version" ) ) . await ?;
32+ let bytes = res. bytes ( ) . await . boxed ( ) . context ( HttpError ) ?;
33+ Ok ( String :: from_utf8_lossy ( & bytes) . to_string ( ) )
34+ }
35+
2936 /// Returns the URL to an endpoint without params
3037 pub fn _endpoint ( & self , path : & str ) -> Url {
3138 Url :: parse ( & format ! ( "{}/api/v2/{}" , self . host, path) )
You can’t perform that action at this time.
0 commit comments