class

QBittorrent::Api::Search

Inherits Reference < Object

The search endpoint group (/api/v2/search/): start/stop/delete search jobs, poll their status and results, and manage search plugins.

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

search = QBittorrent::Api::Search.new(client)
id = search.start("ubuntu")      # => 1
search.status(id).first.running? # => true
search.results(id).results.first.file_name
search.stop(id)
search.delete(id)

Constructors

new(client : Client)
Source

Instance methods

delete(id : Int32) : Nil

POST search/delete — delete search job id and its results.

Source
enable_plugin(names : Enumerable(String), enable : Bool) : Nil

POST search/enablePlugin — enable or disable plugins by names.

Source
enable_plugin(name : String, enable : Bool) : Nil

POST search/enablePlugin — enable or disable plugins by names.

Source
install_plugin(sources : Enumerable(String)) : Nil

POST search/installPlugin — install plugins from sources (each a URL or local path).

Source
install_plugin(source : String) : Nil

POST search/installPlugin — install plugins from sources (each a URL or local path).

Source
plugins

GET search/plugins — all installed search plugins.

Source
results(id : Int32, limit : Int32 | Nil = nil, offset : Int32 | Nil = nil) : Model::SearchResultsResponse

GET search/results — results collected so far for search job id.

limit caps the number of results returned (nil/0 = no limit) and offset skips that many results (a negative offset counts from the end).

Source
start(pattern : String, plugins : String = "enabled", category : String = "all") : Int32

POST search/start — start a new search job, returning its id.

pattern is the search term. plugins selects which plugins to use: a |-joined list of plugin names, or the special values "all" / "enabled" (default). category narrows the search to a plugin category id, or "all" (default).

Source
status(id : Int32 | Nil = nil) : Array(Model::SearchStatus)

GET search/status — status of search job id, or of all jobs when id is nil (the default).

Source
stop(id : Int32) : Nil

POST search/stop — stop the running search job id (its collected results remain available until #delete).

Source
uninstall_plugin(names : Enumerable(String)) : Nil

POST search/uninstallPlugin — uninstall plugins by names.

Source
uninstall_plugin(name : String) : Nil

POST search/uninstallPlugin — uninstall plugins by names.

Source
update_plugins

POST search/updatePlugins — update all installed plugins.

Source