simplyrets 1.0.2 → 1.0.3

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: e476249ff9e75a8fdb69d17d6a59bfa779338502
4
- data.tar.gz: 0e72171c12978389bf5d6174a7260854c779cf79
3
+ metadata.gz: 93ec85d788d5afa4cb7882500cb7edd7e5585a7a
4
+ data.tar.gz: b6a0e73a97a123a3f0b55da80e424a1d9505e535
5
5
  SHA512:
6
- metadata.gz: ba7a6cf6f7711edb9c79bec81ef7839ebe55bb0d79727b790025b81c138641518d81462a9113268762e1a98ed040604bb52a87209f4bd07fef2511a94c364518
7
- data.tar.gz: fa1ef2c4578b0c9c815f9e4dadb36fcd352537c8db7743964571ebab2afe4a8bdc4cfc0a96d34124ac0d3754778d2752fa6ce717d275fab1b75f98f8a6c59f2d
6
+ metadata.gz: 153ed4e9d7d868b34e44b52ad3abbf8cd3781266acaa4c31d753299ec5cba373da1b9cd6e4698e9e64c58624753cdee9def9dc606c72fc6c20d9955dc751a79c
7
+ data.tar.gz: 79565c4fcc0e3e209243b845783f1aee854b955314574e13b739f8ca657af928f347474129e681d3c805c47ff4ddb1f06f495c819598824c4fc367b6f03a8fb6
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simplyrets (1.0.2)
4
+ simplyrets (1.0.3)
5
5
  json (~> 1.4, >= 1.4.6)
6
6
  typhoeus (~> 0.2, >= 0.2.1)
7
7
 
@@ -24,7 +24,7 @@ module SimplyRetsClient
24
24
  # @option opts [Array<String>] :neighborhoods Filter the listings returned by specific neighborhoods and\nsubdivisions. You can specify multiple.\n
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
- # @option opts [String] :status Request listings by a specific status. This defaults to\nactive and you can only specify one status in a single\nquery.\n
27
+ # @option opts [Array<String>] :status Filter the listings returned by a specific status. You can\nspecify multiple.\n
28
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
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
@@ -34,11 +34,7 @@ module SimplyRetsClient
34
34
  SimplyRets.logger.debug "Calling API: DefaultApi#properties ..."
35
35
  end
36
36
 
37
- if opts[:'status'] && !['Active', 'Pending', 'Closed'].include?(opts[:'status'])
38
- fail 'invalid value for "status", must be one of Active, Pending, Closed'
39
- end
40
-
41
- if opts[:'type'] && !['Residential', 'Rential', 'Multifamily', 'Condominium', 'Commercial', 'Land'].include?(opts[:'type'])
37
+ if opts[:'type'] && !['Residential', 'Rental', 'Multifamily', 'Condominium', 'Commercial', 'Land'].include?(opts[:'type'])
42
38
  fail 'invalid value for "type", must be one of Residential, Rential, Multifamily, Condominium, Commercial, Land'
43
39
  end
44
40
 
