esod-client 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/esod-client.gemspec +2 -2
- data/esod-client.rb +1 -1
- data/lib/esod_client/esod_client.rb +3 -3
- data/pkg/esod-client-0.2.0.gem +0 -0
- metadata +2 -2
- data/pkg/esod-client-0.1.0.gem +0 -0
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/esod-client.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{esod-client}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Yan Pritzker", "CohesiveFT"]
|
@@ -101,7 +101,7 @@ Gem::Specification.new do |s|
|
|
101
101
|
"lib/rest-client-1.2.0/spec/response_spec.rb",
|
102
102
|
"lib/rest-client-1.2.0/spec/restclient_spec.rb",
|
103
103
|
"lib/trollop.rb",
|
104
|
-
"pkg/esod-client-0.
|
104
|
+
"pkg/esod-client-0.2.0.gem"
|
105
105
|
]
|
106
106
|
s.homepage = %q{http://github.com/cohesive/esod-client}
|
107
107
|
s.rdoc_options = ["--charset=UTF-8"]
|
data/esod-client.rb
CHANGED
@@ -19,7 +19,7 @@ require 'esodclient'
|
|
19
19
|
|
20
20
|
def main
|
21
21
|
client = ESODClient.new($options[:url], $options[:api_token])
|
22
|
-
response = client.
|
22
|
+
response = client.get($options[:resource], $options[:id])
|
23
23
|
|
24
24
|
if $options[:property]
|
25
25
|
response = response.value_of_dotted_property($options[:property])
|
@@ -9,13 +9,13 @@ class ESODClient
|
|
9
9
|
@token = api_token
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
13
|
-
|
12
|
+
def get(resource, id)
|
13
|
+
get_path("#{resource}/#{id}")
|
14
14
|
end
|
15
15
|
|
16
16
|
protected
|
17
17
|
|
18
|
-
def
|
18
|
+
def get_path(path)
|
19
19
|
response = RestClient.get("#{@url}/#{path}.xml?key=#{@token}").to_s
|
20
20
|
response_hash = Hash.from_xml(response)
|
21
21
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esod-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yan Pritzker
|
@@ -108,7 +108,7 @@ files:
|
|
108
108
|
- lib/rest-client-1.2.0/spec/response_spec.rb
|
109
109
|
- lib/rest-client-1.2.0/spec/restclient_spec.rb
|
110
110
|
- lib/trollop.rb
|
111
|
-
- pkg/esod-client-0.
|
111
|
+
- pkg/esod-client-0.2.0.gem
|
112
112
|
has_rdoc: true
|
113
113
|
homepage: http://github.com/cohesive/esod-client
|
114
114
|
licenses: []
|
data/pkg/esod-client-0.1.0.gem
DELETED
Binary file
|