simplyrets 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5029ff6e372255736bef2765aecf2b597118c64a
4
- data.tar.gz: 249e13b09309079b5b6b129714dcb39d27779f32
3
+ metadata.gz: 412b35e38999019546945d6529debef414e4844f
4
+ data.tar.gz: ad7e6a70f4633e31c0daa4e67dd800030308fb6e
5
5
  SHA512:
6
- metadata.gz: 20edb852c10abbfcdfec3d38cf20b78f682a7432a273c2f0d33f711298b1e3fe84dc2cee099a14178ebc0d8bf73e2d55008c7c62c5ee786d17590ae044ee216b
7
- data.tar.gz: 496de05f0d5c7bda062bd34422273f2e8219c8d0ac8fe8a5a2a5e00ea3118773e1b59ce5783c2ad07c06f9ae09d194e0f790e676cbacbd34eea4bebef6b24c27
6
+ metadata.gz: 8695c34518124f980b505d15034ad99e2ff34ec227e8e041da470e857d7f06d5f6d402f3dcc267db43d1a33534d2a26c2f79d793671514f3ec4cedd7481eec52
7
+ data.tar.gz: be04eb5215c2b210934bad81bbba88473ed7b5f4ba4d461cd1582543ecbd9958e2ba8cd412034a245a7ec8f97d0821bbddf71fd82228bbda67d64870e4a00120
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simplyrets (1.0.6)
4
+ simplyrets (1.0.7)
5
5
  json (~> 1.4, >= 1.4.6)
6
6
  typhoeus (~> 0.2, >= 0.2.1)
7
7
 
