reso_api 1.8.6 → 1.8.7
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 +4 -4
- data/lib/reso_api/app/models/reso/api/client.rb +6 -7
- data/lib/reso_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cec3a7afb6f4509ff07af86b56de711ac1be47590266c4fac143898d6126d816
|
4
|
+
data.tar.gz: 9bffcb828c656eb321259ea2eebcd0b59aacb6b7c499da5e22a5f50837fe7a51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20363d580a798a53991b0c6f7f13132a9f9078cdf54e92f8bd5f50cf251f7f7b67fd9baa8d3921745b7d28bc373c2373e7829fc87377764d690e6b0d5570efbd
|
7
|
+
data.tar.gz: 51ed10865cdd78a3e27743e70e935b043b53fa5d5492ab065d2fe520c4f376ab006445694742ef3cd558221066cfac6056c19c1cb7e1d186a723873436d84af6
|
@@ -79,11 +79,9 @@ module RESO
|
|
79
79
|
}.compact
|
80
80
|
if !block.nil?
|
81
81
|
response = perform_call(endpoint, params)
|
82
|
-
|
83
82
|
if response["value"].class.eql?(Array)
|
84
83
|
hash[:batch] ? block.call(response["value"]) : response["value"].each{|hash| block.call(hash)}
|
85
84
|
end
|
86
|
-
|
87
85
|
while (next_link = response["@odata.nextLink"]).present?
|
88
86
|
response = perform_call(next_link, nil)
|
89
87
|
if response["value"].class.eql?(Array)
|
@@ -168,14 +166,15 @@ module RESO
|
|
168
166
|
|
169
167
|
def perform_call(endpoint, params, max_retries = 5, debug = false)
|
170
168
|
uri = uri_for_endpoint(endpoint)
|
171
|
-
params = params.presence || {}
|
172
169
|
retries = 0
|
173
170
|
|
174
|
-
|
175
|
-
|
176
|
-
|
171
|
+
if params.present?
|
172
|
+
query = params.present? ? URI.encode_www_form(params).gsub("+", " ") : ""
|
173
|
+
uri.query && uri.query.length > 0 ? uri.query += '&' + query : uri.query = query
|
174
|
+
return URI::decode(uri.request_uri) if params.dig(:$debug).present?
|
175
|
+
end
|
177
176
|
|
178
|
-
|
177
|
+
begin
|
179
178
|
req = Net::HTTP::Get.new(uri.request_uri)
|
180
179
|
req['Authorization'] = "Bearer #{auth_token}"
|
181
180
|
res = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
|
data/lib/reso_api/version.rb
CHANGED