simplyrets 1.0.1 → 1.0.2

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: 92d924896e38ee9c642b6c07a5b3e33f1b4b0661
4
- data.tar.gz: 5af20581ab61cd4103420592e34102ddd12b059a
3
+ metadata.gz: e476249ff9e75a8fdb69d17d6a59bfa779338502
4
+ data.tar.gz: 0e72171c12978389bf5d6174a7260854c779cf79
5
5
  SHA512:
6
- metadata.gz: 6b0af83a68f95dcc80fb581e8b501733a8abf0cb8f29c93618a020d6f54a7eef2cb07a0f8d22fddc91cf3a75b65259c1e62bdc16077ea14da5b466cf3e0fe8b8
7
- data.tar.gz: f8bf2d56588badfeed6358a1d61a47509886f11b8fd6dea2816fed610220f0b8db193b8c5fbf39cd580b567b0de997fd3fe4e93a8defd084000dbadefc882051
6
+ metadata.gz: ba7a6cf6f7711edb9c79bec81ef7839ebe55bb0d79727b790025b81c138641518d81462a9113268762e1a98ed040604bb52a87209f4bd07fef2511a94c364518
7
+ data.tar.gz: fa1ef2c4578b0c9c815f9e4dadb36fcd352537c8db7743964571ebab2afe4a8bdc4cfc0a96d34124ac0d3754778d2752fa6ce717d275fab1b75f98f8a6c59f2d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simplyrets (1.0.1)
4
+ simplyrets (1.0.2)
5
5
  json (~> 1.4, >= 1.4.6)
6
6
  typhoeus (~> 0.2, >= 0.2.1)
7
7
 
data/example.rb CHANGED
@@ -12,8 +12,10 @@ SimplyRetsClient::SimplyRets.configure do |config|
12
12
  config.password = 'simplyrets'
13
13
  end
14
14
 
15
+ points = [ "29.723837146389066,-95.69778442382812", "29.938275329718987,-95.69778442382812", "29.938275329718987,-95.32974243164061", "29.723837146389066,-95.32974243164061" ]
16
+
15
17
  # Properties
16
- listings = SimplyRetsClient::Properties_api.properties({:minbeds => 2})
18
+ listings = SimplyRetsClient::Properties_api.properties({:minbeds => 2, :points => points})
17
19
  listings.each do |l|
18
20
  p l.property
19
21
  p l.property.bedrooms
@@ -211,3 +211,38 @@ module SimplyRetsClient
211
211
  end
212
212
  end
213
213
  end
214
+
215
+ # PATCH: array parameter rendering
216
+ #
217
+ # Typheous defaults to rendering array query parameters with
218
+ # an index:
219
+ #
220
+ # ?points[0]=23.232,-98.232&points[1]=23.232,-98.232
221
+ #
222
+ # The simplyrets api uses the form:
223
+ #
224
+ # ?points=23.232,-98.232&points=23.232,-98.232
225
+ #
226
+ # this monkey-patch removes the array index when the query
227
+ # parameter is rendered.
228
+ module Ethon
229
+ class Easy
230
+ module Queryable
231
+ private
232
+ def recursively_generate_pairs(h, prefix, pairs)
233
+ case h
234
+ when Hash
235
+ h.each_pair do |k,v|
236
+ key = prefix.nil? ? k : "#{prefix}"
237
+ pairs_for(v, key, pairs)
238
+ end
239
+ when Array
240
+ h.each_with_index do |v, i|
241
+ key = "#{prefix}"
242
+ pairs_for(v, key, pairs)
243
+ end
244
+ end
245
+ end
246
+ end
247
+ end
248
+ end
@@ -1,5 +1,5 @@
1
1
  module SimplyRetsClient
2
2
  module SimplyRets
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
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.1
4
+ version: 1.0.2
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-16 00:00:00.000000000 Z
12
+ date: 2015-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus
@@ -207,9 +207,7 @@ files:
207
207
  - Rakefile
208
208
  - example.rb
209
209
  - lib/simplyrets.rb
