QBittorrent::Api::App
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
Instance methods
GET app/networkInterfaceAddressList — addresses bound to iface
(qB 5.x addition). Omit iface (or pass nil) for all interfaces.
GET app/networkInterfaceList — available network interfaces
(qB 5.x addition).
POST app/setCookies — replace the stored cookies with cookies, sent
as the form field cookies=<JSON array>.
ameba:disable Naming/AccessorMethodName
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
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
POST app/shutdown — exits qBittorrent. Returns nothing; the server
process terminates, so subsequent requests will fail.