@@ -0,0 +1,34 @@
1
+ # SimplyRets common files
2
+ require 'simplyrets/simplyrets'
3
+ require 'simplyrets/simplyrets/configuration'
4
+ require 'simplyrets/simplyrets/api_error'
5
+ require 'simplyrets/simplyrets/request'
6
+ require 'simplyrets/simplyrets/response'
7
+ require 'simplyrets/simplyrets/version'
8
+
9
+ # Models
10
+ require 'simplyrets/models/base_object'
11
+ require 'simplyrets/models/street_address'
12
+ require 'simplyrets/models/property'
13
+ require 'simplyrets/models/listing'
14
+ require 'simplyrets/models/open_house'
15
+ require 'simplyrets/models/office'
16
+ require 'simplyrets/models/agent'
17
+ require 'simplyrets/models/sales'
18
+ require 'simplyrets/models/school'
19
+ require 'simplyrets/models/parking'
20
+ require 'simplyrets/models/contact_information'
21
+ require 'simplyrets/models/tax'
22
+ require 'simplyrets/models/geographic_data'
23
+ require 'simplyrets/models/broker'
24
+ require 'simplyrets/models/mls_information'
25
+ require 'simplyrets/models/error'
26
+
27
+ # APIs
28
+ require 'simplyrets/api/default_api'
29
+
30
+ module SimplyRetsClient
31
+ # Initialize the default configuration
32
+ SimplyRets.configuration = SimplyRets::Configuration.new
33
+ SimplyRets.configure { |config| }
34
+ end
@@ -0,0 +1,146 @@
1
+ require "uri"
2
+
3
+ module SimplyRetsClient
4
+ class Properties_api
5
+
6
+ # The SimplyRets Listings API
7
+ # This is the main endpoint for accessing your properties. View\nall of the available query parameters and make requests below!\nThe API uses Basic Authorization, which most HTTP libraries\nwill handle for you. To use the test test data (which is what\nthis pages uses), you can use the api key `simplyrets` and\nsecret `simplyrets`. Note that the test listings are not live\nMLS listings but the data, query parameters, and response\nbodies will all work the same.\n
8
+ # @param [Hash] opts the optional parameters
9
+ # @option opts [String] :q A fuzzy keyword search.\n
10
+ # @option opts [Integer] :minprice Filter listings by a minimum price.\n
11
+ # @option opts [Integer] :maxprice Filter listings by a maximum price\n
12
+ # @option opts [String] :agent Filter the listings returned by an agent ID. Note, the\nAgent ID is provided by your MLS.\n
13
+ # @option opts [Integer] :minarea Filter listings by a minimum area size in Sq Ft.\n
14
+ # @option opts [Integer] :maxarea Filter listings by a maximum area size in Sq Ft.\n
15
+ # @option opts [Integer] :minbaths Filter listings by a minimum number of bathrooms.\n
16
+ # @option opts [Integer] :maxbaths Filter listings by a maximum number of bathrooms.\n
17
+ # @option opts [Integer] :minbeds Filter listings by a minimum number of bedrooms.\n
18
+ # @option opts [Integer] :maxbeds Filter listings by a maximum number of bedrooms.\n
19
+ # @option opts [Integer] :limit Set the number of listings to return in the response.\nThis defaults to 20 listings, and can be a maximum of 50.\nTo paginate through to the next page of listings, take a\nlook at the `offset` parameter, or the Link in the HTTP\nHeader.\n
20
+ # @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter\nby the limit to go to the next \"page\" of listings. Also take\na look at the Link HTTP Header for pre-built pagination.\n
21
+ # @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID.\nYou can specific multiple broker parameters. Note, the Broker\nID is provided by your MLS.\n
22
+ # @option opts [Array<String>] :features Filter the listings returned by specific features. You\ncan specify multiple.\n
23
+ # @option opts [Array<String>] :amenities Filter the listings returned by specific amenities. You\ncan specify multiple amenities.\n
24
+ # @option opts [Array<String>] :neighborhoods Filter the listings returned by specific neighborhoods and\nsubdivisions. You can specify multiple.\n
25
+ # @option opts [Array<String>] :points A list of latitude longitude coordinates which contain\nthe property. Our documentation generator does not yet\nsupport using a list of parameters.\n
26
+ # @option opts [Array<String>] :counties Filter the listings returned by specific counties. You can\nspecify multiple.\n
27
+ # @option opts [Array<String>] :status Filter the listings returned by a specific status. You can\nspecify multiple.\n
28
+ # @option opts [String] :type Request listings by a specific property type. This\ndefaults to Residential, and you can only specify multiple property types in a single query.\n
29
+ # @option opts [String] :sort Sort the response by a specific field. Values starting\nwith a minus (-) denote descending order, while the others\nare ascending.\n
30
+ # @option opts [String] :include Include a limited set of extra fields which are not found\nin the default response body\n- &#39;rooms&#39; include parameter will include\n any additional rooms as a list.\n- &#39;pool&#39; includes an additional pool description\n- &#39;association&#39; includes additional home owners association data\n
31
+ # @return [Array<Listing>]
32
+ def self.properties(opts = {})
33
+ if SimplyRets.configuration.debug
34
+ SimplyRets.logger.debug "Calling API: DefaultApi#properties ..."
35
+ end
36
+
37
+ if opts[:'sort'] && !['listprice', '-listprice', 'listdate', '-listdate', 'beds', '-beds', 'baths', '-baths'].include?(opts[:'sort'])
38
+ fail 'invalid value for "sort", must be one of listprice, -listprice, listdate, -listdate, beds, -beds, baths, -baths'
39
+ end
40
+
41
+ if opts[:'include'] && !['pool', 'rooms', 'association'].include?(opts[:'include'])
42
+ fail 'invalid value for "include", must be one of pool, rooms, association'
43
+ end
44
+
45
+ # resource path
46
+ path = "/properties".sub('{format}','json')
47
+
48
+ # query parameters
49
+ query_params = {}
50
+ query_params[:'q'] = opts[:'q'] if opts[:'q']
51
+ query_params[:'minprice'] = opts[:'minprice'] if opts[:'minprice']
52
+ query_params[:'maxprice'] = opts[:'maxprice'] if opts[:'maxprice']
53
+ query_params[:'agent'] = opts[:'agent'] if opts[:'agent']
54
+ query_params[:'minarea'] = opts[:'minarea'] if opts[:'minarea']
55
+ query_params[:'maxarea'] = opts[:'maxarea'] if opts[:'maxarea']
56
+ query_params[:'minbaths'] = opts[:'minbaths'] if opts[:'minbaths']
57
+ query_params[:'maxbaths'] = opts[:'maxbaths'] if opts[:'maxbaths']
58
+ query_params[:'minbeds'] = opts[:'minbeds'] if opts[:'minbeds']
59
+ query_params[:'maxbeds'] = opts[:'maxbeds'] if opts[:'maxbeds']
60
+ query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
61
+ query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
62
+ query_params[:'brokers'] = opts[:'brokers'] if opts[:'brokers']
63
+ query_params[:'features'] = opts[:'features'] if opts[:'features']
64
+ query_params[:'amenities'] = opts[:'amenities'] if opts[:'amenities']
65
+ query_params[:'neighborhoods'] = opts[:'neighborhoods'] if opts[:'neighborhoods']
66
+ query_params[:'points'] = opts[:'points'] if opts[:'points']
67
+ query_params[:'counties'] = opts[:'counties'] if opts[:'counties']
68
+ query_params[:'status'] = opts[:'status'] if opts[:'status']
69
+ query_params[:'type'] = opts[:'type'] if opts[:'type']
70
+ query_params[:'sort'] = opts[:'sort'] if opts[:'sort']
71
+ query_params[:'include'] = opts[:'include'] if opts[:'include']
72
+
73
+ # header parameters
74
+ header_params = {}
75
+
76
+ # HTTP header 'Accept' (if needed)
77
+ _header_accept = []
78
+ _header_accept_result = SimplyRets::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
79
+
80
+ # HTTP header 'Content-Type'
81
+ _header_content_type = []
82
+ header_params['Content-Type'] = SimplyRets::Request.select_header_content_type(_header_content_type)
83
+
84
+ # form parameters
85
+ form_params = {}
86
+
87
+ # http body (model)
88
+ post_body = nil
89
+
90
+
91
+ auth_names = ['basicAuth']
92
+ response = SimplyRets::Request.new(:GET, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names}).make
93
+ result = response.deserialize('Array<Listing>')
94
+ if SimplyRets.configuration.debug
95
+ SimplyRets.logger.debug "API called: DefaultApi#properties. Result: #{result.inspect}"
96
+ end
97
+ result
98
+ end
99
+
100
+ # Single Listing Endpoint
101
+ # Use this endpoint for accessing a single listing.\n
102
+ # @param listing_id A listings listingId (unique indentifier).
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Listing]
105
+ def self.property(listing_id, opts = {})
106
+ if SimplyRets.configuration.debug
107
+ SimplyRets.logger.debug "Calling API: DefaultApi#property ..."
108
+ end
109
+
110
+ # verify the required parameter 'listing_id' is set
111
+ fail "Missing the required parameter 'listing_id' when calling property" if listing_id.nil?
112
+
113
+ # resource path
114
+ path = "/properties/{listingId}".sub('{format}','json').sub('{' + 'listingId' + '}', listing_id.to_s)
115
+
116
+ # query parameters
117
+ query_params = {}
118
+
119
+ # header parameters
120
+ header_params = {}
121
+
122
+ # HTTP header 'Accept' (if needed)
123
+ _header_accept = []
124
+ _header_accept_result = SimplyRets::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
125
+
126
+ # HTTP header 'Content-Type'
127
+ _header_content_type = []
128
+ header_params['Content-Type'] = SimplyRets::Request.select_header_content_type(_header_content_type)
129
+
130
+ # form parameters
131
+ form_params = {}
132
+
133
+ # http body (model)
134
+ post_body = nil
135
+
136
+
137
+ auth_names = ['basicAuth']
138
+ response = SimplyRets::Request.new(:GET, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names}).make
139
+ result = response.deserialize('Listing')
140
+ if SimplyRets.configuration.debug
141
+ SimplyRets.logger.debug "API called: DefaultApi#property. Result: #{result.inspect}"
142
+ end
143
+ result
144
+ end
145
+ end
146
+ end
@@ -25,7 +25,7 @@ module SimplyRetsClient
25
25
  # @option opts [Array<String>] :points A list of latitude longitude coordinates which contain\nthe property. Our documentation generator does not yet\nsupport using a list of parameters.\n