210
- - lib/simplyrets/#listing.rb#
211
210
  - lib/simplyrets/api/default_api.rb
212
- - lib/simplyrets/listing.rb~
213
211
  - lib/simplyrets/models/agent.rb
214
212
  - lib/simplyrets/models/base_object.rb
215
213
  - lib/simplyrets/models/broker.rb
@@ -217,7 +215,6 @@ files:
217
215
  - lib/simplyrets/models/error.rb
218
216
  - lib/simplyrets/models/geographic_data.rb
219
217
  - lib/simplyrets/models/listing.rb
220
- - lib/simplyrets/models/listing.rb~
221
218
  - lib/simplyrets/models/mls_information.rb
222
219
  - lib/simplyrets/models/office.rb
223
220
  - lib/simplyrets/models/open_house.rb
@@ -233,7 +230,6 @@ files:
233
230
  - lib/simplyrets/simplyrets/request.rb
234
231
  - lib/simplyrets/simplyrets/response.rb
235
232
  - lib/simplyrets/simplyrets/version.rb
236
- - simplyrets-1.0.0.gem
237
233
  - simplyrets.gemspec
238
234
  homepage: https://simplyrets.com
239
235
  licenses:
@@ -1,199 +0,0 @@
1
- module SwaggerClient
2
- #
3
- class Listing < BaseObject
4
- attr_accessor :property, :mls_id, :showing_instructions, :office, :disclaimer, :address, :list_date, :agent, :modified, :school, :sales, :photos, :list_price, :listing_id, :mls, :geo, :tax, :remarks, :private_remarks, :lease_term, :lease_type
5
- # attribute mapping from ruby-style variable name to JSON key
6
- def self.attribute_map
7
- {
8
-
9
- # Specific property data associated with listing.
10
- :'property' => :'property',
11
-
12
- # A unique identifier for this listing specific to the SimplyRETS API.\n
13
- :'mls_id' => :'mlsId',
14
-
15
- # Public instructions for showing the property.
16
- :'showing_instructions' => :'showingInstructions',
17
-
18
- # Listing office or brokerage.
19
- :'office' => :'office',
20
-
21
- # Data accuracy disclaimer. The value in the disclaimer may\nchange depending on your MLS vendors rules.\n
22
- :'disclaimer' => :'disclaimer',
23
-
24
- # Comprehensive property address information
25
- :'address' => :'address',
26
-
27
- # Date and time the listing became Active
28
- :'list_date' => :'listDate',
29
-
30
- # Comprehensive listing agent information
31
- :'agent' => :'agent',
32
-
33
- # Date and time of the last modification
34
- :'modified' => :'modified',
35
-
36
- # Comprehensive school zone data
37
- :'school' => :'school',
38
-
39
- # Sales data
40
- :'sales' => :'sales',
41
-
42
- # Photos of the property. Images are served over https and are\nsuitable for production use on secure websites\n
43
- :'photos' => :'photos',
44
-
45
- # Price of the listing
46
- :'list_price' => :'listPrice',
47
-
48
- # Data Dictionary v1.3 ListingId. The well known identifier\nfor the listing. The value may be identical to\nmlsId. However, listingId is intended to be the value used\nby a human to retrieve the information about a specific\nlisting.\n
49
- :'listing_id' => :'listingId',
50
-
51
- # MLS vendor information and data
52
- :'mls' => :'mls',
53
-
54
- # Geographic data for the listing
55
- :'geo' => :'geo',
56
-
57
- # Associate tax data
58
- :'tax' => :'tax',
59
-
60
- # Description or remarks
61
- :'remarks' => :'remarks',
62
-
63
- # Agent only remarks
64
- :'private_remarks' => :'privateRemarks',
65
-
66
- #
67
- :'lease_term' => :'leaseTerm',
68
-
69
- #
70
- :'lease_type' => :'leaseType'
71
-
72
- }
73
- end
74
-
75
- # attribute type
76
- def self.swagger_types
77
- {
78
- :'property' => :'Property',
79
- :'mls_id' => :'Integer',
80
- :'showing_instructions' => :'String',
81
- :'office' => :'Office',
82
- :'disclaimer' => :'String',
83
- :'address' => :'StreetAddress',
84
- :'list_date' => :'DateTime',
85
- :'agent' => :'Agent',
86
- :'modified' => :'DateTime',
87
- :'school' => :'School',
88
- :'sales' => :'Sales',
89
- :'photos' => :'Array<String>',
90
- :'list_price' => :'Float',
91
- :'listing_id' => :'String',
92
- :'mls' => :'MlsInformation',
93
- :'geo' => :'GeographicData',
94
- :'tax' => :'Tax',
95
- :'remarks' => :'String',
96
- :'private_remarks' => :'String',
97
- :'lease_term' => :'String',
98
- :'lease_type' => :'String'
99
-
100
- }
101
- end
102
-
103
- def initialize(attributes = {})
104
- return if !attributes.is_a?(Hash) || attributes.empty?
105
-
106
- # convert string to symbol for hash key
107
- attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
108
-
109
-
110
- if attributes[:'property']
111
- self.property = attributes[:'property']
112
- end
113
-
114
- if attributes[:'mlsId']
115
- self.mls_id = attributes[:'mlsId']
116
- end
117
-
118
- if attributes[:'showingInstructions']
119
- self.showing_instructions = attributes[:'showingInstructions']
120
- end
121
-
122
- if attributes[:'office']
123
- self.office = attributes[:'office']
124
- end
125
-
126
- if attributes[:'disclaimer']
127
- self.disclaimer = attributes[:'disclaimer']
128
- end
129
-
130
- if attributes[:'address']
131
- self.address = attributes[:'address']
132
- end
133
-
134
- if attributes[:'listDate']
135
- self.list_date = attributes[:'listDate']
136
- end
137
-
138
- if attributes[:'agent']
139
- self.agent = attributes[:'agent']
140
- end
141
-
142
- if attributes[:'modified']
143
- self.modified = attributes[:'modified']
144
- end
145
-
146
- if attributes[:'school']
147
- self.school = attributes[:'school']
148
- end
149
-
150
- if attributes[:'sales']
151
- self.sales = attributes[:'sales']
152
- end
153
-
154
- if attributes[:'photos']
155
- if (value = attributes[:'photos']).is_a?(Array)
156
- self.photos = value
157
- end
158
- end
159
-
160
- if attributes[:'listPrice']
161
- self.list_price = attributes[:'listPrice']
162
- end
163
-
164
- if attributes[:'listingId']
165
- self.listing_id = attributes[:'listingId']
166
- end
167
-
168
- if attributes[:'mls']
169
- self.mls = attributes[:'mls']
170
- end
171
-
172
- if attributes[:'geo']
173
- self.geo = attributes[:'geo']
174
- end
175
-
176
- if attributes[:'tax']
177
- self.tax = attributes[:'tax']
178
- end
179
-
180
- if attributes[:'remarks']
181
- self.remarks = attributes[:'remarks']
182
- end
183
-
184
- if attributes[:'privateRemarks']
185
- self.private_remarks = attributes[:'privateRemarks']
186
- end
187
-
188
- if attributes[:'leaseTerm']
189
- self.lease_term = attributes[:'leaseTerm']
190
- end
191
-
192
- if attributes[:'leaseType']
193
- self.lease_type = attributes[:'leaseType']
194
- end
195
-
196
- end
197
-
198
- end
199
- end
@@ -1,199 +0,0 @@
1
- module SwaggerClient
2
- #
3
- class Listing < BaseObject
4
- attr_accessor :property, :mls_id, :showing_instructions, :office, :disclaimer, :address, :list_date, :agent, :modified, :school, :sales, :photos, :list_price, :listing_id, :mls, :geo, :tax, :remarks, :private_remarks, :lease_term, :lease_type
5
- # attribute mapping from ruby-style variable name to JSON key
6
- def self.attribute_map
7
- {
8
-
9
- # Specific property data associated with listing.
10
- :'property' => :'property',
11
-
12
- # A unique identifier for this listing specific to the SimplyRETS API.\n
13
- :'mls_id' => :'mlsId',
14
-
15
- # Public instructions for showing the property.
16
- :'showing_instructions' => :'showingInstructions',
17
-
18
- # Listing office or brokerage.
19
- :'office' => :'office',
20
-
21
- # Data accuracy disclaimer. The value in the disclaimer may\nchange depending on your MLS vendors rules.\n
22
- :'disclaimer' => :'disclaimer',
23
-
24
- # Comprehensive property address information
25
- :'address' => :'address',
26
-
27
- # Date and time the listing became Active
28
- :'list_date' => :'listDate',
29
-
30
- # Comprehensive listing agent information
31
- :'agent' => :'agent',
32
-
33
- # Date and time of the last modification
34
- :'modified' => :'modified',
35
-
36
- # Comprehensive school zone data
37
- :'school' => :'school',
38
-
39
- # Sales data
40
- :'sales' => :'sales',
41
-
42
- # Photos of the property. Images are served over https and are\nsuitable for production use on secure websites\n
43
- :'photos' => :'photos',
44
-
45
- # Price of the listing
46
- :'list_price' => :'listPrice',
47
-
48
- # Data Dictionary v1.3 ListingId. The well known identifier\nfor the listing. The value may be identical to\nmlsId. However, listingId is intended to be the value used\nby a human to retrieve the information about a specific\nlisting.\n
49
- :'listing_id' => :'listingId',
50
-
51
- # MLS vendor information and data
52
- :'mls' => :'mls',
53
-
54
- # Geographic data for the listing
55
- :'geo' => :'geo',
56
-
57
- # Associate tax data
58
- :'tax' => :'tax',
59
-
60
- # Description or remarks
61
- :'remarks' => :'remarks',
62
-
63
- # Agent only remarks
64
- :'private_remarks' => :'privateRemarks',
65
-
66
- #
67
- :'lease_term' => :'leaseTerm',
68
-
69
- #
70
- :'lease_type' => :'leaseType'
71
-
72
- }
73
- end
74
-
75
- # attribute type
76
- def self.swagger_types
77
- {
78
- :'property' => :'Property',
79
- :'mls_id' => :'Integer',
80
- :'showing_instructions' => :'String',
81
- :'office' => :'Office',
82
- :'disclaimer' => :'String',
83
- :'address' => :'StreetAddress',
84
- :'list_date' => :'DateTime',
85
- :'agent' => :'Agent',
86
- :'modified' => :'DateTime',
87
- :'school' => :'School',
88
- :'sales' => :'Sales',
89
- :'photos' => :'Array<String>',
90
- :'list_price' => :'Float',
91
- :'listing_id' => :'String',
92
- :'mls' => :'MlsInformation',
93
- :'geo' => :'GeographicData',
94
- :'tax' => :'Tax',
95
- :'remarks' => :'String',
96
- :'private_remarks' => :'String',
97
- :'lease_term' => :'String',
98
- :'lease_type' => :'String'
99
-
100
- }
101
- end
102
-
103
- def initialize(attributes = {})
104
- return if !attributes.is_a?(Hash) || attributes.empty?
105
-
106
- # convert string to symbol for hash key
107
- attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
108
-
109
-
110
- if attributes[:'property']
111
- self.property = attributes[:'property']
112
- end
113
-
114
- if attributes[:'mlsId']
115
- self.mls_id = attributes[:'mlsId']
116
- end
117
-
118
- if attributes[:'showingInstructions']
119
- self.showing_instructions = attributes[:'showingInstructions']
120
- end
121
-
122
- if attributes[:'office']
123
- self.office = attributes[:'office']
124
- end
125
-
126
- if attributes[:'disclaimer']
127
- self.disclaimer = attributes[:'disclaimer']
128
- end
129
-
130
- if attributes[:'address']
131
- self.address = attributes[:'address']
132
- end
133
-
134
- if attributes[:'listDate']
135
- self.list_date = attributes[:'listDate']
136
- end
137
-
138
- if attributes[:'agent']
139
- self.agent = attributes[:'agent']
140
- end
141
-
142
- if attributes[:'modified']
143
- self.modified = attributes[:'modified']
144
- end
145
-
146
- if attributes[:'school']
147
- self.school = attributes[:'school']
148
- end
149
-
150
- if attributes[:'sales']
151
- self.sales = attributes[:'sales']
152
- end
153
-
154
- if attributes[:'photos']
155
- if (value = attributes[:'photos']).is_a?(Array)
156
- self.photos = value
157
- end
158
- end
159
-
160
- if attributes[:'listPrice']
161
- self.list_price = attributes[:'listPrice']
162
- end
163
-
164
- if attributes[:'listingId']
165
- self.listing_id = attributes[:'listingId']
166
- end
167
-
168
- if attributes[:'mls']
169
- self.mls = attributes[:'mls']
170
- end
171
-
172
- if attributes[:'geo']
173
- self.geo = attributes[:'geo']
174
- end
175
-
176
- if attributes[:'tax']
177
- self.tax = attributes[:'tax']
178
- end
179
-
180
- if attributes[:'remarks']
181
- self.remarks = attributes[:'remarks']
182
- end
183
-
184
- if attributes[:'privateRemarks']
185
- self.private_remarks = attributes[:'privateRemarks']
186
- end
187
-
188
- if attributes[:'leaseTerm']
189
- self.lease_term = attributes[:'leaseTerm']
190
- end
191
-
192
- if attributes[:'leaseType']
193
- self.lease_type = attributes[:'leaseType']
194
- end
195
-
196
- end
197
-
198
- end
199
- end
@@ -1,199 +0,0 @@
1
- module SwaggerClient
2
- #
3
- class Listing < BaseObject
4
- attr_accessor :property, :mls_id, :showing_instructions, :office, :disclaimer, :address, :list_date, :agent, :modified, :school, :sales, :photos, :list_price, :listing_id, :mls, :geo, :tax, :remarks, :private_remarks, :lease_term, :lease_type
5
- # attribute mapping from ruby-style variable name to JSON key
6
- def self.attribute_map
7
- {
8
-
9
- # Specific property data associated with listing.
10
- :'property' => :'property',
11
-
12
- # A unique identifier for this listing specific to the SimplyRETS API.\n
13
- :'mls_id' => :'mlsId',
14
-
15
- # Public instructions for showing the property.
16
- :'showing_instructions' => :'showingInstructions',
17
-
18
- # Listing office or brokerage.
19
- :'office' => :'office',
20
-
21
- # Data accuracy disclaimer. The value in the disclaimer may\nchange depending on your MLS vendors rules.\n
22
- :'disclaimer' => :'disclaimer',
23
-
24
- # Comprehensive property address information
25
- :'address' => :'address',
26
-
27
- # Date and time the listing became Active
28
- :'list_date' => :'listDate',
29
-
30
- # Comprehensive listing agent information
31
- :'agent' => :'agent',
32
-
33
- # Date and time of the last modification
34
- :'modified' => :'modified',
35
-
36
- # Comprehensive school zone data
37
- :'school' => :'school',
38
-
39
- # Sales data
40
- :'sales' => :'sales',
41
-
42
- # Photos of the property. Images are served over https and are\nsuitable for production use on secure websites\n
43
- :'photos' => :'photos',
44
-
45
- # Price of the listing
46
- :'list_price' => :'listPrice',
47
-
48
- # Data Dictionary v1.3 ListingId. The well known identifier\nfor the listing. The value may be identical to\nmlsId. However, listingId is intended to be the value used\nby a human to retrieve the information about a specific\nlisting.\n
49
- :'listing_id' => :'listingId',
50
-
51
- # MLS vendor information and data
52
- :'mls' => :'mls',
53
-
54
- # Geographic data for the listing
55
- :'geo' => :'geo',
56
-
57
- # Associate tax data
58
- :'tax' => :'tax',
59
-
60
- # Description or remarks
61
- :'remarks' => :'remarks',
62
-
63
- # Agent only remarks
64
- :'private_remarks' => :'privateRemarks',
65
-
66
- #
67
- :'lease_term' => :'leaseTerm',
68
-
69
- #
70
- :'lease_type' => :'leaseType'
71
-
72
- }
73
- end
74
-
75
- # attribute type
76
- def self.swagger_types
77
- {
78
- :'property' => :'Property',
79
- :'mls_id' => :'Integer',
80
- :'showing_instructions' => :'String',
81
- :'office' => :'Office',
82
- :'disclaimer' => :'String',
83
- :'address' => :'StreetAddress',
84
- :'list_date' => :'DateTime',
85
- :'agent' => :'Agent',
86
- :'modified' => :'DateTime',
87
- :'school' => :'School',
88
- :'sales' => :'Sales',
89
- :'photos' => :'Array<String>',
90
- :'list_price' => :'Float',
91
- :'listing_id' => :'String',
92
- :'mls' => :'MlsInformation',
93
- :'geo' => :'GeographicData',
94
- :'tax' => :'Tax',
95
- :'remarks' => :'String',
96
- :'private_remarks' => :'String',
97
- :'lease_term' => :'String',
98
- :'lease_type' => :'String'
99
-
100
- }
101
- end
102
-
103
- def initialize(attributes = {})
104
- return if !attributes.is_a?(Hash) || attributes.empty?
105
-
106
- # convert string to symbol for hash key
107
- attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
108
-
109
-
110
- if attributes[:'property']
111
- self.property = attributes[:'property']
112
- end
113
-
114
- if attributes[:'mlsId']
115
- self.mls_id = attributes[:'mlsId']
116
- end
117
-
118
- if attributes[:'showingInstructions']
119
- self.showing_instructions = attributes[:'showingInstructions']
120
- end
121
-
122
- if attributes[:'office']
123
- self.office = attributes[:'office']
124
- end
125
-
126
- if attributes[:'disclaimer']
127
- self.disclaimer = attributes[:'disclaimer']
128
- end
129
-
130
- if attributes[:'address']
131
- self.address = attributes[:'address']
132
- end
133
-
134
- if attributes[:'listDate']
135
- self.list_date = attributes[:'listDate']
136
- end
137
-
138
- if attributes[:'agent']
139
- self.agent = attributes[:'agent']
140
- end
141
-
142
- if attributes[:'modified']
143
- self.modified = attributes[:'modified']
144
- end
145
-
146
- if attributes[:'school']
147
- self.school = attributes[:'school']
148
- end
149
-
150
- if attributes[:'sales']
151
- self.sales = attributes[:'sales']
152
- end
153
-
154
- if attributes[:'photos']
155
- if (value = attributes[:'photos']).is_a?(Array)
156
- self.photos = value
157
- end
158
- end
159
-
160
- if attributes[:'listPrice']
161
- self.list_price = attributes[:'listPrice']
162
- end
163
-
164
- if attributes[:'listingId']
165
- self.listing_id = attributes[:'listingId']
166
- end
167
-
168
- if attributes[:'mls']
169
- self.mls = attributes[:'mls']
170
- end
171
-
172
- if attributes[:'geo']
173
- self.geo = attributes[:'geo']
174
- end
175
-
176
- if attributes[:'tax']
177
- self.tax = attributes[:'tax']
178
- end
179
-
180
- if attributes[:'remarks']
181
- self.remarks = attributes[:'remarks']
182
- end
183
-
184
- if attributes[:'privateRemarks']
185
- self.private_remarks = attributes[:'privateRemarks']
186
- end
187
-
188
- if attributes[:'leaseTerm']
189
- self.lease_term = attributes[:'leaseTerm']
190
- end
191
-
192
- if attributes[:'leaseType']
193
- self.lease_type = attributes[:'leaseType']
194
- end
195
-
196
- end
197
-
198
- end
199
- end
Binary file