Class: KodiClient::Methods::Favourites
Overview
contains all Kodi Application methods
Constant Summary
collapse
- ADD_FAVOURITE =
'Favourites.AddFavourite'
- GET_FAVOURITES =
'Favourites.GetFavourites'
Instance Method Summary
collapse
Methods inherited from KodiMethod
#apply_options, #invoke_api
Instance Method Details
#add_favourite(title, type = Types::Favourites::Type::UNKNOWN, path = nil, window = nil, window_parameter = nil, thumbnail = nil, kodi_id = 1) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/kodi_client/methods/favourites.rb', line 11
def add_favourite(title, type = Types::Favourites::Type::UNKNOWN, path = nil, window = nil,
window_parameter = nil, thumbnail = nil, kodi_id = 1)
params = { 'title' => title, 'type' => type }
params['path'] = path unless path.nil?
params['window'] = window unless window.nil?
params['windowparameter'] = window_parameter unless window_parameter.nil?
params['thumbnail'] = thumbnail unless thumbnail.nil?
request = KodiRequest.new(kodi_id, ADD_FAVOURITE, params)
json = invoke_api(request)
KodiResponse.new(json)
end
|
#get_favourites(properties = Types::Favourites::FieldsFavourite.all_properties, type = nil, kodi_id = 1) ⇒ Object