26
26
  # @option opts [Array<String>] :counties Filter the listings returned by specific counties. You can\nspecify multiple.\n
27
27
  # @option opts [Array<String>] :status Filter the listings returned by a specific status. You can\nspecify multiple.\n
28
- # @option opts [String] :type Request listings by a specific property type. This\ndefaults to Residential, and you can only specify one type\nin a single query.\n
28
+ # @option opts [String] :type Request listings by a specific property type. This\ndefaults to searching by Residential & Rental, and you can only specify multiple property types in a single query.\n
29
29
  # @option opts [String] :sort Sort the response by a specific field. Values starting\nwith a minus (-) denote descending order, while the others\nare ascending.\n
30
30
  # @option opts [String] :include Include a limited set of extra fields which are not found\nin the default response body\n- &#39;rooms&#39; include parameter will include\n any additional rooms as a list.\n- &#39;pool&#39; includes an additional pool description\n- &#39;association&#39; includes additional home owners association data\n
31
31
  # @return [Array<Listing>]
@@ -34,10 +34,6 @@ module SimplyRetsClient
34
34
  SimplyRets.logger.debug "Calling API: DefaultApi#properties ..."
35
35
  end
36
36
 
37
- if opts[:'type'] && !['Residential', 'Rental', 'Multifamily', 'Condominium', 'Commercial', 'Land'].include?(opts[:'type'])
38
- fail 'invalid value for "type", must be one of Residential, Rential, Multifamily, Condominium, Commercial, Land'
39
- end
40
-
41
37
  if opts[:'sort'] && !['listprice', '-listprice', 'listdate', '-listdate', 'beds', '-beds', 'baths', '-baths'].include?(opts[:'sort'])
42
38
  fail 'invalid value for "sort", must be one of listprice, -listprice, listdate, -listdate, beds, -beds, baths, -baths'
43
39
  end
@@ -1,5 +1,5 @@
1
1
  module SimplyRetsClient
2
2
  module SimplyRets
3
- VERSION = "1.0.6"
3
+ VERSION = "1.0.7"
4
4
  end
5
5
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplyrets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Reichert
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-19 00:00:00.000000000 Z
12
+ date: 2016-04-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus
@@ -207,6 +207,8 @@ files:
207
207
  - Rakefile
208
208
  - example.rb
209
209
  - lib/simplyrets.rb
210
+ - lib/simplyrets.rb~
211
+ - lib/simplyrets/api/#default_api.rb#
210
212
  - lib/simplyrets/api/default_api.rb
211
213
  - lib/simplyrets/models/agent.rb
212
214
  - lib/simplyrets/models/base_object.rb
@@ -230,26 +232,8 @@ files:
230
232
  - lib/simplyrets/simplyrets/request.rb
231
233
  - lib/simplyrets/simplyrets/response.rb
232
234
  - lib/simplyrets/simplyrets/version.rb
235
+ - simplyrets-1.0.6.gem
233
236
  - simplyrets.gemspec
234
- - spec/api/default_api_spec.rb
235
- - spec/api/default_api_spec.rb~
236
- - spec/models/agent_spec.rb
237
- - spec/models/broker_spec.rb
238
- - spec/models/contact_information_spec.rb
239
- - spec/models/error_spec.rb
240
- - spec/models/geographic_data_spec.rb
241
- - spec/models/listing_spec.rb
242
- - spec/models/mls_information_spec.rb
243
- - spec/models/office_spec.rb
244
- - spec/models/open_house_spec.rb
245
- - spec/models/parking_spec.rb
246
- - spec/models/property_spec.rb
247
- - spec/models/sales_spec.rb
248
- - spec/models/school_spec.rb
249
- - spec/models/street_address_spec.rb
250
- - spec/models/tax_spec.rb
251
- - spec/spec_helper.rb
252
- - spec/spec_helper.rb~
253
237
  homepage: https://simplyrets.com
254
238
  licenses:
255
239
  - MIT
