QBittorrent::Api::Transfer
The transfer endpoint group (/api/v2/transfer/, see ext/api-map.md
§2.4): global transfer statistics, the alternative-speed-limits toggle,
the global download/upload rate limits and peer banning.
Built on the Client request helpers; construct it with a client:
transfer = QBittorrent::Api::Transfer.new(client)
transfer.info.dht_nodes # => 67
transfer.download_limit # => 0 (unlimited)
transfer.set_download_limit(1_048_576_i64)
Constructors
Instance methods
POST transfer/banPeers — ban one or more peers. peers is a string of
host:port items separated by | (e.g. "1.2.3.4:6881|5.6.7.8:51413").
POST transfer/banPeers — ban one or more peers. peers is a string of
host:port items separated by | (e.g. "1.2.3.4:6881|5.6.7.8:51413").
Overload taking host:port items as an array; they are joined with |.
GET transfer/downloadLimit — global download rate limit in bytes/s
(0 = unlimited).
POST transfer/setDownloadLimit — set the global download rate limit,
limit in bytes/s (0 = unlimited).
ameba:disable Naming/AccessorMethodName
POST transfer/setSpeedLimitsMode — explicitly set the alternative speed
limits (true = on, false = off). qB 5.x explicit setter, an
alternative to the toggle above.
ameba:disable Naming/AccessorMethodName
POST transfer/setUploadLimit — set the global upload rate limit,
limit in bytes/s (0 = unlimited).
ameba:disable Naming/AccessorMethodName
GET transfer/speedLimitsMode — whether the alternative speed limits
are currently active. The API answers with the text "1" (on) or "0"
(off); this is exposed here as a Bool (true = alt limits enabled).
POST transfer/toggleSpeedLimitsMode — flip the alternative speed limits
on/off.