impact_radius_api 0.1.1 → 0.1.2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc5945e3c5ec69bc9d7e9e8a745cc3f65ee7ac4d
|
|
4
|
+
data.tar.gz: 31f5c2add44d3e951d4278c94b7b87082e9a4932
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b06e8babfaac7d9a24dcdc695f3f913b40b54e571353ef24e4ff1d81fb27f6dd702355bd0ac1dd26efd175ec25678597fbb048109777b3269805021ddb5a923
|
|
7
|
+
data.tar.gz: ee5a9955439d50f633eae647844217ee2e8d46437abca2a6361facc969c5c3163eb3c55027a55b19d17eefa23bb503dcdb8d4521ad496b32ac87b5a21d271b68
|
|
@@ -67,13 +67,14 @@ module ImpactRadiusAPI
|
|
|
67
67
|
private
|
|
68
68
|
|
|
69
69
|
def process(response)
|
|
70
|
+
|
|
70
71
|
case response.code
|
|
71
72
|
when 200, 201, 204
|
|
72
73
|
APIResponse.new(response, @resource)
|
|
73
74
|
when 400, 404
|
|
74
75
|
raise InvalidRequestError.new(response["ImpactRadiusResponse"]["Message"], response.code)
|
|
75
76
|
when 401
|
|
76
|
-
raise AuthenticationError.new(response
|
|
77
|
+
raise AuthenticationError.new(response.body, response.code)
|
|
77
78
|
else
|
|
78
79
|
raise Error.new(response["ImpactRadiusResponse"]["Message"], response.code)
|
|
79
80
|
end
|
|
@@ -20,7 +20,7 @@ module ImpactRadiusAPI
|
|
|
20
20
|
class_name = uri.path.match(/^\/[a-z]+\//i)[0].gsub("/","")
|
|
21
21
|
params = uri.query_values
|
|
22
22
|
params.merge!({ 'Page' => "#{page.to_i + 1}" })
|
|
23
|
-
next_page_response = ImpactRadiusAPI.const_get(class_name).new.request( uri.
|
|
23
|
+
next_page_response = ImpactRadiusAPI.const_get(class_name).new.request( "https://" + uri.authority + uri.path, params )
|
|
24
24
|
page = next_page_response.page
|
|
25
25
|
@data += next_page_response.data
|
|
26
26
|
end
|