@@ -1,135 +0,0 @@
1
- =begin
2
- SimplyRETS API
3
-
4
- The SimplyRETS API is an exciting step towards making it easier for\ndevelopers and real estate agents to build something awesome with\nreal estate data!\n\nThe documentation below makes live requests to our API using the\ntrial data. To get set up with the API using live MLS data, you\nmust have RETS credentials from your MLS, which you can then use to\ncreate an app with SimplyRETS. For more information on that\nprocess, please see our [FAQ](https://simplyrets.com/faq), [Getting\nStarted](https://simplyrets.com/blog/getting-set-up.html) page, or\n[contact us](https://simplyrets.com/\\#home-contact).\n\nBelow you'll find the API endpoints, query parameters, response bodies,\nand other information about using the SimplyRETS API. You can run\nqueries by clicking the 'Try it Out' button at the bottom of each\nsection.\n\n### Authentication\nThe SimplyRETS API uses Basic Authentication. When you create an\napp, you'll get a set of API credentials to access your\nlistings. If you're trying out the test data, you can use\n`simplyrets:simplyrets` for connecting to the API.\n\n### Media Types\nThe SimplyRETS API uses the 'Accept' header to allow clients to\ncontrol media types (content versions). We maintain backwards\ncompatibility with API clients by allowing them to specify a\ncontent version. We highly recommend setting and explicity media\ntype when your application reaches production. Both the structure\nand content of our API response bodies is subject to change so we\ncan add new features while respecting the stability of applications\nwhich have already been developed.\n\nTo always use the latest SimplyRETS content version, simply use\n`application/json` in your application `Accept` header.\n\nIf you want to pin your clients media type to a specific version,\nyou can use the vendor-specific SimplyRETS media type, e.g.\n`application/vnd.simplyrets-v0.1+json\"`\n\nTo view all valid content-types for making an `OPTIONS`, make a\nrequest to the SimplyRETS api root\n\n`curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/`\n\nThe default media types used in our API responses may change in the\nfuture. If you're building an application and care about the\nstability of the API, be sure to request a specific media type in the\nAccept header as shown in the examples below.\n\nThe wordpress plugin automatically sets the `Accept` header for the\ncompatible SimplyRETS media types.\n\n### Pagination\nThere a few pieces of useful information about each request stored\nin the HTTP Headers:\n\n- `X-Total-Count` shows you the total amount of listings that match\n your current query.\n- `Link` contains pre-built pagination links for accessing the next\n'page' of listings that match your query. Read more about that\n[here](https://simplyrets.com/blog/api-pagination.html).\n
5
-
6
- OpenAPI spec version: 1.0.0
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
-
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for SwaggerClient::DefaultApi
17
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
- # Please update as you see appropriate
19
- describe 'DefaultApi' do
20
- before do
21
- # run before each test
22
- @instance = SwaggerClient::DefaultApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of DefaultApi' do
30
- it 'should create an instact of DefaultApi' do
31
- @instance.should be_a(SwaggerClient::DefaultApi)
32
- end
33
- end
34
-
35
- # unit tests for openhouses_get
36
- # The SimplyRETS OpenHouses API
37
- # This is the main endpoint for accessing openhouses.\n
38
- # @param [Hash] opts the optional parameters
39
- # @option opts [String] :type Request listings by a specific property type. This\ndefaults to Residential, and you can only specify one type\nin a single query.\n
40
- # @option opts [String] :listing_id Request openhouses for a specific &#x60;listingId&#x60;.\n
41
- # @option opts [Array<String>] :cities Filter the openhouses returned by a list of valid cities. A\nlist of valid cities can be found by making an OPTIONS\nrequest to the &#x60;/openhouses&#x60; endpoint.\n
42
- # @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID.\nYou can specific multiple broker parameters. Note, the Broker\nID is provided by your MLS.\n
43
- # @option opts [String] :agent Filter the listings returned by an agent ID. Note, the\nAgent ID is provided by your MLS.\n
44
- # @option opts [Integer] :minprice Filter listings by a minimum price.\n
45
- # @option opts [DateTime] :startdate Scheduled date and time of the open house showing
46
- # @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter\nby the limit to go to the next \&quot;page\&quot; of listings. Also take\na look at the Link HTTP Header for pre-built pagination.\n
47
- # @option opts [Integer] :limit Set the number of listings to return in the response.\nThis defaults to 20 listings, and can be a maximum of 50.\nTo paginate through to the next page of listings, take a\nlook at the &#x60;offset&#x60; parameter, or the Link in the HTTP\nHeader.\n
48
- # @option opts [String] :sort Sort the response by a specific field. Values starting\nwith a minus (-) denote descending order, while the others\nare ascending.\n
49
- # @return [Array<OpenHouse>]
50
- describe 'openhouses_get test' do
51
- it "should work" do
52
- # assertion here
53
- # should be_a()
54
- # should be_nil
55
- # should ==
56
- # should_not ==
57
- end
58
- end
59
-
60
- # unit tests for openhouses_open_house_key_get
61
- # Single OpenHouse Endpoint
62
- # Use this endpoint for accessing a single OpenHouse.\n
63
- # @param open_house_key A unique OpenHouse identification key
64
- # @param [Hash] opts the optional parameters
65
- # @return [OpenHouse]
66
- describe 'openhouses_open_house_key_get test' do
67
- it "should work" do
68
- # assertion here
69
- # should be_a()
70
- # should be_nil
71
- # should ==
72
- # should_not ==
73
- end
74
- end
75
-
76
- # unit tests for properties_get
77
- # The SimplyRETS Listings API
78
- # This is the main endpoint for accessing your properties. View\nall of the available query parameters and make requests below!\nThe API uses Basic Authentication, which most HTTP libraries\nwill handle for you. To use the test data (which is what this\npages uses), you can use the api key &#x60;simplyrets&#x60; and secret\n&#x60;simplyrets&#x60;. Note that these test listings are not live MLS\nlistings but the data, query parameters, and response bodies\nwill all work the same.\n
79
- # @param [Hash] opts the optional parameters
80
- # @option opts [String] :q A textual keyword search. This parameter will search the following\nfields, when available:\n\n - listingId (This does _not_ search the &#39;mlsId&#39; field in the\nSimplyRETS response body)\n\n - street number\n\n - street name\n\n - mls area (major)\n\n - city\n\n - subdivision name\n\n - postal code\n\nNOTE\n
81
- # @option opts [Array<String>] :status Request listings by a specific status. This parameter\ndefaults to active and you can specify multiple statuses\nin a single query.\n\n\nListing statuses depend on your MLS&#39;s availability. Below is\na brief description of each status with possible synonyms which\nmay map to your MLS-specific statuses\n- *Active*: Active Listing which is still on the market\n- *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\n- *Pending*: An offer has been accepted and the listing is no longer on market. Synonyms: Offer Accepted, Under Contract\n- *Hold*: The listing has been withdrawn from the market, but a contract\n\n still exists between the seller and the listing member. Synonyms:\nHold, Hold Do Not Show, Temp Off Market\n- *Withdrawn*: The listing has been withdrawn from the market, but a contract\n\n still exists between the seller and the listing member. Synonyms:\nHold, Hold Do Not Show, Temp Off Market\n- *Closed*: The purchase agreement has been fulfilled or the lease\n\n agreement has been executed. Synonyms: Sold, Leased, Rented, Closed\nSale\n- *Expired*: The listing contract has expired\n- *Delete*: The listing contract was never valid or other reason for the contract to be nullified. Synonyms: Kill, Zap\n- *Incomplete*: The listing has not yet be completely entered and is not yet\n\n published in the MLS. Synonyms: Draft, Partially Complted\n\n- *ComingSoon*\n
82
- # @option opts [Array<String>] :type Request listings by a specific property type. This\ndefaults to Residential and Rental. You can specify\nmultiple property types in a single query.\n
83
- # @option opts [String] :agent Filter the listings returned by an agent ID. Note, the\nAgent ID is provided by your MLS.\n
84
- # @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker\nID. For some MLS areas, this is the ListOfficeId (Listing\nOffice ID). You can specific multiple broker\nparameters. Note, this query parameter is only available\nif a Broker ID is provided by your MLS.\n
85
- # @option opts [Integer] :minprice Filter listings by a minimum price.\n
86
- # @option opts [Integer] :maxprice Filter listings by a maximum price\n
87
- # @option opts [Integer] :minarea Filter listings by a minimum area size in Sq Ft.\n
88
- # @option opts [Integer] :maxarea Filter listings by a maximum area size in Sq Ft.\n
89
- # @option opts [Integer] :minbaths Filter listings by a minimum number of bathrooms.\n
90
- # @option opts [Integer] :maxbaths Filter listings by a maximum number of bathrooms.\n
91
- # @option opts [Integer] :minbeds Filter listings by a minimum number of bedrooms.\n
92
- # @option opts [Integer] :maxbeds Filter listings by a maximum number of bedrooms.\n
93
- # @option opts [Integer] :maxdom Filter listings by a maximum number of days on market.\n_Note that your MLS must provide Days on Market data._\n
94
- # @option opts [Integer] :minyear Filter listings by a setting a minimum year built.\n
95
- # @option opts [Integer] :limit Set the number of listings to return in the response.\nThis defaults to 20 listings, and can be a maximum of 50.\nTo paginate through to the next page of listings, take a\nlook at the &#x60;offset&#x60; parameter, or the Link in the HTTP\nHeader.\n
96
- # @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset\nparameter by the limit to go to the next \&quot;page\&quot; of\nlistings. Also take a look at the Link HTTP Header for\npre-built pagination.\n
97
- # @option opts [String] :vendor Used to specify the vendor (MLS) to search from. This\nparameter is required on multi-MLS apps, and you can only\nquery one vendor at a time. To get your vendor id&#39;s make\nan OPTIONS request to https://api.simplyrets.com.\n
98
- # @option opts [Array<String>] :postal_codes Filter the listings returned by postal codes / zip\ncode. You can specify multiple.\n
99
- # @option opts [Array<String>] :features Filter the listings by specific interior features. You\ncan filter by multiple. For example, to filter trial listings\nby multiple features you can use,\nReturn listings that are within a set of latitude\nlongitude coordinates. For example,\n\n\n&#x60;&#x60;&#x60;\nWet Bar\nHigh Ceiling\n&#x60;&#x60;&#x60;\n\n\ne.g. &#x60;https://simplyrets.com/services?features&#x3D;Wet%20Bar&amp;features&#x3D;High%20Ceiling&#x60;\n\n\nThe features provided by your MLS can be seen in your\nOPTIONS request. To view all valid features, make a\nrequest to the SimplyRETS api root\n\n\n&#x60;curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/&#x60;\n
100
- # @option opts [String] :water Query water/waterfront listings only. Specify &#39;true&#39; to\nfilter waterfront listings.\n
101
- # @option opts [Array<String>] :neighborhoods Filter the listings returned by specific neighborhoods and\nsubdivisions. You can specify multiple.\n
102
- # @option opts [Array<String>] :cities Filter the listings returned by specific cities. You can\nspecify multiple.\n
103
- # @option opts [Array<String>] :counties Filter the listings returned by specific counties. You can\nspecify multiple.\n
104
- # @option opts [Array<String>] :points Return listings that are within a set of latitude\nlongitude coordinates. For example;\n&#x60;&#x60;&#x60;\n29.723837,-95.69778\n29.938275,-95.69778\n29.938275,-95.32974\n29.723837,-95.32974\n&#x60;&#x60;&#x60;\nNote that some MLS&#39;s do not provide latitude and longitude\nfor their listings, which is required for this parameter\nto work. In these cases, SimplyRETS offers a [Geocoding\nAddon](https://simplyrets.com/services#geocoding).\n\n\nCheck out our\n[blog post](https://simplyrets.com/blog/interactive-map-search.html)\non using the &#x60;points&#x60; parameter to build a map-based app\nin javascript.\n
105
- # @option opts [Array<String>] :include Include a extra fields which are not in the default\nresponse body\n- &#39;association&#39; includes additional HOA data\n- &#39;agreement&#39; information on the listing agreement\n- &#39;garageSpaces&#39; additional garage data\n- &#39;maintenanceExpense&#39; data on maintenance expenses\n- &#39;parking&#39; additional parking data\n- &#39;pool&#39; includes an additional pool description\n- &#39;taxAnnualAmount&#39; include the annual tax amount\n- &#39;taxYear&#39; include the tax year data\n- &#39;rooms&#39; include parameter will include\n any additional rooms as a list.\n\nNote that your MLS must provide these fields in their RETS\ndata for them to be available in the API response.\n
106
- # @option opts [String] :sort Sort the response by a specific field. Values starting\nwith a minus (-) denote descending order, while the others\nare ascending.\n
107
- # @return [Array<Listing>]
108
- describe 'properties_get test' do
109
- it "should work" do
110
- # assertion here
111
- # should be_a()
112
- # should be_nil
113
- # should ==
114
- # should_not ==
115
- end
116
- end
117
-
118
- # unit tests for properties_mls_id_get
119
- # Single Listing Endpoint
120
- # Use this endpoint for accessing a single listing. When you\nmake a search to the &#x60;/properties&#x60; endpoint, each listing in\nthe response will contain a unique &#x60;mlsId&#x60; field which should\nbe used to request that listing on this route.\n\nThe &#x60;mlsId&#x60; field is a unique identifier for a listing which\nis specific to the SimplyRETS API only. It is different from\nthe &#x60;listingId&#x60; field is the public number given to a listing\nby the MLS and is not used here.\n
121
- # @param mls_id The &#x60;mlsId&#x60; field is a unique identifier which is specific\nto the SimplyRETS API only. This field is different from\nthe &#x60;listingId&#x60; field (which is the public number given to\na listing by the MLS and is not used here).\n
122
- # @param [Hash] opts the optional parameters
123
- # @option opts [Array<String>] :include Include a extra fields which are not in the default\nresponse body\n- &#39;association&#39; includes additional HOA data\n- &#39;agreement&#39; information on the listing agreement\n- &#39;garageSpaces&#39; additional garage data\n- &#39;maintenanceExpense&#39; data on maintenance expenses\n- &#39;parking&#39; additional parking data\n- &#39;pool&#39; includes an additional pool description\n- &#39;rooms&#39; include parameter will include\n any additional rooms as a list.\n\nNote that your MLS must provide these fields in their RETS\ndata for them to be available with valid data in the API\nresponse. If your MLS does not offer these fields, they will\ncontain &#39;null&#39;.\n
124
- # @return [Listing]
125
- describe 'properties_mls_id_get test' do
126
- it "should work" do
127
- # assertion here
128
- # should be_a()
129
- # should be_nil
130
- # should ==
131
- # should_not ==
132
- end
133
- end
134
-
135
- end
@@ -1,135 +0,0 @@
1
- =begin
2
- SimplyRETS API
3
-
4
- The SimplyRETS API is an exciting step towards making it easier for\ndevelopers and real estate agents to build something awesome with\nreal estate data!\n\nThe documentation below makes live requests to our API using the\ntrial data. To get set up with the API using live MLS data, you\nmust have RETS credentials from your MLS, which you can then use to\ncreate an app with SimplyRETS. For more information on that\nprocess, please see our [FAQ](https://simplyrets.com/faq), [Getting\nStarted](https://simplyrets.com/blog/getting-set-up.html) page, or\n[contact us](https://simplyrets.com/\\#home-contact).\n\nBelow you'll find the API endpoints, query parameters, response bodies,\nand other information about using the SimplyRETS API. You can run\nqueries by clicking the 'Try it Out' button at the bottom of each\nsection.\n\n### Authentication\nThe SimplyRETS API uses Basic Authentication. When you create an\napp, you'll get a set of API credentials to access your\nlistings. If you're trying out the test data, you can use\n`simplyrets:simplyrets` for connecting to the API.\n\n### Media Types\nThe SimplyRETS API uses the 'Accept' header to allow clients to\ncontrol media types (content versions). We maintain backwards\ncompatibility with API clients by allowing them to specify a\ncontent version. We highly recommend setting and explicity media\ntype when your application reaches production. Both the structure\nand content of our API response bodies is subject to change so we\ncan add new features while respecting the stability of applications\nwhich have already been developed.\n\nTo always use the latest SimplyRETS content version, simply use\n`application/json` in your application `Accept` header.\n\nIf you want to pin your clients media type to a specific version,\nyou can use the vendor-specific SimplyRETS media type, e.g.\n`application/vnd.simplyrets-v0.1+json\"`\n\nTo view all valid content-types for making an `OPTIONS`, make a\nrequest to the SimplyRETS api root\n\n`curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/`\n\nThe default media types used in our API responses may change in the\nfuture. If you're building an application and care about the\nstability of the API, be sure to request a specific media type in the\nAccept header as shown in the examples below.\n\nThe wordpress plugin automatically sets the `Accept` header for the\ncompatible SimplyRETS media types.\n\n### Pagination\nThere a few pieces of useful information about each request stored\nin the HTTP Headers:\n\n- `X-Total-Count` shows you the total amount of listings that match\n your current query.\n- `Link` contains pre-built pagination links for accessing the next\n'page' of listings that match your query. Read more about that\n[here](https://simplyrets.com/blog/api-pagination.html).\n
5
-
6
- OpenAPI spec version: 1.0.0
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
-
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for SwaggerClient::DefaultApi
17
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
- # Please update as you see appropriate
19
- describe 'DefaultApi' do
20
- before do
21
- # run before each test
22
- @instance = SwaggerClient::DefaultApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of DefaultApi' do
30
- it 'should create an instact of DefaultApi' do
31
- @instance.should be_a(SwaggerClient::DefaultApi)
32
- end
33
- end
34
-
35
- # unit tests for openhouses_get
36
- # The SimplyRETS OpenHouses API
37
- # This is the main endpoint for accessing openhouses.\n
38
- # @param [Hash] opts the optional parameters
39
- # @option opts [String] :type Request listings by a specific property type. This\ndefaults to Residential, and you can only specify one type\nin a single query.\n
40
- # @option opts [String] :listing_id Request openhouses for a specific &#x60;listingId&#x60;.\n
41
- # @option opts [Array<String>] :cities Filter the openhouses returned by a list of valid cities. A\nlist of valid cities can be found by making an OPTIONS\nrequest to the &#x60;/openhouses&#x60; endpoint.\n
42
- # @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID.\nYou can specific multiple broker parameters. Note, the Broker\nID is provided by your MLS.\n
43
- # @option opts [String] :agent Filter the listings returned by an agent ID. Note, the\nAgent ID is provided by your MLS.\n
44
- # @option opts [Integer] :minprice Filter listings by a minimum price.\n
45
- # @option opts [DateTime] :startdate Scheduled date and time of the open house showing
46
- # @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter\nby the limit to go to the next \&quot;page\&quot; of listings. Also take\na look at the Link HTTP Header for pre-built pagination.\n
47
- # @option opts [Integer] :limit Set the number of listings to return in the response.\nThis defaults to 20 listings, and can be a maximum of 50.\nTo paginate through to the next page of listings, take a\nlook at the &#x60;offset&#x60; parameter, or the Link in the HTTP\nHeader.\n
48
- # @option opts [String] :sort Sort the response by a specific field. Values starting\nwith a minus (-) denote descending order, while the others\nare ascending.\n
49
- # @return [Array<OpenHouse>]
50
- describe 'openhouses_get test' do
51
- it "should work" do
52
- # assertion here
53
- # should be_a()
54
- # should be_nil
55
- # should ==
56
- # should_not ==
57
- end
58
- end
59
-
60
- # unit tests for openhouses_open_house_key_get
61
- # Single OpenHouse Endpoint
62
- # Use this endpoint for accessing a single OpenHouse.\n
63
- # @param open_house_key A unique OpenHouse identification key
64
- # @param [Hash] opts the optional parameters
65
- # @return [OpenHouse]
66
- describe 'openhouses_open_house_key_get test' do
67
- it "should work" do
68
- # assertion here
69
- # should be_a()
70
- # should be_nil
71
- # should ==
72
- # should_not ==
73
- end
74
- end
75
-
76
- # unit tests for properties_get
77
- # The SimplyRETS Listings API
78
- # This is the main endpoint for accessing your properties. View\nall of the available query parameters and make requests below!\nThe API uses Basic Authentication, which most HTTP libraries\nwill handle for you. To use the test data (which is what this\npages uses), you can use the api key &#x60;simplyrets&#x60; and secret\n&#x60;simplyrets&#x60;. Note that these test listings are not live MLS\nlistings but the data, query parameters, and response bodies\nwill all work the same.\n
79
- # @param [Hash] opts the optional parameters
80
- # @option opts [String] :q A textual keyword search. This parameter will search the following\nfields, when available:\n\n - listingId (This does _not_ search the &#39;mlsId&#39; field in the\nSimplyRETS response body)\n\n - street number\n\n - street name\n\n - mls area (major)\n\n - city\n\n - subdivision name\n\n - postal code\n\nNOTE\n
81
- # @option opts [Array<String>] :status Request listings by a specific status. This parameter\ndefaults to active and you can specify multiple statuses\nin a single query.\n\n\nListing statuses depend on your MLS&#39;s availability. Below is\na brief description of each status with possible synonyms which\nmay map to your MLS-specific statuses\n- *Active*: Active Listing which is still on the market\n- *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\n- *Pending*: An offer has been accepted and the listing is no longer on market. Synonyms: Offer Accepted, Under Contract\n- *Hold*: The listing has been withdrawn from the market, but a contract\n\n still exists between the seller and the listing member. Synonyms:\nHold, Hold Do Not Show, Temp Off Market\n- *Withdrawn*: The listing has been withdrawn from the market, but a contract\n\n still exists between the seller and the listing member. Synonyms:\nHold, Hold Do Not Show, Temp Off Market\n- *Closed*: The purchase agreement has been fulfilled or the lease\n\n agreement has been executed. Synonyms: Sold, Leased, Rented, Closed\nSale\n- *Expired*: The listing contract has expired\n- *Delete*: The listing contract was never valid or other reason for the contract to be nullified. Synonyms: Kill, Zap\n- *Incomplete*: The listing has not yet be completely entered and is not yet\n\n published in the MLS. Synonyms: Draft, Partially Complted\n\n- *ComingSoon*\n
82
- # @option opts [Array<String>] :type Request listings by a specific property type. This\ndefaults to Residential and Rental. You can specify\nmultiple property types in a single query.\n
83
- # @option opts [String] :agent Filter the listings returned by an agent ID. Note, the\nAgent ID is provided by your MLS.\n
84
- # @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker\nID. For some MLS areas, this is the ListOfficeId (Listing\nOffice ID). You can specific multiple broker\nparameters. Note, this query parameter is only available\nif a Broker ID is provided by your MLS.\n
85
- # @option opts [Integer] :minprice Filter listings by a minimum price.\n
86
- # @option opts [Integer] :maxprice Filter listings by a maximum price\n
87
- # @option opts [Integer] :minarea Filter listings by a minimum area size in Sq Ft.\n
88
- # @option opts [Integer] :maxarea Filter listings by a maximum area size in Sq Ft.\n
89
- # @option opts [Integer] :minbaths Filter listings by a minimum number of bathrooms.\n
90
- # @option opts [Integer] :maxbaths Filter listings by a maximum number of bathrooms.\n
91
- # @option opts [Integer] :minbeds Filter listings by a minimum number of bedrooms.\n
92
- # @option opts [Integer] :maxbeds Filter listings by a maximum number of bedrooms.\n
93
- # @option opts [Integer] :maxdom Filter listings by a maximum number of days on market.\n_Note that your MLS must provide Days on Market data._\n
94
- # @option opts [Integer] :minyear Filter listings by a setting a minimum year built.\n
95
- # @option opts [Integer] :limit Set the number of listings to return in the response.\nThis defaults to 20 listings, and can be a maximum of 50.\nTo paginate through to the next page of listings, take a\nlook at the &#x60;offset&#x60; parameter, or the Link in the HTTP\nHeader.\n
96
- # @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset\nparameter by the limit to go to the next \&quot;page\&quot; of\nlistings. Also take a look at the Link HTTP Header for\npre-built pagination.\n
97
- # @option opts [String] :vendor Used to specify the vendor (MLS) to search from. This\nparameter is required on multi-MLS apps, and you can only\nquery one vendor at a time. To get your vendor id&#39;s make\nan OPTIONS request to https://api.simplyrets.com.\n
98
- # @option opts [Array<String>] :postal_codes Filter the listings returned by postal codes / zip\ncode. You can specify multiple.\n
99
- # @option opts [Array<String>] :features Filter the listings by specific interior features. You\ncan filter by multiple. For example, to filter trial listings\nby multiple features you can use,\nReturn listings that are within a set of latitude\nlongitude coordinates. For example,\n\n\n&#x60;&#x60;&#x60;\nWet Bar\nHigh Ceiling\n&#x60;&#x60;&#x60;\n\n\ne.g. &#x60;https://simplyrets.com/services?features&#x3D;Wet%20Bar&amp;features&#x3D;High%20Ceiling&#x60;\n\n\nThe features provided by your MLS can be seen in your\nOPTIONS request. To view all valid features, make a\nrequest to the SimplyRETS api root\n\n\n&#x60;curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/&#x60;\n
100
- # @option opts [String] :water Query water/waterfront listings only. Specify &#39;true&#39; to\nfilter waterfront listings.\n
101
- # @option opts [Array<String>] :neighborhoods Filter the listings returned by specific neighborhoods and\nsubdivisions. You can specify multiple.\n
102
- # @option opts [Array<String>] :cities Filter the listings returned by specific cities. You can\nspecify multiple.\n
103
- # @option opts [Array<String>] :counties Filter the listings returned by specific counties. You can\nspecify multiple.\n
104
- # @option opts [Array<String>] :points Return listings that are within a set of latitude\nlongitude coordinates. For example;\n&#x60;&#x60;&#x60;\n29.723837,-95.69778\n29.938275,-95.69778\n29.938275,-95.32974\n29.723837,-95.32974\n&#x60;&#x60;&#x60;\nNote that some MLS&#39;s do not provide latitude and longitude\nfor their listings, which is required for this parameter\nto work. In these cases, SimplyRETS offers a [Geocoding\nAddon](https://simplyrets.com/services#geocoding).\n\n\nCheck out our\n[blog post](https://simplyrets.com/blog/interactive-map-search.html)\non using the &#x60;points&#x60; parameter to build a map-based app\nin javascript.\n
105
- # @option opts [Array<String>] :include Include a extra fields which are not in the default\nresponse body\n- &#39;association&#39; includes additional HOA data\n- &#39;agreement&#39; information on the listing agreement\n- &#39;garageSpaces&#39; additional garage data\n- &#39;maintenanceExpense&#39; data on maintenance expenses\n- &#39;parking&#39; additional parking data\n- &#39;pool&#39; includes an additional pool description\n- &#39;taxAnnualAmount&#39; include the annual tax amount\n- &#39;taxYear&#39; include the tax year data\n- &#39;rooms&#39; include parameter will include\n any additional rooms as a list.\n\nNote that your MLS must provide these fields in their RETS\ndata for them to be available in the API response.\n
106
- # @option opts [String] :sort Sort the response by a specific field. Values starting\nwith a minus (-) denote descending order, while the others\nare ascending.\n
107
- # @return [Array<Listing>]
108
- describe 'properties_get test' do
109
- it "should work" do
110
- # assertion here
111
- # should be_a()
112
- # should be_nil
113
- # should ==
114
- # should_not ==
115
- end
116
- end
117
-
118
- # unit tests for properties_mls_id_get
119
- # Single Listing Endpoint
120
- # Use this endpoint for accessing a single listing. When you\nmake a search to the &#x60;/properties&#x60; endpoint, each listing in\nthe response will contain a unique &#x60;mlsId&#x60; field which should\nbe used to request that listing on this route.\n\nThe &#x60;mlsId&#x60; field is a unique identifier for a listing which\nis specific to the SimplyRETS API only. It is different from\nthe &#x60;listingId&#x60; field is the public number given to a listing\nby the MLS and is not used here.\n
121
- # @param mls_id The &#x60;mlsId&#x60; field is a unique identifier which is specific\nto the SimplyRETS API only. This field is different from\nthe &#x60;listingId&#x60; field (which is the public number given to\na listing by the MLS and is not used here).\n
122
- # @param [Hash] opts the optional parameters
123
- # @option opts [Array<String>] :include Include a extra fields which are not in the default\nresponse body\n- &#39;association&#39; includes additional HOA data\n- &#39;agreement&#39; information on the listing agreement\n- &#39;garageSpaces&#39; additional garage data\n- &#39;maintenanceExpense&#39; data on maintenance expenses\n- &#39;parking&#39; additional parking data\n- &#39;pool&#39; includes an additional pool description\n- &#39;rooms&#39; include parameter will include\n any additional rooms as a list.\n\nNote that your MLS must provide these fields in their RETS\ndata for them to be available with valid data in the API\nresponse. If your MLS does not offer these fields, they will\ncontain &#39;null&#39;.\n
124
- # @return [Listing]
125
- describe 'properties_mls_id_get test' do
126
- it "should work" do
127
- # assertion here
128
- # should be_a()
129
- # should be_nil
130
- # should ==
131
- # should_not ==
132
- end
133
- end
134
-
135
- end