reso_api 0.4.9 → 0.5.0
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 +14 -4
- data/lib/reso_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9c500fe2a36c880879b75b0d1f4784adee06e84efadaaf815659945c69d92110
|
|
4
|
+
data.tar.gz: 6cc7a76f597ca6533a1e9ab46f23047b89b1e2b85d11abfb6aa236271791a859
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea3db268bf30fda781e07616489b8295f43473103a291b8cd0d8da76586968810f10beaa9ed185f7772de9b5f0f879672c5ce33e98465c1560e1a689988eb85b
|
|
7
|
+
data.tar.gz: fdcdee6fb6c92f2f71f27510a654ed7938166b876cd610c3f09c168f8572c87861250eb6c243e8a2d3b6341cfe37ce64a620b56d726cd4b41d0707cc01e4004e
|
|
@@ -51,6 +51,7 @@ module RESO
|
|
|
51
51
|
hash = args.first.is_a?(Hash) ? args.first : {}
|
|
52
52
|
endpoint = FILTERABLE_ENDPOINTS[method_name]
|
|
53
53
|
response = {}
|
|
54
|
+
threads = []
|
|
54
55
|
params = {
|
|
55
56
|
"$select": hash[:select],
|
|
56
57
|
"$filter": hash[:filter],
|
|
@@ -66,16 +67,25 @@ module RESO
|
|
|
66
67
|
response = perform_call(endpoint, params)
|
|
67
68
|
|
|
68
69
|
if response["value"].class.eql?(Array)
|
|
69
|
-
|
|
70
|
+
threads << Thread.new do
|
|
71
|
+
hash[:batch] ? block.call(response["value"]) : response["value"].each{|hash| block.call(hash)}
|
|
72
|
+
end
|
|
70
73
|
end
|
|
71
74
|
|
|
72
75
|
while (next_link = response["@odata.nextLink"]).present?
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
threads << Thread.new do
|
|
77
|
+
response = perform_call(next_link, nil)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
threads.each(&:join)
|
|
81
|
+
|
|
75
82
|
if response["value"].class.eql?(Array)
|
|
76
|
-
|
|
83
|
+
threads << Thread.new do
|
|
84
|
+
hash[:batch] ? block.call(response["value"]) : response["value"].each{|hash| block.call(hash)}
|
|
85
|
+
end
|
|
77
86
|
end
|
|
78
87
|
end
|
|
88
|
+
threads.each(&:join)
|
|
79
89
|
else
|
|
80
90
|
return perform_call(endpoint, params)
|
|
81
91
|
end
|
data/lib/reso_api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: reso_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Edlund
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-06-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|