Skip to content

Commit 097d805

Browse files
Add reso versioning (#182)
* Add RESO versioning We should be able to alter the version of the RESO Web API we are hitting. This change should allow for that using the already existing `version` configuration option. That option was initially spark-only since the RESO Web API did not exist yet. * Update CHANGELOG and VERSION * Do not use default version for RESO Web API
1 parent e4b09da commit 097d805

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v1.6.2
2+
- Add support for versioning the RESO Web API
3+
14
v1.6.1
25
- forward port of v1.5.7
36
- add addressable as a named runtime dependency (fixes regression from

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.1
1+
1.6.2

lib/spark_api/request.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ def request(method, path, body, options)
8383
request_opts.merge!(options)
8484
request_path = if middleware && middleware.to_sym == :reso_api
8585
dd_version = "Dictionary/#{dictionary_version}/" unless dictionary_version.nil?
86-
"/Reso/#{dd_version}OData#{path}"
86+
reso_version = "/Version/#{version}" unless version == SparkApi::Configuration::DEFAULT_VERSION || version.nil?
87+
"#{reso_version}/Reso/#{dd_version}OData#{path}"
8788
else
8889
"/#{version}#{path}"
8990
end

0 commit comments

Comments
 (0)