Class: KodiClient::Client

Inherits:
Object
  • Object
show all
Includes:
Extensions::Chainable
Defined in:
lib/kodi_client.rb

Overview

client that holds all methods such as application, gui etc.

Instance Attribute Summary collapse

Attributes included from Extensions::Chainable

#client, #options

Instance Method Summary collapse

Methods included from Extensions::Chainable

#auth, #connect, #use_tls

Constructor Details

#initializeClient

Returns a new instance of Client.



163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/kodi_client.rb', line 163

def initialize
  @addons = Methods::Addons.new
  @audio_library = Methods::AudioLibrary.new
  @application = Methods::Application.new
  @favourites = Methods::Favourites.new
  @files = Methods::Files.new
  @gui = Methods::GUI.new
  @input = Methods::Input.new
  @player = Methods::Player.new
  @profiles = Methods::Profiles.new
  @system = Methods::System.new
  @video_library = Methods::System.new
end

Instance Attribute Details

#addonsObject (readonly)

Returns the value of attribute addons.



161
162
163
# File 'lib/kodi_client.rb', line 161

def addons
  @addons
end

#applicationObject (readonly)

Returns the value of attribute application.



161
162
163
# File 'lib/kodi_client.rb', line 161

def application
  @application
end

#audio_libraryObject (readonly)

Returns the value of attribute audio_library.



161
162
163
# File 'lib/kodi_client.rb', line 161

def audio_library
  @audio_library
end

#favouritesObject (readonly)

Returns the value of attribute favourites.



161
162
163
# File 'lib/kodi_client.rb', line 161

def favourites
  @favourites
end

#filesObject (readonly)

Returns the value of attribute files.



161
162
163
# File 'lib/kodi_client.rb', line 161

def files
  @files
end

#guiObject (readonly)

Returns the value of attribute gui.



161
162
163
# File 'lib/kodi_client.rb', line 161

def gui
  @gui
end

#inputObject (readonly)

Returns the value of attribute input.



161
162
163
# File 'lib/kodi_client.rb', line 161

def input
  @input
end

#playerObject (readonly)

Returns the value of attribute player.



161
162
163
# File 'lib/kodi_client.rb', line 161

def player
  @player
end

#profilesObject (readonly)

Returns the value of attribute profiles.



161
162
163
# File 'lib/kodi_client.rb', line 161

def profiles
  @profiles
end

#systemObject (readonly)

Returns the value of attribute system.



161
162
163
# File 'lib/kodi_client.rb', line 161

def system
  @system
end

Instance Method Details

#apply_options_to_methods(options) ⇒ Object



177
178
179
180
181
182
# File 'lib/kodi_client.rb', line 177

def apply_options_to_methods(options)
  instance_variables.each do |it|
    mod = instance_variable_get(it)
    mod.apply_options(options) if mod.is_a?(KodiMethod)
  end
end