reso_api 0.5.3 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/reso_api/app/models/reso/api/client.rb +3 -2
- 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: c6328a0f138a8db17b52866e9a0bd41a95b444d88e874b0153cecd1124cc4d9a
|
4
|
+
data.tar.gz: 5f70b75248c806b56bc23026f8bd97bd21e6cd9ebc0064074a3d441ae55ce705
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b4dcfaa9e7e304b1e109139c075231cb44c65e69cb604f82d27d5a296518bccef885a4c3d4b2ceaf018759a4b7b811bef03e13d8b8ce1f27d725fd4492a80bd
|
7
|
+
data.tar.gz: f49bd22db5aeea0c1f3054d40705480f34bbba3aabd8e9f5b97ed87c51be6eacbe63a6afbe24410cf93a869e45c1d3e811c6a07808134700b76e14d6a55d89bc
|
data/README.md
CHANGED
@@ -143,6 +143,14 @@ $expand in oData is meant to join two resources together. For the Syndication AP
|
|
143
143
|
client.properties(expand: "Media")
|
144
144
|
```
|
145
145
|
|
146
|
+
#### $ignorenulls
|
147
|
+
|
148
|
+
For servers that support it, $ignorenulls omits empty keys from the response to reduce data size.
|
149
|
+
|
150
|
+
```ruby
|
151
|
+
client.properties(ignorenulls: "true")
|
152
|
+
```
|
153
|
+
|
146
154
|
#### Automatically iterate over all results
|
147
155
|
|
148
156
|
By passing a block to Media, Member, Office, and Property resource calls, subsequent paginated calls will automatically be made until the whole result set has been traversed. The block provided is executed for each returned object hash. The `batch` option can be used to return the full array of results.
|
@@ -224,6 +232,7 @@ client.properties(top: 5, orderby: "ListingKey", skiptoken: "3yd-AAABORMI-320039
|
|
224
232
|
This gem should work with any RESO Web API compliant service, but these are those that have been confirmed to work.
|
225
233
|
|
226
234
|
- [ListHub](https://www.listhub.com)
|
235
|
+
- [Constellation1](https://constellation1.com)
|
227
236
|
- [CoreLogic Trestle](https://trestle.corelogic.com)
|
228
237
|
|
229
238
|
If you use this gem to connect to another service or MLS, please submit a pull request with that service added in alphabetical order in this list.
|
@@ -61,6 +61,7 @@ module RESO
|
|
61
61
|
"$skiptoken": hash[:skiptoken],
|
62
62
|
"$expand": hash[:expand],
|
63
63
|
"$count": hash[:count].to_s.presence,
|
64
|
+
"$ignorenulls": hash[:ignorenulls],
|
64
65
|
"$debug": hash[:debug]
|
65
66
|
}.compact
|
66
67
|
if !block.nil?
|
@@ -130,7 +131,7 @@ module RESO
|
|
130
131
|
end
|
131
132
|
|
132
133
|
def fresh_oauth2_payload
|
133
|
-
@oauth2_payload = oauth2_client.client_credentials.get_token
|
134
|
+
@oauth2_payload = oauth2_client.client_credentials.get_token('client_id' => client_id, 'client_secret' => client_secret)
|
134
135
|
File.write(oauth2_token_path, @oauth2_payload.to_hash.to_json)
|
135
136
|
return @oauth2_payload
|
136
137
|
end
|
@@ -148,7 +149,7 @@ module RESO
|
|
148
149
|
persisted = File.read(oauth2_token_path)
|
149
150
|
payload = OAuth2::AccessToken.from_hash(oauth2_client, JSON.parse(persisted))
|
150
151
|
else
|
151
|
-
payload = oauth2_client.client_credentials.get_token
|
152
|
+
payload = oauth2_client.client_credentials.get_token('client_id' => client_id, 'client_secret' => client_secret)
|
152
153
|
File.write(oauth2_token_path, payload.to_hash.to_json)
|
153
154
|
end
|
154
155
|
return payload
|
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.5.
|
4
|
+
version: 0.5.6
|
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-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|