@@ -0,0 +1,150 @@
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 \&quot;page\&quot; 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 one type\nin 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[:'type'] && !['Residential', 'Rential', '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
+ if opts[:'sort'] && !['listprice', '-listprice', 'listdate', '-listdate', 'beds', '-beds', 'baths', '-baths'].include?(opts[:'sort'])
42
+ fail 'invalid value for "sort", must be one of listprice, -listprice, listdate, -listdate, beds, -beds, baths, -baths'
43
+ end
44
+
45
+ if opts[:'include'] && !['pool', 'rooms', 'association'].include?(opts[:'include'])
46
+ fail 'invalid value for "include", must be one of pool, rooms, association'
47
+ end
48
+
49
+ # resource path
50
+ path = "/properties".sub('{format}','json')
51
+
52
+ # query parameters
53
+ query_params = {}
54
+ query_params[:'q'] = opts[:'q'] if opts[:'q']
55
+ query_params[:'minprice'] = opts[:'minprice'] if opts[:'minprice']
56
+ query_params[:'maxprice'] = opts[:'maxprice'] if opts[:'maxprice']
57
+ query_params[:'agent'] = opts[:'agent'] if opts[:'agent']
58
+ query_params[:'minarea'] = opts[:'minarea'] if opts[:'minarea']
59
+ query_params[:'maxarea'] = opts[:'maxarea'] if opts[:'maxarea']
60
+ query_params[:'minbaths'] = opts[:'minbaths'] if opts[:'minbaths']
61
+ query_params[:'maxbaths'] = opts[:'maxbaths'] if opts[:'maxbaths']
62
+ query_params[:'minbeds'] = opts[:'minbeds'] if opts[:'minbeds']
63
+ query_params[:'maxbeds'] = opts[:'maxbeds'] if opts[:'maxbeds']
64
+ query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
65
+ query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
66
+ query_params[:'brokers'] = opts[:'brokers'] if opts[:'brokers']
67
+ query_params[:'features'] = opts[:'features'] if opts[:'features']
68
+ query_params[:'amenities'] = opts[:'amenities'] if opts[:'amenities']
69
+ query_params[:'neighborhoods'] = opts[:'neighborhoods'] if opts[:'neighborhoods']
70
+ query_params[:'points'] = opts[:'points'] if opts[:'points']
71
+ query_params[:'counties'] = opts[:'counties'] if opts[:'counties']
72
+ query_params[:'status'] = opts[:'status'] if opts[:'status']
73
+ query_params[:'type'] = opts[:'type'] if opts[:'type']
74
+ query_params[:'sort'] = opts[:'sort'] if opts[:'sort']
75
+ query_params[:'include'] = opts[:'include'] if opts[:'include']
76
+
77
+ # header parameters
78
+ header_params = {}
79
+
80
+ # HTTP header 'Accept' (if needed)
81
+ _header_accept = []
82
+ _header_accept_result = SimplyRets::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
83
+
84
+ # HTTP header 'Content-Type'
85
+ _header_content_type = []
86
+ header_params['Content-Type'] = SimplyRets::Request.select_header_content_type(_header_content_type)
87
+
88
+ # form parameters
89
+ form_params = {}
90
+
91
+ # http body (model)
92
+ post_body = nil
93
+
94
+
95
+ auth_names = ['basicAuth']
96
+ response = SimplyRets::Request.new(:GET, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names}).make
97
+ result = response.deserialize('Array<Listing>')
98
+ if SimplyRets.configuration.debug
99
+ SimplyRets.logger.debug "API called: DefaultApi#properties. Result: #{result.inspect}"
100
+ end
101
+ result
102
+ end
103
+
104
+ # Single Listing Endpoint
105
+ # Use this endpoint for accessing a single listing.\n
106
+ # @param listing_id A listings listingId (unique indentifier).
107
+ # @param [Hash] opts the optional parameters
108
+ # @return [Listing]
109
+ def self.property(listing_id, opts = {})
110
+ if SimplyRets.configuration.debug
111
+ SimplyRets.logger.debug "Calling API: DefaultApi#property ..."
112
+ end
113
+
114
+ # verify the required parameter 'listing_id' is set
115
+ fail "Missing the required parameter 'listing_id' when calling property" if listing_id.nil?
116
+
117
+ # resource path
118
+ path = "/properties/{listingId}".sub('{format}','json').sub('{' + 'listingId' + '}', listing_id.to_s)
119
+
120
+ # query parameters
121
+ query_params = {}
122
+
123
+ # header parameters
124
+ header_params = {}
125
+
126
+ # HTTP header 'Accept' (if needed)
127
+ _header_accept = []
128
+ _header_accept_result = SimplyRets::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
129
+
130
+ # HTTP header 'Content-Type'
131
+ _header_content_type = []
132
+ header_params['Content-Type'] = SimplyRets::Request.select_header_content_type(_header_content_type)
133
+
134
+ # form parameters
135
+ form_params = {}
136
+
137
+ # http body (model)
138
+ post_body = nil
139
+
140
+
141
+ auth_names = ['basicAuth']
142
+ response = SimplyRets::Request.new(:GET, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => auth_names}).make
143
+ result = response.deserialize('Listing')
144
+ if SimplyRets.configuration.debug
145
+ SimplyRets.logger.debug "API called: DefaultApi#property. Result: #{result.inspect}"
146
+ end
147
+ result
148
+ end
149
+ end
150
+ end
@@ -1,5 +1,5 @@
1
1
  module SimplyRetsClient
2
2
  module SimplyRets
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
5
5
  end
@@ -0,0 +1,5 @@
1
+ module SimplyRetsClient
2
+ module SimplyRets
3
+ VERSION = "1.0.2"
4
+ end
5
+ end
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.2
4
+ version: 1.0.3
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: 2015-09-20 00:00:00.000000000 Z
12
+ date: 2015-09-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus
@@ -207,7 +207,9 @@ files:
207
207
  - Rakefile
208
208
  - example.rb
209
209
  - lib/simplyrets.rb
210
+ - lib/simplyrets/api/.default_api.rb.un~
210
211
  - lib/simplyrets/api/default_api.rb
212
+ - lib/simplyrets/api/default_api.rb~
211
213
  - lib/simplyrets/models/agent.rb
212
214
  - lib/simplyrets/models/base_object.rb
213
215
  - lib/simplyrets/models/broker.rb
@@ -225,11 +227,13 @@ files:
225
227
  - lib/simplyrets/models/street_address.rb
226
228
  - lib/simplyrets/models/tax.rb
227
229
  - lib/simplyrets/simplyrets.rb
230
+ - lib/simplyrets/simplyrets/.version.rb.un~
228
231
  - lib/simplyrets/simplyrets/api_error.rb
229
232
  - lib/simplyrets/simplyrets/configuration.rb
230
233
  - lib/simplyrets/simplyrets/request.rb
231
234
  - lib/simplyrets/simplyrets/response.rb
232
235
  - lib/simplyrets/simplyrets/version.rb
236
+ - lib/simplyrets/simplyrets/version.rb~
233
237
  - simplyrets.gemspec
234
238
  homepage: https://simplyrets.com
235
239
  licenses: