class

QBittorrent::Api::App

Inherits Reference < Object

The app endpoint group (/api/v2/app/): application version and build information, global preferences, cookies and network-interface discovery.

Built on the Client request helpers; construct it with a client:

app = QBittorrent::Api::App.new(client)
app.version         # => "v5.2.3"
app.preferences.dht # => true

Constructors

new(client : Client)
Source

Instance methods

build_info

GET app/buildInfo — Qt/libtorrent/boost/openssl/zlib versions + bitness.

Source
default_save_path

GET app/defaultSavePath — the default torrent save path.

Source
network_interface_address_list(iface : String | Nil = nil) : Array(String)

GET app/networkInterfaceAddressList — addresses bound to iface (qB 5.x addition). Omit iface (or pass nil) for all interfaces.

Source
network_interface_list

GET app/networkInterfaceList — available network interfaces (qB 5.x addition).

Source
preferences

GET app/preferences — the full application preferences object.

Source
set_preferences(changes : Hash(String, JSON::Any)) : Nil

POST app/setPreferences — apply a partial preferences update.

changes is a map of only the fields to change, sent as the form field json=<object>. Values are JSON::Any so ints/bools/strings/ objects can be mixed:

app.set_preferences({"dht" => JSON::Any.new(false)})

ameba:disable Naming/AccessorMethodName

Source
set_preferences(json : String) : Nil

POST app/setPreferences — apply a partial preferences update.

changes is a map of only the fields to change, sent as the form field json=<object>. Values are JSON::Any so ints/bools/strings/ objects can be mixed:

app.set_preferences({"dht" => JSON::Any.new(false)})

ameba:disable Naming/AccessorMethodName

Overload taking a pre-serialized JSON object string (e.g. the output of serializing a partial Model::Preferences). Since nil Preferences fields are omitted by #to_json, only populated fields are sent. ameba:disable Naming/AccessorMethodName

Source
shutdown

POST app/shutdown — exits qBittorrent. Returns nothing; the server process terminates, so subsequent requests will fail.

Source
version

GET app/version — the qBittorrent application version, e.g. "v5.2.3".

Source
webapi_version

GET app/webapiVersion — the WebUI API version, e.g. "2.15.1".

Source