sonycam 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e8bb7515664f4109bda345540d3596f505eb16a
4
- data.tar.gz: 1497a72c295d8785635aabd9a27de12d7d0352b6
3
+ metadata.gz: f8d4e74f4426873992d5371ba31740ffb4819250
4
+ data.tar.gz: c2c5fcf60866177736fec900d189c22873a97e6d
5
5
  SHA512:
6
- metadata.gz: 711e07bbeddd2e76455811a8b840811273e3210868490b300f68bba1c4d43374a7718488c1780bc7d7892bae55ed72bfe16f16c1052ad30b29aa4e1b73aeaf99
7
- data.tar.gz: a1a9ecc0b5b54b73334fe0d8c4b092e596151f47c99a425428db03524949c42ffb99bef9e76b7320402b530a6a5f6624f47ff5f201f2ebef94c0231867373367
6
+ metadata.gz: 1d8b38df5403eb958cecad92ddcb7b1b3cdb010215e80fcba9c67f8584027d38c2afa7108b476efb35874633a3bad0021b26a7db4514b2c8de10f0d447073a1e
7
+ data.tar.gz: 9efe5b33fe493f9d1f689695b8daeb1bab201df7c29727b95ed54e555ab35e627b6de13d7bfd2b880154f8e080aecc2d92a17c3a18357414b15dc6f7496b10a5
@@ -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 METHOD PARAMS', 'Send API request'
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 Liveview and output to STDOUT'
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|
@@ -1,3 +1,3 @@
1
1
  module Sonycam
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sonycam
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Jian