Class: Sonycam::CLI
- Inherits:
-
Thor
- Object
- Thor
- Sonycam::CLI
- Defined in:
- lib/sonycam/cli.rb
Constant Summary collapse
- DD_PATH =
File.join(ENV['HOME'], '.sonycam')
Instance Method Summary collapse
- #api(method, *params) ⇒ Object
- #list(query = nil) ⇒ Object
- #liveview ⇒ Object
- #scan(ip = nil) ⇒ Object
Instance Method Details
#api(method, *params) ⇒ Object
48 49 50 |
# File 'lib/sonycam/cli.rb', line 48 def api method, *params puts api_client.request(method, *params).to_json end |
#list(query = nil) ⇒ Object
32 33 34 35 36 |
# File 'lib/sonycam/cli.rb', line 32 def list query = nil apis = api_client.request(:getAvailableApiList).first apis.select!{|method| method =~ /#{query}/i } if query puts apis end |