reso_api 1.8.12 → 1.8.13
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 +11 -0
- 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: 58fe7ec4d146147d271a0d45ac51c93c63a859657a2e490f13154cb2544d7c5c
|
|
4
|
+
data.tar.gz: 61e76715b6167377f8ada506a1009a0d17ba4cf7de1137ef0292182b1e64315a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7f18a11f9d0a9097c5a2283faa8143af934d9a9ddc2061573d36c29e9f5890874320923dc6a39a99e5d66e53160a17c2af8002c2a95c78b288310a39b66a9ec
|
|
7
|
+
data.tar.gz: 985cf3cb78aff919b99cb8c23668bb58a8e95e6a9b5a4f33466480894285adeab861be59315e0d1154484fffafded483a221be5dd61a1eca45142d414ee02129
|
|
@@ -9,6 +9,7 @@ module RESO
|
|
|
9
9
|
require 'tmpdir'
|
|
10
10
|
|
|
11
11
|
attr_accessor :access_token, :client_id, :client_secret, :auth_url, :base_url, :scope, :osn
|
|
12
|
+
attr_reader :last_request_url
|
|
12
13
|
|
|
13
14
|
def initialize(**opts)
|
|
14
15
|
@access_token, @client_id, @client_secret, @auth_url, @base_url, @scope, @osn = opts.values_at(:access_token, :client_id, :client_secret, :auth_url, :base_url, :scope, :osn)
|
|
@@ -239,6 +240,9 @@ module RESO
|
|
|
239
240
|
return URI::decode(uri.request_uri) if params.dig(:$debug).present?
|
|
240
241
|
end
|
|
241
242
|
|
|
243
|
+
# Store the full request URL for debugging
|
|
244
|
+
@last_request_url = uri.to_s
|
|
245
|
+
|
|
242
246
|
begin
|
|
243
247
|
req = Net::HTTP::Get.new(uri.request_uri)
|
|
244
248
|
req['Authorization'] = "Bearer #{auth_token}"
|
|
@@ -282,6 +286,13 @@ module RESO
|
|
|
282
286
|
raise
|
|
283
287
|
end
|
|
284
288
|
end
|
|
289
|
+
|
|
290
|
+
# Add metadata to response hash (if response is a hash)
|
|
291
|
+
if response.is_a?(Hash)
|
|
292
|
+
response['@reso_request_url'] = @last_request_url
|
|
293
|
+
response['@reso_auth_scope'] = scope
|
|
294
|
+
end
|
|
295
|
+
|
|
285
296
|
return response
|
|
286
297
|
end
|
|
287
298
|
|
data/lib/reso_api/version.rb
CHANGED