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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70e496852036cd30e22ebd0cc1dcc6773b030396d4f3c100bdb797918f6dc6fd
4
- data.tar.gz: c9efc817b2ae3515d4162cde3e1ce6eb3f8c3c4ff04f3f681cb04a433056a487
3
+ metadata.gz: cec3a7afb6f4509ff07af86b56de711ac1be47590266c4fac143898d6126d816
4
+ data.tar.gz: 9bffcb828c656eb321259ea2eebcd0b59aacb6b7c499da5e22a5f50837fe7a51
5
5
  SHA512:
6
- metadata.gz: 6f7155b8af6c1d39f6a0b1e543ba7a155e9c0ad6ddd89111e992db5690af47e9ec87b76bf844ef75a37fe69eb251178d95d7f93e918f9989f00353ef89883429
7
- data.tar.gz: 33730875f530af8afecda045814e0e171dbaaa91bbddc24f2b239de6a08b53d99048ae665cb5243d63963f707f48666ae52098a3656add6b2269da4ce4e479d9
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
- query = params.present? ? URI.encode_www_form(params).gsub("+", " ") : ""
175
- uri.query && uri.query.length > 0 ? uri.query += '&' + query : uri.query = query
176
- return URI::decode(uri.request_uri) if params.dig(:$debug).present?
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
- begin
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|
@@ -1,3 +1,3 @@
1
1
  module ResoApi
2
- VERSION = "1.8.6"
2
+ VERSION = "1.8.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reso_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.6
4
+ version: 1.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Edlund