Class: QBittorrent::Api
- Inherits:
-
Object
- Object
- QBittorrent::Api
- Includes:
- WebApi::App, WebApi::Authroize, WebApi::Core, WebApi::Torrent
- Defined in:
- lib/qbittorrent/api.rb
Instance Attribute Summary collapse
-
#cookies ⇒ Object
Returns the value of attribute cookies.
-
#global_options ⇒ Object
Returns the value of attribute global_options.
-
#host ⇒ Object
Returns the value of attribute host.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(host, username, password, logger = nil, **global_options) ⇒ Api
constructor
A new instance of Api.
Methods included from WebApi::Torrent
#add_torrents, #delete_torrents, #get_torrents, #reannounce
Methods included from WebApi::App
#api_version, #application_version, #build_info, #default_save_path, #preferences, #set_preferences, #shutdown
Methods included from WebApi::Authroize
Constructor Details
#initialize(host, username, password, logger = nil, **global_options) ⇒ Api
Returns a new instance of Api.
18 19 20 21 22 23 24 |
# File 'lib/qbittorrent/api.rb', line 18 def initialize(host, username, password, logger = nil, **) @host = host.delete_suffix('/') @username = username @password = password @logger = logger ? Logger.new(logger) : nil @global_options = end |
Instance Attribute Details
#cookies ⇒ Object
Returns the value of attribute cookies.
16 17 18 |
# File 'lib/qbittorrent/api.rb', line 16 def @cookies end |
#global_options ⇒ Object
Returns the value of attribute global_options.
16 17 18 |
# File 'lib/qbittorrent/api.rb', line 16 def @global_options end |
#host ⇒ Object
Returns the value of attribute host.
16 17 18 |
# File 'lib/qbittorrent/api.rb', line 16 def host @host end |
#logger ⇒ Object
Returns the value of attribute logger.
16 17 18 |
# File 'lib/qbittorrent/api.rb', line 16 def logger @logger end |
#password ⇒ Object
Returns the value of attribute password.
16 17 18 |
# File 'lib/qbittorrent/api.rb', line 16 def password @password end |
#username ⇒ Object
Returns the value of attribute username.
16 17 18 |
# File 'lib/qbittorrent/api.rb', line 16 def username @username end |