sonycam 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sonycam/device_description.rb +6 -7
- data/lib/sonycam/version.rb +1 -1
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ce94eb6c341f619ef65191b765a3a79bd86a241
|
4
|
+
data.tar.gz: ded56c7cc81ef457d55c4ba62a4dacc7f5065206
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0b1038851747875aa94fca082ec67701781a3921c70062bc5d1a267ffa3f410175352a1cae734f97c554051d5130eddd0a7ad6ff19062e0c0818f7f5831b712
|
7
|
+
data.tar.gz: 654765f80967c3c7bf0fdba9c0e0072f215675de383f13114c08a492698b5c74e26f9d75bd502d72583b7aeb5b4727f64eb5b6580e96b3fe49418a3323f58e77
|
@@ -1,18 +1,17 @@
|
|
1
|
-
require '
|
1
|
+
require 'rexml/document'
|
2
2
|
require 'open-uri'
|
3
3
|
|
4
4
|
module Sonycam
|
5
5
|
class DeviceDescription
|
6
6
|
attr_reader :doc
|
7
7
|
|
8
|
-
# document: String or Nokogiri::XML::Node
|
9
8
|
def initialize document
|
10
|
-
@doc =
|
11
|
-
@camera_name = @doc
|
9
|
+
@doc = REXML::Document.new(open(document))
|
10
|
+
@camera_name = REXML::XPath.first(@doc, "//xmlns:friendlyName").text
|
12
11
|
@api_url_hash = {}
|
13
|
-
@doc
|
14
|
-
type =
|
15
|
-
url =
|
12
|
+
REXML::XPath.each(@doc, '//av:X_ScalarWebAPI_Service') do |element|
|
13
|
+
type = REXML::XPath.first(element, 'av:X_ScalarWebAPI_ServiceType').text
|
14
|
+
url = REXML::XPath.first(element, 'av:X_ScalarWebAPI_ActionList_URL').text
|
16
15
|
@api_url_hash[type.to_sym] = url
|
17
16
|
end
|
18
17
|
end
|
data/lib/sonycam/version.rb
CHANGED
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.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Jian
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: nokogiri
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
description: Sony Camera Remote API Wrapper
|
42
28
|
email: tonytonyjan@gmail.com
|
43
29
|
executables:
|