homeflow_api 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/homeflow_api.gemspec +1 -1
- data/lib/homeflow/api/request.rb +7 -6
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.17.0
|
data/homeflow_api.gemspec
CHANGED
data/lib/homeflow/api/request.rb
CHANGED
@@ -25,7 +25,7 @@ module Homeflow
|
|
25
25
|
url = "#{Homeflow::API.config.source}/#{request_specification.resource_uri}"
|
26
26
|
end
|
27
27
|
query_params = @request_specification.to_params.merge(constant_params)
|
28
|
-
post_params = @request_specification.post_params
|
28
|
+
post_params = (@request_specification.respond_to?(:post_params) ? @request_specification.post_params : {})
|
29
29
|
if Homeflow::API.config.show_debug
|
30
30
|
puts "****************************************************************************************"
|
31
31
|
puts "HESTIA CALL"
|
@@ -39,18 +39,19 @@ module Homeflow
|
|
39
39
|
end
|
40
40
|
|
41
41
|
if request_specification.is_a? Query
|
42
|
-
return (HTTParty.get
|
42
|
+
return (HTTParty.get(url, :query => query_params)).body
|
43
43
|
elsif request_specification.is_a? ResourceIdentifier
|
44
|
-
return (HTTParty.get
|
44
|
+
return (HTTParty.get(url, :query => query_params)).body
|
45
45
|
elsif request_specification.is_a? Delete
|
46
|
-
return (HTTParty.delete(url, :query =>
|
46
|
+
return (HTTParty.delete(url, :query => query_params)).body
|
47
47
|
elsif request_specification.is_a? Put
|
48
|
-
return (HTTParty.put
|
48
|
+
return (HTTParty.put(url, :query => query_params, :body => post_params)).body
|
49
49
|
elsif request_specification.is_a? Post
|
50
|
-
return (HTTParty.
|
50
|
+
return (HTTParty.pos(url, :query => query_params, :body => post_params)).body
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
+
|
54
55
|
def constant_params
|
55
56
|
{:api_key=> Homeflow::API.config.api_key}
|
56
57
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: homeflow_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -177,7 +177,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
177
177
|
version: '0'
|
178
178
|
segments:
|
179
179
|
- 0
|
180
|
-
hash:
|
180
|
+
hash: -4205346514009264280
|
181
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
182
|
none: false
|
183
183
|
requirements:
|