Class: KodiClient::Methods::System
Overview
contains all Kodi System methods
Constant Summary
collapse
- EJECT_OPTICAL_DRIVE =
'System.EjectOpticalDrive'
- GET_PROPERTIES =
'System.GetProperties'
- HIBERNATE =
'System.Hibernate'
- REBOOT =
'System.Reboot'
- SHUTDOWN =
'System.Shutdown'
- SUSPEND =
'System.Suspend'
Instance Method Summary
collapse
Methods inherited from KodiMethod
#apply_options, #invoke_api
Instance Method Details
#eject_optical_drive(kodi_id = 1) ⇒ Object
#get_properties(properties = Types::System::PropertyName.all_properties, kodi_id = 1) ⇒ Object
#hibernate(kodi_id = 1) ⇒ Object
29
30
31
32
33
|
# File 'lib/kodi_client/methods/system.rb', line 29
def hibernate(kodi_id = 1)
request = KodiRequest.new(kodi_id, HIBERNATE, {})
json = invoke_api(request)
KodiResponse.new(json)
end
|
#reboot(kodi_id = 1) ⇒ Object
35
36
37
38
39
|
# File 'lib/kodi_client/methods/system.rb', line 35
def reboot(kodi_id = 1)
request = KodiRequest.new(kodi_id, REBOOT, {})
json = invoke_api(request)
KodiResponse.new(json)
end
|
#shutdown(kodi_id = 1) ⇒ Object
41
42
43
44
45
|
# File 'lib/kodi_client/methods/system.rb', line 41
def shutdown(kodi_id = 1)
request = KodiRequest.new(kodi_id, SHUTDOWN, {})
json = invoke_api(request)
KodiResponse.new(json)
end
|
#suspend(kodi_id = 1) ⇒ Object
47
48
49
50
51
|
# File 'lib/kodi_client/methods/system.rb', line 47
def suspend(kodi_id = 1)
request = KodiRequest.new(kodi_id, SUSPEND, {})
json = invoke_api(request)
KodiResponse.new(json)
end
|