homeaway-api 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/homeaway/api/client.rb +2 -1
- data/lib/homeaway/api/util/oauth.rb +5 -5
- data/lib/homeaway/api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60c98fd150724b6034d387b6b480432c3ad08621
|
4
|
+
data.tar.gz: 64d307f25982cc934ad681a80250838c7c9b7487
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: febde1f040afbd5a007af84154ca249a57fdcc86a31f6babbeef0843e363902776ac5a0b2cec461d742e5a9b837cfcd15b3fb73a80e053a50f9e0fa8ae614205
|
7
|
+
data.tar.gz: b4815e63411c125c5660e3583c522c25a2b0326ce10e85220160979d4f9c1f6558e96e8826528c19b26d5da6be1736185e4b6fc8da59c07effd7d99b37cbe539
|
data/lib/homeaway/api/client.rb
CHANGED
@@ -53,6 +53,7 @@ module HomeAway
|
|
53
53
|
# @option opts [String] :client_id Your HomeAway API OAuth client id. Required here if not set globally
|
54
54
|
# @option opts [String] :client_secret Your HomeAway API OAuth client secret. Required here if not set globally
|
55
55
|
# @option opts [String] :refresh_token An existing token if you already have one saved from a previous usage of the api
|
56
|
+
# @option opts [String] :state A value that will be returned via callback
|
56
57
|
# @return [HomeAway::API::Client] a newly instantiated HomeAway API client
|
57
58
|
def initialize(opts={})
|
58
59
|
@configuration = Hashie::Mash.new(self.class.default_configuration.merge(opts))
|
@@ -210,4 +211,4 @@ module HomeAway
|
|
210
211
|
end
|
211
212
|
end
|
212
213
|
|
213
|
-
require 'homeaway/api/domain/client_includes'
|
214
|
+
require 'homeaway/api/domain/client_includes'
|
@@ -34,7 +34,7 @@ module HomeAway
|
|
34
34
|
# @return [String] a 48 characters long, securely random string, used to mitigate
|
35
35
|
# CSRF attacks during the authorization process.
|
36
36
|
def state
|
37
|
-
@_state ||= SecureRandom.hex(24)
|
37
|
+
@_state ||= @configuration.state || SecureRandom.hex(24)
|
38
38
|
end
|
39
39
|
|
40
40
|
# completes the oauth flow
|
@@ -54,7 +54,7 @@ module HomeAway
|
|
54
54
|
error_class = HomeAway::API::Errors.for_http_code e.response.status
|
55
55
|
raise error_class.new(JSON.parse(e.response.response.body))
|
56
56
|
end
|
57
|
-
raise HomeAway::API::Errors::
|
57
|
+
raise HomeAway::API::Errors::HomeAwayAPIError.new e.message
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
@@ -92,7 +92,7 @@ module HomeAway
|
|
92
92
|
error_class = HomeAway::API::Errors.for_http_code e.response.status
|
93
93
|
raise error_class.new(JSON.parse(e.response.response.body))
|
94
94
|
end
|
95
|
-
raise HomeAway::API::Errors::
|
95
|
+
raise HomeAway::API::Errors::HomeAwayAPIError.new e.message
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
@@ -113,10 +113,10 @@ module HomeAway
|
|
113
113
|
error_class = HomeAway::API::Errors.for_http_code e.response.status
|
114
114
|
raise error_class.new(JSON.parse(e.response.response.body))
|
115
115
|
end
|
116
|
-
raise HomeAway::API::Errors::
|
116
|
+
raise HomeAway::API::Errors::HomeAwayAPIError.new e.message
|
117
117
|
end
|
118
118
|
end
|
119
119
|
end
|
120
120
|
end
|
121
121
|
end
|
122
|
-
end
|
122
|
+
end
|
data/lib/homeaway/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: homeaway-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Meyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -361,7 +361,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
361
361
|
version: '0'
|
362
362
|
requirements: []
|
363
363
|
rubyforge_project:
|
364
|
-
rubygems_version: 2.
|
364
|
+
rubygems_version: 2.6.6
|
365
365
|
signing_key:
|
366
366
|
specification_version: 4
|
367
367
|
summary: Ruby SDK for interacting with the HomeAway API
|