simplyrets 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -3
- data/Makefile +1 -2
- data/README.org +2 -0
- data/lib/simplyrets.rb +12 -1
- data/lib/simplyrets/api/default_api.rb +132 -128
- data/lib/simplyrets/api_client.rb +48 -9
- data/lib/simplyrets/api_client.rb.orig +373 -0
- data/lib/simplyrets/api_error.rb +12 -1
- data/lib/simplyrets/configuration.rb +23 -0
- data/lib/simplyrets/models/agent.rb +61 -27
- data/lib/simplyrets/models/broker.rb +57 -20
- data/lib/simplyrets/models/contact_information.rb +62 -27
- data/lib/simplyrets/models/error.rb +59 -23
- data/lib/simplyrets/models/geographic_data.rb +61 -28
- data/lib/simplyrets/models/listing.rb +94 -70
- data/lib/simplyrets/models/mls_information.rb +95 -37
- data/lib/simplyrets/models/office.rb +62 -28
- data/lib/simplyrets/models/open_house.rb +66 -36
- data/lib/simplyrets/models/parking.rb +59 -24
- data/lib/simplyrets/models/property.rb +128 -136
- data/lib/simplyrets/models/sales.rb +61 -28
- data/lib/simplyrets/models/school.rb +60 -34
- data/lib/simplyrets/models/street_address.rb +66 -55
- data/lib/simplyrets/models/tax.rb +70 -35
- data/lib/simplyrets/version.rb +13 -2
- data/ruby-client.meta +1 -0
- data/ruby-client.zip +0 -0
- data/ruby-client/.gitignore +50 -0
- data/ruby-client/.rspec +2 -0
- data/ruby-client/.swagger-codegen-ignore +23 -0
- data/ruby-client/LICENSE +201 -0
- data/ruby-client/README.md +128 -0
- data/ruby-client/docs/Agent.md +11 -0
- data/ruby-client/docs/Broker.md +8 -0
- data/ruby-client/docs/ContactInformation.md +10 -0
- data/ruby-client/docs/DefaultApi.md +306 -0
- data/ruby-client/docs/Error.md +9 -0
- data/ruby-client/docs/GeographicData.md +12 -0
- data/ruby-client/docs/Listing.md +30 -0
- data/ruby-client/docs/MlsInformation.md +11 -0
- data/ruby-client/docs/Office.md +11 -0
- data/ruby-client/docs/OpenHouse.md +15 -0
- data/ruby-client/docs/Parking.md +10 -0
- data/ruby-client/docs/Property.md +43 -0
- data/ruby-client/docs/Sales.md +12 -0
- data/ruby-client/docs/School.md +11 -0
- data/ruby-client/docs/StreetAddress.md +16 -0
- data/ruby-client/docs/Tax.md +10 -0
- data/ruby-client/git_push.sh +67 -0
- data/ruby-client/lib/swagger_client.rb +66 -0
- data/ruby-client/lib/swagger_client/api/default_api.rb +383 -0
- data/ruby-client/lib/swagger_client/api_client.rb +373 -0
- data/ruby-client/lib/swagger_client/api_error.rb +47 -0
- data/ruby-client/lib/swagger_client/configuration.rb +193 -0
- data/ruby-client/lib/swagger_client/models/agent.rb +230 -0
- data/ruby-client/lib/swagger_client/models/broker.rb +200 -0
- data/ruby-client/lib/swagger_client/models/contact_information.rb +220 -0
- data/ruby-client/lib/swagger_client/models/error.rb +210 -0
- data/ruby-client/lib/swagger_client/models/geographic_data.rb +240 -0
- data/ruby-client/lib/swagger_client/models/listing.rb +422 -0
- data/ruby-client/lib/swagger_client/models/mls_information.rb +263 -0
- data/ruby-client/lib/swagger_client/models/office.rb +230 -0
- data/ruby-client/lib/swagger_client/models/open_house.rb +270 -0
- data/ruby-client/lib/swagger_client/models/parking.rb +219 -0
- data/ruby-client/lib/swagger_client/models/property.rb +574 -0
- data/ruby-client/lib/swagger_client/models/sales.rb +240 -0
- data/ruby-client/lib/swagger_client/models/school.rb +230 -0
- data/ruby-client/lib/swagger_client/models/street_address.rb +280 -0
- data/ruby-client/lib/swagger_client/models/tax.rb +220 -0
- data/ruby-client/lib/swagger_client/version.rb +26 -0
- data/ruby-client/spec/api/default_api_spec.rb +132 -0
- data/ruby-client/spec/api_client_spec.rb +296 -0
- data/ruby-client/spec/configuration_spec.rb +48 -0
- data/ruby-client/spec/models/agent_spec.rb +71 -0
- data/ruby-client/spec/models/broker_spec.rb +53 -0
- data/ruby-client/spec/models/contact_information_spec.rb +65 -0
- data/ruby-client/spec/models/error_spec.rb +59 -0
- data/ruby-client/spec/models/geographic_data_spec.rb +77 -0
- data/ruby-client/spec/models/listing_spec.rb +185 -0
- data/ruby-client/spec/models/mls_information_spec.rb +74 -0
- data/ruby-client/spec/models/office_spec.rb +71 -0
- data/ruby-client/spec/models/open_house_spec.rb +95 -0
- data/ruby-client/spec/models/parking_spec.rb +65 -0
- data/ruby-client/spec/models/property_spec.rb +266 -0
- data/ruby-client/spec/models/sales_spec.rb +77 -0
- data/ruby-client/spec/models/school_spec.rb +71 -0
- data/ruby-client/spec/models/street_address_spec.rb +101 -0
- data/ruby-client/spec/models/tax_spec.rb +65 -0
- data/ruby-client/spec/spec_helper.rb +122 -0
- data/ruby-client/swagger_client.gemspec +55 -0
- data/simplyrets.gemspec +1 -1
- metadata +71 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: daddd872aedfcf72e1a948aea8e15152146f7c94
|
4
|
+
data.tar.gz: d0f6883ce32b1c4c89069af35707146013146aca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25590b3404309a26beb32010d9f54684af1993e18a7a10e75c3249d3b5f195ee33e35fadd8f7650169d4829d25f37b359580d777edf7488ed329c6e2fc08f834
|
7
|
+
data.tar.gz: 361d7d9940d60f7300204f0134e21d6cabce53fcb8e66aa3720710984a467a6d3e9fdc2dd8512f7bea01d544c3880383b1d1dc0422af97fb8d2f2b34ff36f5cf
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simplyrets (2.0.
|
5
|
-
json (~> 1.8, >= 1.8
|
4
|
+
simplyrets (2.0.1)
|
5
|
+
json (~> 1.8, >= 1.8)
|
6
6
|
typhoeus (~> 0.8, >= 0.8)
|
7
7
|
|
8
8
|
GEM
|
@@ -23,7 +23,7 @@ GEM
|
|
23
23
|
ffi (>= 1.3.0)
|
24
24
|
ffi (1.9.10)
|
25
25
|
hashdiff (0.3.0)
|
26
|
-
json (1.8.
|
26
|
+
json (1.8.1)
|
27
27
|
rspec (3.4.0)
|
28
28
|
rspec-core (~> 3.4.0)
|
29
29
|
rspec-expectations (~> 3.4.0)
|
@@ -60,3 +60,6 @@ DEPENDENCIES
|
|
60
60
|
simplyrets!
|
61
61
|
vcr (~> 2.9, >= 2.9.3)
|
62
62
|
webmock (~> 1.6, >= 1.6.2)
|
63
|
+
|
64
|
+
BUNDLED WITH
|
65
|
+
1.12.2
|
data/Makefile
CHANGED
data/README.org
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
#+AUTHOR: SimplyRETS, Christopher Reichert, Cody Reichert
|
2
2
|
#+TITLE: SimplyRETS Ruby SDK (Beta)
|
3
3
|
|
4
|
+
*Deprecation Notice: This SDK is deprecated and will not receive any future updates. The recommended workflow is to use the [[https://docs.simplyrets.com/api/index.html][API]] directly, or generate an SDK for your use-case from the [[https://docs.simplyrets.com/api/resources.json][Swagger Spec]]*
|
5
|
+
|
4
6
|
The official Ruby SDK for the [[https://simplyrets.com][SimplyRETS]] Listings API.
|
5
7
|
|
6
8
|
SimplyRETS provides a modern and simple interface for building robust
|
data/lib/simplyrets.rb
CHANGED
@@ -1,12 +1,23 @@
|
|
1
1
|
=begin
|
2
2
|
SimplyRETS API
|
3
3
|
|
4
|
-
The SimplyRETS API is an exciting step towards making it easier for
|
4
|
+
The SimplyRETS API is an exciting step towards making it easier for developers and real estate agents to build something awesome with real estate data! The documentation below makes live requests to our API using the trial data. To get set up with the API using live MLS data, you must have RETS credentials from your MLS, which you can then use to create an app with SimplyRETS. For more information on that process, please see our [FAQ](https://simplyrets.com/faq), [Getting Started](https://simplyrets.com/blog/getting-set-up.html) page, or [contact us](https://simplyrets.com/\\#home-contact). Below you'll find the API endpoints, query parameters, response bodies, and other information about using the SimplyRETS API. You can run queries by clicking the 'Try it Out' button at the bottom of each section. ### Authentication The SimplyRETS API uses Basic Authentication. When you create an app, you'll get a set of API credentials to access your listings. If you're trying out the test data, you can use `simplyrets:simplyrets` for connecting to the API. ### Media Types The SimplyRETS API uses the `Accept` header to allow clients to control media types (content versions). We maintain backwards compatibility with API clients by allowing them to specify a content version. We highly recommend setting and explicity media type when your application reaches production. Both the structure and content of our API response bodies is subject to change so we can add new features while respecting the stability of applications which have already been developed. To always use the latest SimplyRETS content version, simply use `application/json` in your application `Accept` header. If you want to pin your clients media type to a specific version, you can use the vendor-specific SimplyRETS media type, e.g. `application/vnd.simplyrets-v0.1+json\"` To view all valid content-types for making an `OPTIONS`, make a request to the SimplyRETS api root `curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/` The default media types used in our API responses may change in the future. If you're building an application and care about the stability of the API, be sure to request a specific media type in the Accept header as shown in the examples below. The wordpress plugin automatically sets the `Accept` header for the compatible SimplyRETS media types. ### Pagination There a few pieces of useful information about each request stored in the HTTP Headers: - `X-Total-Count` shows you the total amount of listings that match your current query. - `Link` contains pre-built pagination links for accessing the next 'page' of listings that match your query. Read more about that [here](https://simplyrets.com/blog/api-pagination.html).
|
5
5
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
10
21
|
|
11
22
|
=end
|
12
23
|
|
@@ -1,12 +1,23 @@
|
|
1
1
|
=begin
|
2
2
|
SimplyRETS API
|
3
3
|
|
4
|
-
The SimplyRETS API is an exciting step towards making it easier for
|
4
|
+
The SimplyRETS API is an exciting step towards making it easier for developers and real estate agents to build something awesome with real estate data! The documentation below makes live requests to our API using the trial data. To get set up with the API using live MLS data, you must have RETS credentials from your MLS, which you can then use to create an app with SimplyRETS. For more information on that process, please see our [FAQ](https://simplyrets.com/faq), [Getting Started](https://simplyrets.com/blog/getting-set-up.html) page, or [contact us](https://simplyrets.com/\\#home-contact). Below you'll find the API endpoints, query parameters, response bodies, and other information about using the SimplyRETS API. You can run queries by clicking the 'Try it Out' button at the bottom of each section. ### Authentication The SimplyRETS API uses Basic Authentication. When you create an app, you'll get a set of API credentials to access your listings. If you're trying out the test data, you can use `simplyrets:simplyrets` for connecting to the API. ### Media Types The SimplyRETS API uses the `Accept` header to allow clients to control media types (content versions). We maintain backwards compatibility with API clients by allowing them to specify a content version. We highly recommend setting and explicity media type when your application reaches production. Both the structure and content of our API response bodies is subject to change so we can add new features while respecting the stability of applications which have already been developed. To always use the latest SimplyRETS content version, simply use `application/json` in your application `Accept` header. If you want to pin your clients media type to a specific version, you can use the vendor-specific SimplyRETS media type, e.g. `application/vnd.simplyrets-v0.1+json\"` To view all valid content-types for making an `OPTIONS`, make a request to the SimplyRETS api root `curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/` The default media types used in our API responses may change in the future. If you're building an application and care about the stability of the API, be sure to request a specific media type in the Accept header as shown in the examples below. The wordpress plugin automatically sets the `Accept` header for the compatible SimplyRETS media types. ### Pagination There a few pieces of useful information about each request stored in the HTTP Headers: - `X-Total-Count` shows you the total amount of listings that match your current query. - `Link` contains pre-built pagination links for accessing the next 'page' of listings that match your query. Read more about that [here](https://simplyrets.com/blog/api-pagination.html).
|
5
5
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
10
21
|
|
11
22
|
=end
|
12
23
|
|
@@ -21,51 +32,50 @@ module SimplyRetsClient
|
|
21
32
|
end
|
22
33
|
|
23
34
|
# The SimplyRETS OpenHouses API
|
24
|
-
# This is the main endpoint for accessing openhouses
|
35
|
+
# This is the main endpoint for accessing openhouses.
|
25
36
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @option opts [String] :type Request listings by a specific property type. This
|
27
|
-
# @option opts [String] :listing_id Request openhouses for a specific
|
28
|
-
# @option opts [Array<String>] :cities Filter the openhouses returned by a list of valid cities. A
|
29
|
-
# @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID
|
30
|
-
# @option opts [String] :agent Filter the listings returned by an agent ID. Note, the
|
31
|
-
# @option opts [Integer] :minprice Filter listings by a minimum price
|
37
|
+
# @option opts [String] :type Request listings by a specific property type. This defaults to Residential, and you can only specify one type in a single query.
|
38
|
+
# @option opts [String] :listing_id Request openhouses for a specific `listingId`.
|
39
|
+
# @option opts [Array<String>] :cities Filter the openhouses returned by a list of valid cities. A list of valid cities can be found by making an OPTIONS request to the `/openhouses` endpoint.
|
40
|
+
# @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID. You can specific multiple broker parameters. Note, the Broker ID is provided by your MLS.
|
41
|
+
# @option opts [String] :agent Filter the listings returned by an agent ID. Note, the Agent ID is provided by your MLS.
|
42
|
+
# @option opts [Integer] :minprice Filter listings by a minimum price.
|
32
43
|
# @option opts [DateTime] :startdate Scheduled date and time of the open house showing
|
33
|
-
# @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter
|
34
|
-
# @option opts [Integer] :limit Set the number of listings to return in the response
|
35
|
-
# @option opts [String] :sort Sort the response by a specific field. Values starting
|
44
|
+
# @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter by the limit to go to the next \"page\" of listings. Also take a look at the Link HTTP Header for pre-built pagination.
|
45
|
+
# @option opts [Integer] :limit Set the number of listings to return in the response. This defaults to 20 listings, and can be a maximum of 50. To paginate through to the next page of listings, take a look at the `offset` parameter, or the Link in the HTTP Header.
|
46
|
+
# @option opts [String] :sort Sort the response by a specific field. Values starting with a minus (-) denote descending order, while the others are ascending.
|
47
|
+
# @option opts [Array<String>] :include Include a extra fields which are not in the default response body - 'association' includes additional HOA data - 'agreement' information on the listing agreement - 'garageSpaces' additional garage data - 'maintenanceExpense' data on maintenance expenses - 'parking' additional parking data - 'pool' includes an additional pool description - 'taxAnnualAmount' include the annual tax amount - 'taxYear' include the tax year data - 'rooms' include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available in the API response. In the future, fields which require an 'include' may become available by default.
|
36
48
|
# @return [Array<OpenHouse>]
|
37
49
|
def openhouses_get(opts = {})
|
38
|
-
data,
|
50
|
+
data, _status_code, _headers = openhouses_get_with_http_info(opts)
|
39
51
|
return data
|
40
52
|
end
|
41
53
|
|
42
54
|
# The SimplyRETS OpenHouses API
|
43
|
-
# This is the main endpoint for accessing openhouses
|
55
|
+
# This is the main endpoint for accessing openhouses.
|
44
56
|
# @param [Hash] opts the optional parameters
|
45
|
-
# @option opts [String] :type Request listings by a specific property type. This
|
46
|
-
# @option opts [String] :listing_id Request openhouses for a specific
|
47
|
-
# @option opts [Array<String>] :cities Filter the openhouses returned by a list of valid cities. A
|
48
|
-
# @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID
|
49
|
-
# @option opts [String] :agent Filter the listings returned by an agent ID. Note, the
|
50
|
-
# @option opts [Integer] :minprice Filter listings by a minimum price
|
57
|
+
# @option opts [String] :type Request listings by a specific property type. This defaults to Residential, and you can only specify one type in a single query.
|
58
|
+
# @option opts [String] :listing_id Request openhouses for a specific `listingId`.
|
59
|
+
# @option opts [Array<String>] :cities Filter the openhouses returned by a list of valid cities. A list of valid cities can be found by making an OPTIONS request to the `/openhouses` endpoint.
|
60
|
+
# @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID. You can specific multiple broker parameters. Note, the Broker ID is provided by your MLS.
|
61
|
+
# @option opts [String] :agent Filter the listings returned by an agent ID. Note, the Agent ID is provided by your MLS.
|
62
|
+
# @option opts [Integer] :minprice Filter listings by a minimum price.
|
51
63
|
# @option opts [DateTime] :startdate Scheduled date and time of the open house showing
|
52
|
-
# @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter
|
53
|
-
# @option opts [Integer] :limit Set the number of listings to return in the response
|
54
|
-
# @option opts [String] :sort Sort the response by a specific field. Values starting
|
64
|
+
# @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter by the limit to go to the next \"page\" of listings. Also take a look at the Link HTTP Header for pre-built pagination.
|
65
|
+
# @option opts [Integer] :limit Set the number of listings to return in the response. This defaults to 20 listings, and can be a maximum of 50. To paginate through to the next page of listings, take a look at the `offset` parameter, or the Link in the HTTP Header.
|
66
|
+
# @option opts [String] :sort Sort the response by a specific field. Values starting with a minus (-) denote descending order, while the others are ascending.
|
67
|
+
# @option opts [Array<String>] :include Include a extra fields which are not in the default response body - 'association' includes additional HOA data - 'agreement' information on the listing agreement - 'garageSpaces' additional garage data - 'maintenanceExpense' data on maintenance expenses - 'parking' additional parking data - 'pool' includes an additional pool description - 'taxAnnualAmount' include the annual tax amount - 'taxYear' include the tax year data - 'rooms' include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available in the API response. In the future, fields which require an 'include' may become available by default.
|
55
68
|
# @return [Array<(Array<OpenHouse>, Fixnum, Hash)>] Array<OpenHouse> data, response status code and response headers
|
56
69
|
def openhouses_get_with_http_info(opts = {})
|
57
70
|
if @api_client.config.debugging
|
58
|
-
@api_client.config.logger.debug "Calling API: DefaultApi
|
71
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.openhouses_get ..."
|
59
72
|
end
|
60
|
-
|
61
73
|
if opts[:'type'] && !['Residential', 'Rental', 'Multifamily', 'Condominium', 'Commercial', 'Land'].include?(opts[:'type'])
|
62
|
-
fail 'invalid value for "type", must be one of Residential, Rental, Multifamily, Condominium, Commercial, Land'
|
74
|
+
fail ArgumentError, 'invalid value for "type", must be one of Residential, Rental, Multifamily, Condominium, Commercial, Land'
|
63
75
|
end
|
64
|
-
|
65
76
|
if opts[:'sort'] && !['listprice', '-listprice', 'listdate', '-listdate', 'beds', '-beds', 'baths', '-baths'].include?(opts[:'sort'])
|
66
|
-
fail 'invalid value for "sort", must be one of listprice, -listprice, listdate, -listdate, beds, -beds, baths, -baths'
|
77
|
+
fail ArgumentError, 'invalid value for "sort", must be one of listprice, -listprice, listdate, -listdate, beds, -beds, baths, -baths'
|
67
78
|
end
|
68
|
-
|
69
79
|
# resource path
|
70
80
|
local_var_path = "/openhouses".sub('{format}','json')
|
71
81
|
|
@@ -81,24 +91,24 @@ module SimplyRetsClient
|
|
81
91
|
query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
|
82
92
|
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
83
93
|
query_params[:'sort'] = opts[:'sort'] if opts[:'sort']
|
94
|
+
query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if opts[:'include']
|
84
95
|
|
85
96
|
# header parameters
|
86
97
|
header_params = {}
|
87
98
|
|
88
99
|
# HTTP header 'Accept' (if needed)
|
89
|
-
|
90
|
-
|
100
|
+
local_header_accept = ['application/json', 'application/vnd.simplyrets-v0.1+json']
|
101
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
91
102
|
|
92
103
|
# HTTP header 'Content-Type'
|
93
|
-
|
94
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
104
|
+
local_header_content_type = ['application/json']
|
105
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
95
106
|
|
96
107
|
# form parameters
|
97
108
|
form_params = {}
|
98
109
|
|
99
110
|
# http body (model)
|
100
111
|
post_body = nil
|
101
|
-
|
102
112
|
auth_names = ['basicAuth']
|
103
113
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
104
114
|
:header_params => header_params,
|
@@ -114,52 +124,52 @@ module SimplyRetsClient
|
|
114
124
|
end
|
115
125
|
|
116
126
|
# Single OpenHouse Endpoint
|
117
|
-
# Use this endpoint for accessing a single OpenHouse
|
127
|
+
# Use this endpoint for accessing a single OpenHouse.
|
118
128
|
# @param open_house_key A unique OpenHouse identification key
|
119
129
|
# @param [Hash] opts the optional parameters
|
130
|
+
# @option opts [Array<String>] :include Include a extra fields which are not in the default response body - 'association' includes additional HOA data - 'agreement' information on the listing agreement - 'garageSpaces' additional garage data - 'maintenanceExpense' data on maintenance expenses - 'parking' additional parking data - 'pool' includes an additional pool description - 'taxAnnualAmount' include the annual tax amount - 'taxYear' include the tax year data - 'rooms' include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available in the API response. In the future, fields which require an 'include' may become available by default.
|
120
131
|
# @return [OpenHouse]
|
121
132
|
def openhouses_open_house_key_get(open_house_key, opts = {})
|
122
|
-
data,
|
133
|
+
data, _status_code, _headers = openhouses_open_house_key_get_with_http_info(open_house_key, opts)
|
123
134
|
return data
|
124
135
|
end
|
125
136
|
|
126
137
|
# Single OpenHouse Endpoint
|
127
|
-
# Use this endpoint for accessing a single OpenHouse
|
138
|
+
# Use this endpoint for accessing a single OpenHouse.
|
128
139
|
# @param open_house_key A unique OpenHouse identification key
|
129
140
|
# @param [Hash] opts the optional parameters
|
141
|
+
# @option opts [Array<String>] :include Include a extra fields which are not in the default response body - 'association' includes additional HOA data - 'agreement' information on the listing agreement - 'garageSpaces' additional garage data - 'maintenanceExpense' data on maintenance expenses - 'parking' additional parking data - 'pool' includes an additional pool description - 'taxAnnualAmount' include the annual tax amount - 'taxYear' include the tax year data - 'rooms' include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available in the API response. In the future, fields which require an 'include' may become available by default.
|
130
142
|
# @return [Array<(OpenHouse, Fixnum, Hash)>] OpenHouse data, response status code and response headers
|
131
143
|
def openhouses_open_house_key_get_with_http_info(open_house_key, opts = {})
|
132
144
|
if @api_client.config.debugging
|
133
|
-
@api_client.config.logger.debug "Calling API: DefaultApi
|
145
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.openhouses_open_house_key_get ..."
|
134
146
|
end
|
135
|
-
|
136
147
|
# verify the required parameter 'open_house_key' is set
|
137
|
-
fail "Missing the required parameter 'open_house_key' when calling openhouses_open_house_key_get" if open_house_key.nil?
|
138
|
-
|
148
|
+
fail ArgumentError, "Missing the required parameter 'open_house_key' when calling DefaultApi.openhouses_open_house_key_get" if open_house_key.nil?
|
139
149
|
# resource path
|
140
150
|
local_var_path = "/openhouses/{openHouseKey}".sub('{format}','json').sub('{' + 'openHouseKey' + '}', open_house_key.to_s)
|
141
151
|
|
142
152
|
# query parameters
|
143
153
|
query_params = {}
|
154
|
+
query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if opts[:'include']
|
144
155
|
|
145
156
|
# header parameters
|
146
157
|
header_params = {}
|
147
158
|
|
148
159
|
# HTTP header 'Accept' (if needed)
|
149
|
-
|
150
|
-
|
160
|
+
local_header_accept = ['application/json', 'application/vnd.simplyrets-v0.1+json']
|
161
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
151
162
|
|
152
163
|
# HTTP header 'Content-Type'
|
153
|
-
|
154
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
164
|
+
local_header_content_type = ['application/json']
|
165
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
155
166
|
|
156
167
|
# form parameters
|
157
168
|
form_params = {}
|
158
169
|
|
159
170
|
# http body (model)
|
160
171
|
post_body = nil
|
161
|
-
|
162
|
-
auth_names = ['basicAuth']
|
172
|
+
auth_names = ['basicAuth']
|
163
173
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
164
174
|
:header_params => header_params,
|
165
175
|
:query_params => query_params,
|
@@ -174,81 +184,79 @@ module SimplyRetsClient
|
|
174
184
|
end
|
175
185
|
|
176
186
|
# The SimplyRETS Listings API
|
177
|
-
# This is the main endpoint for accessing your properties. View
|
187
|
+
# This is the main endpoint for accessing your properties. View all of the available query parameters and make requests below! The API uses Basic Authentication, which most HTTP libraries will handle for you. To use the test data (which is what this pages uses), you can use the api key `simplyrets` and secret `simplyrets`. Note that these test listings are not live MLS listings but the data, query parameters, and response bodies will all work the same.
|
178
188
|
# @param [Hash] opts the optional parameters
|
179
|
-
# @option opts [String] :q A textual keyword search. This parameter will search the following
|
180
|
-
# @option opts [Array<String>] :status Request listings by a specific status. This parameter
|
181
|
-
# @option opts [Array<String>] :type Request listings by a specific property type. This
|
182
|
-
# @option opts [String] :agent Filter the listings returned by an agent ID. Note, the
|
183
|
-
# @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker
|
184
|
-
# @option opts [Integer] :minprice Filter listings by a minimum price
|
185
|
-
# @option opts [Integer] :maxprice Filter listings by a maximum price
|
186
|
-
# @option opts [Integer] :minarea Filter listings by a minimum area size in Sq Ft
|
187
|
-
# @option opts [Integer] :maxarea Filter listings by a maximum area size in Sq Ft
|
188
|
-
# @option opts [Integer] :minbaths Filter listings by a minimum number of bathrooms
|
189
|
-
# @option opts [Integer] :maxbaths Filter listings by a maximum number of bathrooms
|
190
|
-
# @option opts [Integer] :minbeds Filter listings by a minimum number of bedrooms
|
191
|
-
# @option opts [Integer] :maxbeds Filter listings by a maximum number of bedrooms
|
192
|
-
# @option opts [Integer] :maxdom Filter listings by a maximum number of days on market
|
193
|
-
# @option opts [Integer] :minyear Filter listings by a setting a minimum year built
|
194
|
-
# @option opts [Integer] :limit Set the number of listings to return in the response
|
195
|
-
# @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset
|
196
|
-
# @option opts [String] :vendor Used to specify the vendor (MLS) to search from. This
|
197
|
-
# @option opts [Array<String>] :postal_codes Filter the listings returned by postal codes / zip
|
198
|
-
# @option opts [Array<String>] :features Filter the listings by specific interior features. You
|
199
|
-
# @option opts [String] :water Query water/waterfront listings only. Specify
|
200
|
-
# @option opts [Array<String>] :neighborhoods Filter the listings returned by specific neighborhoods and
|
201
|
-
# @option opts [Array<String>] :cities Filter the listings returned by specific cities. You can
|
202
|
-
# @option opts [Array<String>] :counties Filter the listings returned by specific counties. You can
|
203
|
-
# @option opts [Array<String>] :points Return listings that are within a set of latitude
|
204
|
-
# @option opts [Array<String>] :include Include a extra fields which are not in the default
|
205
|
-
# @option opts [String] :sort Sort the response by a specific field. Values starting
|
189
|
+
# @option opts [String] :q A textual keyword search. This parameter will search the following fields, when available: - listingId (This does _not_ search the `mlsId` field in the SimplyRETS response body) - street number - street name - mls area (major) - city - subdivision name - postal code
|
190
|
+
# @option opts [Array<String>] :status Request listings by a specific status. This parameter defaults to active and you can specify multiple statuses in a single query. Listing statuses depend on your MLS's availability. Below is a brief description of each status with possible synonyms which may map to your MLS-specific statuses - *Active*: Active Listing which is still on the market - *ActiveUnderContract*: An offer has been accepted but the listing is still on market. Synonyms: Accepting Backup Offers, Backup Offer, Active With Accepted. Synonyms: Offer, Backup, Contingent - *Pending*: An offer has been accepted and the listing is no longer on market. Synonyms: Offer Accepted, Under Contract - *Hold*: The listing has been withdrawn from the market, but a contract still exists between the seller and the listing member. Synonyms: Hold, Hold Do Not Show, Temp Off Market - *Withdrawn*: The listing has been withdrawn from the market, but a contract still exists between the seller and the listing member. Synonyms: Hold, Hold Do Not Show, Temp Off Market - *Closed*: The purchase agreement has been fulfilled or the lease agreement has been executed. Synonyms: Sold, Leased, Rented, Closed Sale - *Expired*: The listing contract has expired - *Delete*: The listing contract was never valid or other reason for the contract to be nullified. Synonyms: Kill, Zap - *Incomplete*: The listing has not yet be completely entered and is not yet published in the MLS. Synonyms: Draft, Partially Complted - *ComingSoon*
|
191
|
+
# @option opts [Array<String>] :type Request listings by a specific property type. This defaults to Residential and Rental. You can specify multiple property types in a single query.
|
192
|
+
# @option opts [String] :agent Filter the listings returned by an agent ID. Note, the Agent ID is provided by your MLS. The co-listing agent is not included in this query parameter.
|
193
|
+
# @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID. For some MLS areas, this is the ListOfficeId (Listing Office ID). You can specific multiple broker parameters. Note, this query parameter is only available if a Broker ID is provided by your MLS.
|
194
|
+
# @option opts [Integer] :minprice Filter listings by a minimum price.
|
195
|
+
# @option opts [Integer] :maxprice Filter listings by a maximum price
|
196
|
+
# @option opts [Integer] :minarea Filter listings by a minimum area size in Sq Ft.
|
197
|
+
# @option opts [Integer] :maxarea Filter listings by a maximum area size in Sq Ft.
|
198
|
+
# @option opts [Integer] :minbaths Filter listings by a minimum number of bathrooms.
|
199
|
+
# @option opts [Integer] :maxbaths Filter listings by a maximum number of bathrooms.
|
200
|
+
# @option opts [Integer] :minbeds Filter listings by a minimum number of bedrooms.
|
201
|
+
# @option opts [Integer] :maxbeds Filter listings by a maximum number of bedrooms.
|
202
|
+
# @option opts [Integer] :maxdom Filter listings by a maximum number of days on market. _Note that your MLS must provide Days on Market data._
|
203
|
+
# @option opts [Integer] :minyear Filter listings by a setting a minimum year built.
|
204
|
+
# @option opts [Integer] :limit Set the number of listings to return in the response. This defaults to 20 listings, and can be a maximum of 50. To paginate through to the next page of listings, take a look at the `offset` parameter, or the Link in the HTTP Header.
|
205
|
+
# @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter by the limit to go to the next \"page\" of listings. Also take a look at the Link HTTP Header for pre-built pagination. *NOTE:* If you're offset is too high, you will receive an `HTTP 400 offset too high` error message.
|
206
|
+
# @option opts [String] :vendor Used to specify the vendor (MLS) to search from. This parameter is required on multi-MLS apps, and you can only query one vendor at a time. To get your vendor id's make an OPTIONS request to https://api.simplyrets.com.
|
207
|
+
# @option opts [Array<String>] :postal_codes Filter the listings returned by postal codes / zip code. You can specify multiple.
|
208
|
+
# @option opts [Array<String>] :features Filter the listings by specific interior features. You can filter by multiple. For example, to filter trial listings by multiple features you can use, Return listings that are within a set of latitude longitude coordinates. For example, ``` Wet Bar High Ceiling ``` e.g. `https://simplyrets.com/services?features=Wet%20Bar&features=High%20Ceiling` The features provided by your MLS can be seen in your OPTIONS request. To view all valid features, make a request to the SimplyRETS api root `curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/`
|
209
|
+
# @option opts [String] :water Query water/waterfront listings only. Specify `true` to filter waterfront listings.
|
210
|
+
# @option opts [Array<String>] :neighborhoods Filter the listings returned by specific neighborhoods and subdivisions. You can specify multiple.
|
211
|
+
# @option opts [Array<String>] :cities Filter the listings returned by specific cities. You can specify multiple.
|
212
|
+
# @option opts [Array<String>] :counties Filter the listings returned by specific counties. You can specify multiple.
|
213
|
+
# @option opts [Array<String>] :points Return listings that are within a set of latitude longitude coordinates. For example; ``` 29.723837,-95.69778 29.938275,-95.69778 29.938275,-95.32974 29.723837,-95.32974 ``` Note that some MLS's do not provide latitude and longitude for their listings, which is required for this parameter to work. In these cases, SimplyRETS offers a [Geocoding Addon](https://simplyrets.com/services#geocoding). Check out our [blog post](https://simplyrets.com/blog/interactive-map-search.html) on using the `points` parameter to build a map-based app in javascript.
|
214
|
+
# @option opts [Array<String>] :include Include a extra fields which are not in the default response body - 'association' includes additional HOA data - 'agreement' information on the listing agreement - 'garageSpaces' additional garage data - 'maintenanceExpense' data on maintenance expenses - 'parking' additional parking data - 'pool' includes an additional pool description - 'taxAnnualAmount' include the annual tax amount - 'taxYear' include the tax year data - 'rooms' include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available in the API response.
|
215
|
+
# @option opts [String] :sort Sort the response by a specific field. Values starting with a minus (-) denote descending order, while the others are ascending.
|
206
216
|
# @return [Array<Listing>]
|
207
217
|
def properties_get(opts = {})
|
208
|
-
data,
|
218
|
+
data, _status_code, _headers = properties_get_with_http_info(opts)
|
209
219
|
return data
|
210
220
|
end
|
211
221
|
|
212
222
|
# The SimplyRETS Listings API
|
213
|
-
# This is the main endpoint for accessing your properties. View
|
223
|
+
# This is the main endpoint for accessing your properties. View all of the available query parameters and make requests below! The API uses Basic Authentication, which most HTTP libraries will handle for you. To use the test data (which is what this pages uses), you can use the api key `simplyrets` and secret `simplyrets`. Note that these test listings are not live MLS listings but the data, query parameters, and response bodies will all work the same.
|
214
224
|
# @param [Hash] opts the optional parameters
|
215
|
-
# @option opts [String] :q A textual keyword search. This parameter will search the following
|
216
|
-
# @option opts [Array<String>] :status Request listings by a specific status. This parameter
|
217
|
-
# @option opts [Array<String>] :type Request listings by a specific property type. This
|
218
|
-
# @option opts [String] :agent Filter the listings returned by an agent ID. Note, the
|
219
|
-
# @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker
|
220
|
-
# @option opts [Integer] :minprice Filter listings by a minimum price
|
221
|
-
# @option opts [Integer] :maxprice Filter listings by a maximum price
|
222
|
-
# @option opts [Integer] :minarea Filter listings by a minimum area size in Sq Ft
|
223
|
-
# @option opts [Integer] :maxarea Filter listings by a maximum area size in Sq Ft
|
224
|
-
# @option opts [Integer] :minbaths Filter listings by a minimum number of bathrooms
|
225
|
-
# @option opts [Integer] :maxbaths Filter listings by a maximum number of bathrooms
|
226
|
-
# @option opts [Integer] :minbeds Filter listings by a minimum number of bedrooms
|
227
|
-
# @option opts [Integer] :maxbeds Filter listings by a maximum number of bedrooms
|
228
|
-
# @option opts [Integer] :maxdom Filter listings by a maximum number of days on market
|
229
|
-
# @option opts [Integer] :minyear Filter listings by a setting a minimum year built
|
230
|
-
# @option opts [Integer] :limit Set the number of listings to return in the response
|
231
|
-
# @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset
|
232
|
-
# @option opts [String] :vendor Used to specify the vendor (MLS) to search from. This
|
233
|
-
# @option opts [Array<String>] :postal_codes Filter the listings returned by postal codes / zip
|
234
|
-
# @option opts [Array<String>] :features Filter the listings by specific interior features. You
|
235
|
-
# @option opts [String] :water Query water/waterfront listings only. Specify
|
236
|
-
# @option opts [Array<String>] :neighborhoods Filter the listings returned by specific neighborhoods and
|
237
|
-
# @option opts [Array<String>] :cities Filter the listings returned by specific cities. You can
|
238
|
-
# @option opts [Array<String>] :counties Filter the listings returned by specific counties. You can
|
239
|
-
# @option opts [Array<String>] :points Return listings that are within a set of latitude
|
240
|
-
# @option opts [Array<String>] :include Include a extra fields which are not in the default
|
241
|
-
# @option opts [String] :sort Sort the response by a specific field. Values starting
|
225
|
+
# @option opts [String] :q A textual keyword search. This parameter will search the following fields, when available: - listingId (This does _not_ search the `mlsId` field in the SimplyRETS response body) - street number - street name - mls area (major) - city - subdivision name - postal code
|
226
|
+
# @option opts [Array<String>] :status Request listings by a specific status. This parameter defaults to active and you can specify multiple statuses in a single query. Listing statuses depend on your MLS's availability. Below is a brief description of each status with possible synonyms which may map to your MLS-specific statuses - *Active*: Active Listing which is still on the market - *ActiveUnderContract*: An offer has been accepted but the listing is still on market. Synonyms: Accepting Backup Offers, Backup Offer, Active With Accepted. Synonyms: Offer, Backup, Contingent - *Pending*: An offer has been accepted and the listing is no longer on market. Synonyms: Offer Accepted, Under Contract - *Hold*: The listing has been withdrawn from the market, but a contract still exists between the seller and the listing member. Synonyms: Hold, Hold Do Not Show, Temp Off Market - *Withdrawn*: The listing has been withdrawn from the market, but a contract still exists between the seller and the listing member. Synonyms: Hold, Hold Do Not Show, Temp Off Market - *Closed*: The purchase agreement has been fulfilled or the lease agreement has been executed. Synonyms: Sold, Leased, Rented, Closed Sale - *Expired*: The listing contract has expired - *Delete*: The listing contract was never valid or other reason for the contract to be nullified. Synonyms: Kill, Zap - *Incomplete*: The listing has not yet be completely entered and is not yet published in the MLS. Synonyms: Draft, Partially Complted - *ComingSoon*
|
227
|
+
# @option opts [Array<String>] :type Request listings by a specific property type. This defaults to Residential and Rental. You can specify multiple property types in a single query.
|
228
|
+
# @option opts [String] :agent Filter the listings returned by an agent ID. Note, the Agent ID is provided by your MLS. The co-listing agent is not included in this query parameter.
|
229
|
+
# @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID. For some MLS areas, this is the ListOfficeId (Listing Office ID). You can specific multiple broker parameters. Note, this query parameter is only available if a Broker ID is provided by your MLS.
|
230
|
+
# @option opts [Integer] :minprice Filter listings by a minimum price.
|
231
|
+
# @option opts [Integer] :maxprice Filter listings by a maximum price
|
232
|
+
# @option opts [Integer] :minarea Filter listings by a minimum area size in Sq Ft.
|
233
|
+
# @option opts [Integer] :maxarea Filter listings by a maximum area size in Sq Ft.
|
234
|
+
# @option opts [Integer] :minbaths Filter listings by a minimum number of bathrooms.
|
235
|
+
# @option opts [Integer] :maxbaths Filter listings by a maximum number of bathrooms.
|
236
|
+
# @option opts [Integer] :minbeds Filter listings by a minimum number of bedrooms.
|
237
|
+
# @option opts [Integer] :maxbeds Filter listings by a maximum number of bedrooms.
|
238
|
+
# @option opts [Integer] :maxdom Filter listings by a maximum number of days on market. _Note that your MLS must provide Days on Market data._
|
239
|
+
# @option opts [Integer] :minyear Filter listings by a setting a minimum year built.
|
240
|
+
# @option opts [Integer] :limit Set the number of listings to return in the response. This defaults to 20 listings, and can be a maximum of 50. To paginate through to the next page of listings, take a look at the `offset` parameter, or the Link in the HTTP Header.
|
241
|
+
# @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter by the limit to go to the next \"page\" of listings. Also take a look at the Link HTTP Header for pre-built pagination. *NOTE:* If you're offset is too high, you will receive an `HTTP 400 offset too high` error message.
|
242
|
+
# @option opts [String] :vendor Used to specify the vendor (MLS) to search from. This parameter is required on multi-MLS apps, and you can only query one vendor at a time. To get your vendor id's make an OPTIONS request to https://api.simplyrets.com.
|
243
|
+
# @option opts [Array<String>] :postal_codes Filter the listings returned by postal codes / zip code. You can specify multiple.
|
244
|
+
# @option opts [Array<String>] :features Filter the listings by specific interior features. You can filter by multiple. For example, to filter trial listings by multiple features you can use, Return listings that are within a set of latitude longitude coordinates. For example, ``` Wet Bar High Ceiling ``` e.g. `https://simplyrets.com/services?features=Wet%20Bar&features=High%20Ceiling` The features provided by your MLS can be seen in your OPTIONS request. To view all valid features, make a request to the SimplyRETS api root `curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/`
|
245
|
+
# @option opts [String] :water Query water/waterfront listings only. Specify `true` to filter waterfront listings.
|
246
|
+
# @option opts [Array<String>] :neighborhoods Filter the listings returned by specific neighborhoods and subdivisions. You can specify multiple.
|
247
|
+
# @option opts [Array<String>] :cities Filter the listings returned by specific cities. You can specify multiple.
|
248
|
+
# @option opts [Array<String>] :counties Filter the listings returned by specific counties. You can specify multiple.
|
249
|
+
# @option opts [Array<String>] :points Return listings that are within a set of latitude longitude coordinates. For example; ``` 29.723837,-95.69778 29.938275,-95.69778 29.938275,-95.32974 29.723837,-95.32974 ``` Note that some MLS's do not provide latitude and longitude for their listings, which is required for this parameter to work. In these cases, SimplyRETS offers a [Geocoding Addon](https://simplyrets.com/services#geocoding). Check out our [blog post](https://simplyrets.com/blog/interactive-map-search.html) on using the `points` parameter to build a map-based app in javascript.
|
250
|
+
# @option opts [Array<String>] :include Include a extra fields which are not in the default response body - 'association' includes additional HOA data - 'agreement' information on the listing agreement - 'garageSpaces' additional garage data - 'maintenanceExpense' data on maintenance expenses - 'parking' additional parking data - 'pool' includes an additional pool description - 'taxAnnualAmount' include the annual tax amount - 'taxYear' include the tax year data - 'rooms' include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available in the API response.
|
251
|
+
# @option opts [String] :sort Sort the response by a specific field. Values starting with a minus (-) denote descending order, while the others are ascending.
|
242
252
|
# @return [Array<(Array<Listing>, Fixnum, Hash)>] Array<Listing> data, response status code and response headers
|
243
253
|
def properties_get_with_http_info(opts = {})
|
244
254
|
if @api_client.config.debugging
|
245
|
-
@api_client.config.logger.debug "Calling API: DefaultApi
|
255
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.properties_get ..."
|
246
256
|
end
|
247
|
-
|
248
257
|
if opts[:'sort'] && !['listprice', '-listprice', 'listdate', '-listdate', 'beds', '-beds', 'baths', '-baths'].include?(opts[:'sort'])
|
249
|
-
fail 'invalid value for "sort", must be one of listprice, -listprice, listdate, -listdate, beds, -beds, baths, -baths'
|
258
|
+
fail ArgumentError, 'invalid value for "sort", must be one of listprice, -listprice, listdate, -listdate, beds, -beds, baths, -baths'
|
250
259
|
end
|
251
|
-
|
252
260
|
# resource path
|
253
261
|
local_var_path = "/properties".sub('{format}','json')
|
254
262
|
|
@@ -286,19 +294,18 @@ module SimplyRetsClient
|
|
286
294
|
header_params = {}
|
287
295
|
|
288
296
|
# HTTP header 'Accept' (if needed)
|
289
|
-
|
290
|
-
|
297
|
+
local_header_accept = ['application/json', 'application/vnd.simplyrets-v0.1+json']
|
298
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
291
299
|
|
292
300
|
# HTTP header 'Content-Type'
|
293
|
-
|
294
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
301
|
+
local_header_content_type = ['application/json']
|
302
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
295
303
|
|
296
304
|
# form parameters
|
297
305
|
form_params = {}
|
298
306
|
|
299
307
|
# http body (model)
|
300
308
|
post_body = nil
|
301
|
-
|
302
309
|
auth_names = ['basicAuth']
|
303
310
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
304
311
|
:header_params => header_params,
|
@@ -314,30 +321,28 @@ module SimplyRetsClient
|
|
314
321
|
end
|
315
322
|
|
316
323
|
# Single Listing Endpoint
|
317
|
-
# Use this endpoint for accessing a single listing. When you
|
318
|
-
# @param mls_id The
|
324
|
+
# Use this endpoint for accessing a single listing. When you make a search to the `/properties` endpoint, each listing in the response will contain a unique `mlsId` field which should be used to request that listing on this route. The `mlsId` field is a unique identifier for a listing which is specific to the SimplyRETS API only. It is different from the `listingId` field is the public number given to a listing by the MLS and is not used here.
|
325
|
+
# @param mls_id The `mlsId` field is a unique identifier which is specific to the SimplyRETS API only. This field is different from the `listingId` field (which is the public number given to a listing by the MLS and is not used here).
|
319
326
|
# @param [Hash] opts the optional parameters
|
320
|
-
# @option opts [Array<String>] :include Include a extra fields which are not in the default
|
327
|
+
# @option opts [Array<String>] :include Include a extra fields which are not in the default response body - 'association' includes additional HOA data - 'agreement' information on the listing agreement - 'garageSpaces' additional garage data - 'maintenanceExpense' data on maintenance expenses - 'parking' additional parking data - 'pool' includes an additional pool description - 'rooms' include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available with valid data in the API response. If your MLS does not offer these fields, they will contain 'null'.
|
321
328
|
# @return [Listing]
|
322
329
|
def properties_mls_id_get(mls_id, opts = {})
|
323
|
-
data,
|
330
|
+
data, _status_code, _headers = properties_mls_id_get_with_http_info(mls_id, opts)
|
324
331
|
return data
|
325
332
|
end
|
326
333
|
|
327
334
|
# Single Listing Endpoint
|
328
|
-
# Use this endpoint for accessing a single listing. When you
|
329
|
-
# @param mls_id The
|
335
|
+
# Use this endpoint for accessing a single listing. When you make a search to the `/properties` endpoint, each listing in the response will contain a unique `mlsId` field which should be used to request that listing on this route. The `mlsId` field is a unique identifier for a listing which is specific to the SimplyRETS API only. It is different from the `listingId` field is the public number given to a listing by the MLS and is not used here.
|
336
|
+
# @param mls_id The `mlsId` field is a unique identifier which is specific to the SimplyRETS API only. This field is different from the `listingId` field (which is the public number given to a listing by the MLS and is not used here).
|
330
337
|
# @param [Hash] opts the optional parameters
|
331
|
-
# @option opts [Array<String>] :include Include a extra fields which are not in the default
|
338
|
+
# @option opts [Array<String>] :include Include a extra fields which are not in the default response body - 'association' includes additional HOA data - 'agreement' information on the listing agreement - 'garageSpaces' additional garage data - 'maintenanceExpense' data on maintenance expenses - 'parking' additional parking data - 'pool' includes an additional pool description - 'rooms' include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available with valid data in the API response. If your MLS does not offer these fields, they will contain 'null'.
|
332
339
|
# @return [Array<(Listing, Fixnum, Hash)>] Listing data, response status code and response headers
|
333
340
|
def properties_mls_id_get_with_http_info(mls_id, opts = {})
|
334
341
|
if @api_client.config.debugging
|
335
|
-
@api_client.config.logger.debug "Calling API: DefaultApi
|
342
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.properties_mls_id_get ..."
|
336
343
|
end
|
337
|
-
|
338
344
|
# verify the required parameter 'mls_id' is set
|
339
|
-
fail "Missing the required parameter 'mls_id' when calling properties_mls_id_get" if mls_id.nil?
|
340
|
-
|
345
|
+
fail ArgumentError, "Missing the required parameter 'mls_id' when calling DefaultApi.properties_mls_id_get" if mls_id.nil?
|
341
346
|
# resource path
|
342
347
|
local_var_path = "/properties/{mlsId}".sub('{format}','json').sub('{' + 'mlsId' + '}', mls_id.to_s)
|
343
348
|
|
@@ -349,19 +354,18 @@ module SimplyRetsClient
|
|
349
354
|
header_params = {}
|
350
355
|
|
351
356
|
# HTTP header 'Accept' (if needed)
|
352
|
-
|
353
|
-
|
357
|
+
local_header_accept = ['application/json', 'application/vnd.simplyrets-v0.1+json']
|
358
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
354
359
|
|
355
360
|
# HTTP header 'Content-Type'
|
356
|
-
|
357
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
361
|
+
local_header_content_type = ['application/json']
|
362
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
358
363
|
|
359
364
|
# form parameters
|
360
365
|
form_params = {}
|
361
366
|
|
362
367
|
# http body (model)
|
363
368
|
post_body = nil
|
364
|
-
|
365
369
|
auth_names = ['basicAuth']
|
366
370
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
367
371
|
:header_params => header_params,
|