sonycam 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sonycam/cli.rb +6 -6
- data/lib/sonycam/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8d4e74f4426873992d5371ba31740ffb4819250
|
4
|
+
data.tar.gz: c2c5fcf60866177736fec900d189c22873a97e6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d8b38df5403eb958cecad92ddcb7b1b3cdb010215e80fcba9c67f8584027d38c2afa7108b476efb35874633a3bad0021b26a7db4514b2c8de10f0d447073a1e
|
7
|
+
data.tar.gz: 9efe5b33fe493f9d1f689695b8daeb1bab201df7c29727b95ed54e555ab35e627b6de13d7bfd2b880154f8e080aecc2d92a17c3a18357414b15dc6f7496b10a5
|
data/lib/sonycam/cli.rb
CHANGED
@@ -6,25 +6,25 @@ module Sonycam
|
|
6
6
|
class CLI < Thor
|
7
7
|
DD_PATH = File.join(ENV['HOME'], '.sonycam')
|
8
8
|
|
9
|
-
desc 'scan', 'Discover devices'
|
10
|
-
def scan
|
11
|
-
location = Scanner.scan.first
|
9
|
+
desc 'scan [IP]', 'Discover devices'
|
10
|
+
def scan ip = nil
|
11
|
+
location = Scanner.scan(ip).first
|
12
12
|
puts "Found location: #{location}"
|
13
13
|
File.write File.join(DD_PATH), open(location).read
|
14
14
|
puts "Device description file saved to #{DD_PATH}"
|
15
15
|
end
|
16
16
|
|
17
|
-
desc 'list QUERY', 'List all API or search'
|
17
|
+
desc 'list [QUERY]', 'List all API or search'
|
18
18
|
def list query
|
19
19
|
puts api_client.request(:getAvailableApiList)['result'].first.select{|method| method =~ /#{query}/i }
|
20
20
|
end
|
21
21
|
|
22
|
-
desc 'api
|
22
|
+
desc 'api method [PARAMETER ...]', 'Send API request'
|
23
23
|
def api method, *params
|
24
24
|
jj api_client.request(method, *params)
|
25
25
|
end
|
26
26
|
|
27
|
-
desc 'liveview', 'Start
|
27
|
+
desc 'liveview', 'Start liveview and output to STDOUT, it should be used with pipe'
|
28
28
|
def liveview
|
29
29
|
liveview_url = api_client.request('startLiveview')['result'][0]
|
30
30
|
Liveview.stream(liveview_url) do |packet|
|
data/lib/sonycam/version.rb
CHANGED