flexmls_api 0.6.5 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. data/History.txt +12 -1
  2. data/VERSION +1 -1
  3. data/lib/flexmls_api.rb +13 -11
  4. data/lib/flexmls_api/authentication/api_auth.rb +5 -3
  5. data/lib/flexmls_api/authentication/oauth2.rb +23 -17
  6. data/lib/flexmls_api/authentication/oauth2_impl/password_provider.rb +25 -0
  7. data/lib/flexmls_api/cli.rb +51 -25
  8. data/lib/flexmls_api/cli/oauth2.rb +1 -30
  9. data/lib/flexmls_api/cli/setup.rb +4 -1
  10. data/lib/flexmls_api/client.rb +1 -1
  11. data/lib/flexmls_api/configuration.rb +10 -0
  12. data/lib/flexmls_api/configuration/yaml.rb +81 -0
  13. data/lib/flexmls_api/faraday.rb +12 -2
  14. data/lib/flexmls_api/models.rb +25 -23
  15. data/lib/flexmls_api/models/constraint.rb +16 -0
  16. data/lib/flexmls_api/models/listing.rb +45 -2
  17. data/lib/flexmls_api/models/photo.rb +57 -2
  18. data/lib/flexmls_api/models/subresource.rb +5 -2
  19. data/lib/flexmls_api/multi_client.rb +21 -6
  20. data/lib/flexmls_api/paginate.rb +18 -1
  21. data/lib/flexmls_api/request.rb +1 -71
  22. data/lib/flexmls_api/response.rb +69 -0
  23. data/spec/fixtures/{contacts.json → contacts/contacts.json} +0 -0
  24. data/spec/fixtures/{contact_my.json → contacts/my.json} +0 -0
  25. data/spec/fixtures/{contact_new.json → contacts/new.json} +0 -0
  26. data/spec/fixtures/{contact_new_empty.json → contacts/new_empty.json} +0 -0
  27. data/spec/fixtures/{contact_new_notify.json → contacts/new_notify.json} +0 -0
  28. data/spec/fixtures/{contacts_post.json → contacts/post.json} +0 -0
  29. data/spec/fixtures/{contact_tags.json → contacts/tags.json} +0 -0
  30. data/spec/fixtures/{listing_cart_add_listing.json → listing_carts/add_listing.json} +0 -0
  31. data/spec/fixtures/{listing_cart_add_listing_post.json → listing_carts/add_listing_post.json} +0 -0
  32. data/spec/fixtures/{listing_cart_empty.json → listing_carts/empty.json} +0 -0
  33. data/spec/fixtures/{listing_cart.json → listing_carts/listing_cart.json} +0 -0
  34. data/spec/fixtures/{listing_cart_new.json → listing_carts/new.json} +0 -0
  35. data/spec/fixtures/{listing_cart_post.json → listing_carts/post.json} +0 -0
  36. data/spec/fixtures/{listing_cart_remove_listing.json → listing_carts/remove_listing.json} +0 -0
  37. data/spec/fixtures/listings/constraints.json +18 -0
  38. data/spec/fixtures/listings/constraints_with_pagination.json +24 -0
  39. data/spec/fixtures/{listing_document_index.json → listings/document_index.json} +0 -0
  40. data/spec/fixtures/{listing_no_subresources.json → listings/no_subresources.json} +0 -0
  41. data/spec/fixtures/{open_houses.json → listings/open_houses.json} +0 -0
  42. data/spec/fixtures/{listing_photos_index.json → listings/photos/index.json} +0 -0
  43. data/spec/fixtures/listings/photos/new.json +12 -0
  44. data/spec/fixtures/listings/photos/post.json +20 -0
  45. data/spec/fixtures/listings/put.json +5 -0
  46. data/spec/fixtures/{saved_search.json → listings/saved_search.json} +0 -0
  47. data/spec/fixtures/{shared_listing_new.json → listings/shared_listing_new.json} +0 -0
  48. data/spec/fixtures/{shared_listing_post.json → listings/shared_listing_post.json} +0 -0
  49. data/spec/fixtures/{tour_of_homes.json → listings/tour_of_homes.json} +0 -0
  50. data/spec/fixtures/{listing_videos_index.json → listings/videos_index.json} +0 -0
  51. data/spec/fixtures/{listing_virtual_tours_index.json → listings/virtual_tours_index.json} +0 -0
  52. data/spec/fixtures/{listing_with_documents.json → listings/with_documents.json} +0 -0
  53. data/spec/fixtures/listings/with_permissions.json +44 -0
  54. data/spec/fixtures/{listing_with_photos.json → listings/with_photos.json} +0 -0
  55. data/spec/fixtures/{listing_with_supplement.json → listings/with_supplement.json} +0 -0
  56. data/spec/fixtures/{listing_with_videos.json → listings/with_videos.json} +0 -0
  57. data/spec/fixtures/{listing_with_vtour.json → listings/with_vtour.json} +0 -0
  58. data/spec/fixtures/logo_fbs.png +0 -0
  59. data/spec/fixtures/{add_note.json → notes/add.json} +0 -0
  60. data/spec/fixtures/{agent_shared_note.json → notes/agent_shared.json} +0 -0
  61. data/spec/fixtures/{agent_shared_note_empty.json → notes/agent_shared_empty.json} +0 -0
  62. data/spec/fixtures/{note_new.json → notes/new.json} +0 -0
  63. data/spec/fixtures/{standardfields_city.json → standardfields/city.json} +0 -0
  64. data/spec/fixtures/{standardfields_nearby.json → standardfields/nearby.json} +0 -0
  65. data/spec/fixtures/{standardfields.json → standardfields/standardfields.json} +0 -0
  66. data/spec/fixtures/{standardfields_stateorprovince.json → standardfields/stateorprovince.json} +0 -0
  67. data/spec/mock_helper.rb +5 -3
  68. data/spec/unit/flexmls_api/authentication/api_auth_spec.rb +11 -2
  69. data/spec/unit/flexmls_api/authentication/base_auth_spec.rb +10 -0
  70. data/spec/unit/flexmls_api/authentication/oauth2_spec.rb +3 -3
  71. data/spec/unit/flexmls_api/configuration/yaml_spec.rb +70 -0
  72. data/spec/unit/flexmls_api/models/constraint_spec.rb +19 -0
  73. data/spec/unit/flexmls_api/models/contact_spec.rb +8 -8
  74. data/spec/unit/flexmls_api/models/document_spec.rb +1 -1
  75. data/spec/unit/flexmls_api/models/listing_cart_spec.rb +15 -15
  76. data/spec/unit/flexmls_api/models/listing_spec.rb +78 -13
  77. data/spec/unit/flexmls_api/models/note_spec.rb +4 -4
  78. data/spec/unit/flexmls_api/models/open_house_spec.rb +1 -1
  79. data/spec/unit/flexmls_api/models/photo_spec.rb +73 -40
  80. data/spec/unit/flexmls_api/models/saved_search_spec.rb +3 -3
  81. data/spec/unit/flexmls_api/models/shared_listing_spec.rb +1 -1
  82. data/spec/unit/flexmls_api/models/standard_fields_spec.rb +4 -7
  83. data/spec/unit/flexmls_api/models/tour_of_home_spec.rb +1 -1
  84. data/spec/unit/flexmls_api/models/video_spec.rb +1 -1
  85. data/spec/unit/flexmls_api/models/virtual_tour_spec.rb +1 -1
  86. data/spec/unit/flexmls_api/multi_client_spec.rb +9 -1
  87. data/spec/unit/flexmls_api/paginate_spec.rb +1 -1
  88. data/spec/unit/flexmls_api/request_spec.rb +2 -2
  89. metadata +182 -152
@@ -9,7 +9,7 @@ describe SavedSearch do
9
9
  let(:id){ "20100815220615294367000000" }
10
10
 
11
11
  it "should get all SavedSearches" do
12
- stub_api_get("/#{subject.class.element_name}", 'saved_search.json')
12
+ stub_api_get("/#{subject.class.element_name}", 'listings/saved_search.json')
13
13
  resources = subject.class.get
14
14
  resources.should be_an(Array)
15
15
  resources.length.should eq(2)
@@ -17,14 +17,14 @@ describe SavedSearch do
17
17
  end
18
18
 
19
19
  it "should get a SavedSearch" do
20
- stub_api_get("/#{subject.class.element_name}/#{id}", 'saved_search.json')
20
+ stub_api_get("/#{subject.class.element_name}/#{id}", 'listings/saved_search.json')
21
21
  resource = subject.class.find(id)
22
22
  resource.Id.should eq(id)
23
23
  resource.Name.should eq("Search name here")
24
24
  end
25
25
 
26
26
  it "should get provided SavedSearches" do
27
- stub_api_get("/provided/#{subject.class.element_name}", 'saved_search.json')
27
+ stub_api_get("/provided/#{subject.class.element_name}", 'listings/saved_search.json')
28
28
  resources = subject.class.provided.get
29
29
  resources.should be_an(Array)
30
30
  resources.length.should eq(2)
@@ -11,7 +11,7 @@ describe SharedListing do
11
11
  end
12
12
 
13
13
  it "should save shared listings" do
14
- stub_api_post("/#{subject.class.element_name}", 'shared_listing_new.json', 'shared_listing_post.json')
14
+ stub_api_post("/#{subject.class.element_name}", 'listings/shared_listing_new.json', 'listings/shared_listing_post.json')
15
15
  subject.ListingIds = ["20110224152431857619000000","20110125122333785431000000"]
16
16
  subject.ViewId = "20080125122333787615000000"
17
17
  subject.save.should be(true)
@@ -6,23 +6,21 @@ describe StandardFields do
6
6
  stub_auth_request
7
7
  end
8
8
 
9
-
10
9
  it "should respond to get" do
11
10
  StandardFields.should respond_to(:get)
12
11
  end
13
12
 
14
-
15
13
  it "should find and expand all" do
16
14
  StandardFields.should respond_to(:find_and_expand_all)
17
15
 
18
16
  # stub request to standardFields
19
- stub_api_get('/standardfields','standardfields.json')
17
+ stub_api_get('/standardfields','standardfields/standardfields.json')
20
18
 
21
19
  # stub request for City
22
- stub_api_get('/standardfields/City','standardfields_city.json')
20
+ stub_api_get('/standardfields/City','standardfields/city.json')
23
21
 
24
22
  # stub request for StateOrProvince
25
- stub_api_get('/standardfields/StateOrProvince','standardfields_stateorprovince.json')
23
+ stub_api_get('/standardfields/StateOrProvince','standardfields/stateorprovince.json')
26
24
 
27
25
  # request
28
26
  fields = StandardFields.find_and_expand_all(["City","StateOrProvince"])
@@ -38,12 +36,11 @@ describe StandardFields do
38
36
 
39
37
  end
40
38
 
41
-
42
39
  it "should find nearby fields" do
43
40
  StandardFields.should respond_to(:find_nearby)
44
41
 
45
42
  # stub request
46
- stub_api_get('/standardfields/nearby/A','standardfields_nearby.json',
43
+ stub_api_get('/standardfields/nearby/A','standardfields/nearby.json',
47
44
  :Lat => "50",
48
45
  :Lon => "-92",
49
46
  :_expand => "1")
@@ -28,7 +28,7 @@ describe TourOfHome do
28
28
 
29
29
  it "should get home tours for a listing" do
30
30
  stub_auth_request
31
- stub_api_get('/listings/20060725224713296297000000/tourofhomes','tour_of_homes.json')
31
+ stub_api_get('/listings/20060725224713296297000000/tourofhomes','listings/tour_of_homes.json')
32
32
  v = subject.class.find_by_listing_key('20060725224713296297000000')
33
33
  v.should be_an(Array)
34
34
  v.length.should == 2
@@ -18,7 +18,7 @@ describe Video do
18
18
  describe "find videos by listing id" do
19
19
  before do
20
20
  stub_auth_request
21
- stub_api_get('/listings/1234/videos','listing_videos_index.json')
21
+ stub_api_get('/listings/1234/videos','listings/videos_index.json')
22
22
  end
23
23
 
24
24
  it "should get an array of videos" do
@@ -24,7 +24,7 @@ describe VirtualTour do
24
24
 
25
25
  it "should get virtual tours for a listing" do
26
26
  stub_auth_request
27
- stub_api_get('/listings/1234/virtualtours','listing_virtual_tours_index.json')
27
+ stub_api_get('/listings/1234/virtualtours','listings/virtual_tours_index.json')
28
28
 
29
29
  v = VirtualTour.find_by_listing_key('1234')
30
30
  v.should be_an(Array)
@@ -3,7 +3,7 @@ require './spec/spec_helper'
3
3
  # Test client implemenations for multi client switching
4
4
  module FlexmlsApi
5
5
  def self.test_client_a
6
- Client.new(:api_key => "a")
6
+ Thread.current[:test_client_a] ||= Client.new(:api_key => "a")
7
7
  end
8
8
  def self.test_client_b
9
9
  Client.new(:api_key => "b")
@@ -43,6 +43,14 @@ describe FlexmlsApi::MultiClient do
43
43
  end.to raise_error
44
44
  FlexmlsApi.client.api_key.should eq('a')
45
45
  end
46
+
47
+ context "yaml" do
48
+ it "should activate a client implemenation when activate()" do
49
+ FlexmlsApi::Configuration::YamlConfig.stub(:config_path) { "spec/config/flexmls_api" }
50
+ FlexmlsApi.activate(:test_key)
51
+ FlexmlsApi.client.api_key.should eq('demo_key')
52
+ end
53
+ end
46
54
 
47
55
  end
48
56
 
@@ -1,7 +1,7 @@
1
1
  require './spec/spec_helper'
2
2
 
3
3
  class PaginateResponseTester
4
- include FlexmlsApi::PaginateResponse
4
+ include FlexmlsApi::PaginateHelper
5
5
  end
6
6
 
7
7
  class PaginateModelTester < FlexmlsApi::Models::Base
@@ -167,12 +167,12 @@ describe FlexmlsApi do
167
167
  it "should put to a service" do
168
168
  # This is a hypothetical unsupported service action at this time
169
169
  data = {"Contacts" => [{"DisplayName"=>"WLMCEWENS Contact","PrimaryEmail"=>"wlmcewen789@fbsdata.com"}]}
170
- subject.put('/contacts/1000', data).should be(nil)
170
+ subject.put('/contacts/1000', data).size.should be(0)
171
171
  # No validation here, if no error is raised, everything is hunky dory
172
172
  end
173
173
  it "should delete from a service" do
174
174
  # This is a hypothetical unsupported service action at this time
175
- subject.delete('/contacts/1000').should be(nil)
175
+ subject.delete('/contacts/1000').size.should be(0)
176
176
  # No validation here, if no error is raised, everything is hunky dory
177
177
  end
178
178
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexmls_api
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 6
9
- - 5
10
- version: 0.6.5
8
+ - 7
9
+ - 0
10
+ version: 0.7.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brandon Hornseth
@@ -16,12 +16,12 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-08-26 00:00:00 -05:00
20
- default_executable: flexmls_api
19
+ date: 2011-10-03 00:00:00 Z
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
23
- name: curb
24
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ type: :runtime
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
27
  - - ~>
@@ -32,12 +32,12 @@ dependencies:
32
32
  - 7
33
33
  - 15
34
34
  version: 0.7.15
35
+ version_requirements: *id001
36
+ name: curb
37
+ - !ruby/object:Gem::Dependency
35
38
  prerelease: false
36
39
  type: :runtime
37
- requirement: *id001
38
- - !ruby/object:Gem::Dependency
39
- name: faraday
40
- version_requirements: &id002 !ruby/object:Gem::Requirement
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ~>
@@ -48,12 +48,12 @@ dependencies:
48
48
  - 6
49
49
  - 1
50
50
  version: 0.6.1
51
+ version_requirements: *id002
52
+ name: faraday
53
+ - !ruby/object:Gem::Dependency
51
54
  prerelease: false
52
55
  type: :runtime
53
- requirement: *id002
54
- - !ruby/object:Gem::Dependency
55
- name: faraday_middleware
56
- version_requirements: &id003 !ruby/object:Gem::Requirement
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
59
  - - ~>
@@ -64,12 +64,12 @@ dependencies:
64
64
  - 6
65
65
  - 3
66
66
  version: 0.6.3
67
+ version_requirements: *id003
68
+ name: faraday_middleware
69
+ - !ruby/object:Gem::Dependency
67
70
  prerelease: false
68
71
  type: :runtime
69
- requirement: *id003
70
- - !ruby/object:Gem::Dependency
71
- name: multi_json
72
- version_requirements: &id004 !ruby/object:Gem::Requirement
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -80,12 +80,12 @@ dependencies:
80
80
  - 0
81
81
  - 0
82
82
  version: 1.0.0
83
+ version_requirements: *id004
84
+ name: multi_json
85
+ - !ruby/object:Gem::Dependency
83
86
  prerelease: false
84
87
  type: :runtime
85
- requirement: *id004
86
- - !ruby/object:Gem::Dependency
87
- name: json
88
- version_requirements: &id005 !ruby/object:Gem::Requirement
88
+ requirement: &id005 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
91
  - - ~>
@@ -96,12 +96,12 @@ dependencies:
96
96
  - 5
97
97
  - 1
98
98
  version: 1.5.1
99
+ version_requirements: *id005
100
+ name: json
101
+ - !ruby/object:Gem::Dependency
99
102
  prerelease: false
100
103
  type: :runtime
101
- requirement: *id005
102
- - !ruby/object:Gem::Dependency
103
- name: yajl-ruby
104
- version_requirements: &id006 !ruby/object:Gem::Requirement
104
+ requirement: &id006 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -112,12 +112,12 @@ dependencies:
112
112
  - 8
113
113
  - 2
114
114
  version: 0.8.2
115
+ version_requirements: *id006
116
+ name: yajl-ruby
117
+ - !ruby/object:Gem::Dependency
115
118
  prerelease: false
116
119
  type: :runtime
117
- requirement: *id006
118
- - !ruby/object:Gem::Dependency
119
- name: builder
120
- version_requirements: &id007 !ruby/object:Gem::Requirement
120
+ requirement: &id007 !ruby/object:Gem::Requirement
121
121
  none: false
122
122
  requirements:
123
123
  - - ">="
@@ -136,12 +136,12 @@ dependencies:
136
136
  - 0
137
137
  - 0
138
138
  version: 4.0.0
139
+ version_requirements: *id007
140
+ name: builder
141
+ - !ruby/object:Gem::Dependency
139
142
  prerelease: false
140
143
  type: :runtime
141
- requirement: *id007
142
- - !ruby/object:Gem::Dependency
143
- name: addressable
144
- version_requirements: &id008 !ruby/object:Gem::Requirement
144
+ requirement: &id008 !ruby/object:Gem::Requirement
145
145
  none: false
146
146
  requirements:
147
147
  - - ~>
@@ -152,12 +152,12 @@ dependencies:
152
152
  - 2
153
153
  - 5
154
154
  version: 2.2.5
155
+ version_requirements: *id008
156
+ name: addressable
157
+ - !ruby/object:Gem::Dependency
155
158
  prerelease: false
156
159
  type: :runtime
157
- requirement: *id008
158
- - !ruby/object:Gem::Dependency
159
- name: will_paginate
160
- version_requirements: &id009 !ruby/object:Gem::Requirement
160
+ requirement: &id009 !ruby/object:Gem::Requirement
161
161
  none: false
162
162
  requirements:
163
163
  - - ">="
@@ -177,12 +177,12 @@ dependencies:
177
177
  - 0
178
178
  - 0
179
179
  version: 4.0.0
180
- prerelease: false
181
- type: :runtime
182
- requirement: *id009
180
+ version_requirements: *id009
181
+ name: will_paginate
183
182
  - !ruby/object:Gem::Dependency
184
- name: rake
185
- version_requirements: &id010 !ruby/object:Gem::Requirement
183
+ prerelease: false
184
+ type: :development
185
+ requirement: &id010 !ruby/object:Gem::Requirement
186
186
  none: false
187
187
  requirements:
188
188
  - - ">="
@@ -191,12 +191,12 @@ dependencies:
191
191
  segments:
192
192
  - 0
193
193
  version: "0"
194
+ version_requirements: *id010
195
+ name: rake
196
+ - !ruby/object:Gem::Dependency
194
197
  prerelease: false
195
198
  type: :development
196
- requirement: *id010
197
- - !ruby/object:Gem::Dependency
198
- name: rspec
199
- version_requirements: &id011 !ruby/object:Gem::Requirement
199
+ requirement: &id011 !ruby/object:Gem::Requirement
200
200
  none: false
201
201
  requirements:
202
202
  - - ~>
@@ -207,15 +207,15 @@ dependencies:
207
207
  - 3
208
208
  - 0
209
209
  version: 2.3.0
210
+ version_requirements: *id011
211
+ name: rspec
212
+ - !ruby/object:Gem::Dependency
210
213
  prerelease: false
211
214
  type: :development
212
- requirement: *id011
213
- - !ruby/object:Gem::Dependency
214
- name: webmock
215
- version_requirements: &id012 !ruby/object:Gem::Requirement
215
+ requirement: &id012 !ruby/object:Gem::Requirement
216
216
  none: false
217
217
  requirements:
218
- - - ~>
218
+ - - ">="
219
219
  - !ruby/object:Gem::Version
220
220
  hash: 7
221
221
  segments:
@@ -223,12 +223,20 @@ dependencies:
223
223
  - 4
224
224
  - 0
225
225
  version: 1.4.0
226
+ - - <
227
+ - !ruby/object:Gem::Version
228
+ hash: 15
229
+ segments:
230
+ - 2
231
+ - 0
232
+ - 0
233
+ version: 2.0.0
234
+ version_requirements: *id012
235
+ name: webmock
236
+ - !ruby/object:Gem::Dependency
226
237
  prerelease: false
227
238
  type: :development
228
- requirement: *id012
229
- - !ruby/object:Gem::Dependency
230
- name: typhoeus
231
- version_requirements: &id013 !ruby/object:Gem::Requirement
239
+ requirement: &id013 !ruby/object:Gem::Requirement
232
240
  none: false
233
241
  requirements:
234
242
  - - ~>
@@ -239,12 +247,12 @@ dependencies:
239
247
  - 2
240
248
  - 0
241
249
  version: 0.2.0
250
+ version_requirements: *id013
251
+ name: typhoeus
252
+ - !ruby/object:Gem::Dependency
242
253
  prerelease: false
243
254
  type: :development
244
- requirement: *id013
245
- - !ruby/object:Gem::Dependency
246
- name: ci_reporter
247
- version_requirements: &id014 !ruby/object:Gem::Requirement
255
+ requirement: &id014 !ruby/object:Gem::Requirement
248
256
  none: false
249
257
  requirements:
250
258
  - - ~>
@@ -255,12 +263,12 @@ dependencies:
255
263
  - 6
256
264
  - 3
257
265
  version: 1.6.3
266
+ version_requirements: *id014
267
+ name: ci_reporter
268
+ - !ruby/object:Gem::Dependency
258
269
  prerelease: false
259
270
  type: :development
260
- requirement: *id014
261
- - !ruby/object:Gem::Dependency
262
- name: rcov
263
- version_requirements: &id015 !ruby/object:Gem::Requirement
271
+ requirement: &id015 !ruby/object:Gem::Requirement
264
272
  none: false
265
273
  requirements:
266
274
  - - ~>
@@ -271,25 +279,24 @@ dependencies:
271
279
  - 9
272
280
  - 9
273
281
  version: 0.9.9
282
+ version_requirements: *id015
283
+ name: rcov
284
+ - !ruby/object:Gem::Dependency
274
285
  prerelease: false
275
286
  type: :development
276
- requirement: *id015
277
- - !ruby/object:Gem::Dependency
278
- name: flexmls_gems
279
- version_requirements: &id016 !ruby/object:Gem::Requirement
287
+ requirement: &id016 !ruby/object:Gem::Requirement
280
288
  none: false
281
289
  requirements:
282
290
  - - ~>
283
291
  - !ruby/object:Gem::Version
284
- hash: 21
292
+ hash: 17
285
293
  segments:
286
294
  - 0
287
295
  - 2
288
- - 1
289
- version: 0.2.1
290
- prerelease: false
291
- type: :development
292
- requirement: *id016
296
+ - 3
297
+ version: 0.2.3
298
+ version_requirements: *id016
299
+ name: flexmls_gems
293
300
  description: The FlexmlsApi gem handles most of the boilerplate for communicating with the flexmls API rest services, including authentication and request parsing.
294
301
  email: api-support@flexmls.com
295
302
  executables:
@@ -309,6 +316,7 @@ files:
309
316
  - lib/flexmls_api/authentication/api_auth.rb
310
317
  - lib/flexmls_api/authentication/oauth2_impl/middleware.rb
311
318
  - lib/flexmls_api/authentication/oauth2_impl/grant_type_base.rb
319
+ - lib/flexmls_api/authentication/oauth2_impl/password_provider.rb
312
320
  - lib/flexmls_api/authentication/oauth2_impl/grant_type_code.rb
313
321
  - lib/flexmls_api/authentication/oauth2_impl/grant_type_refresh.rb
314
322
  - lib/flexmls_api/authentication/oauth2_impl/grant_type_password.rb
@@ -317,6 +325,7 @@ files:
317
325
  - lib/flexmls_api/client.rb
318
326
  - lib/flexmls_api/primary_array.rb
319
327
  - lib/flexmls_api/version.rb
328
+ - lib/flexmls_api/response.rb
320
329
  - lib/flexmls_api/models.rb
321
330
  - lib/flexmls_api/multi_client.rb
322
331
  - lib/flexmls_api/models/document.rb
@@ -328,6 +337,7 @@ files:
328
337
  - lib/flexmls_api/models/idx_link.rb
329
338
  - lib/flexmls_api/models/system_info.rb
330
339
  - lib/flexmls_api/models/listing.rb
340
+ - lib/flexmls_api/models/constraint.rb
331
341
  - lib/flexmls_api/models/base.rb
332
342
  - lib/flexmls_api/models/listing_cart.rb
333
343
  - lib/flexmls_api/models/saved_search.rb
@@ -351,31 +361,22 @@ files:
351
361
  - lib/flexmls_api/cli.rb
352
362
  - lib/flexmls_api/authentication.rb
353
363
  - lib/flexmls_api/configuration.rb
364
+ - lib/flexmls_api/configuration/yaml.rb
354
365
  - lib/flexmls_api.rb
355
366
  - script/console
356
367
  - script/example.rb
357
- - spec/fixtures/standardfields_city.json
358
- - spec/fixtures/listing_videos_index.json
359
368
  - spec/fixtures/oauth2_error.json
360
369
  - spec/fixtures/errors/expired.json
361
370
  - spec/fixtures/errors/failure.json
362
- - spec/fixtures/agent_shared_note_empty.json
363
371
  - spec/fixtures/count.json
364
- - spec/fixtures/listing_cart_add_listing_post.json
365
- - spec/fixtures/saved_search.json
366
- - spec/fixtures/listing_no_subresources.json
372
+ - spec/fixtures/notes/new.json
373
+ - spec/fixtures/notes/agent_shared.json
374
+ - spec/fixtures/notes/add.json
375
+ - spec/fixtures/notes/agent_shared_empty.json
367
376
  - spec/fixtures/base.json
368
- - spec/fixtures/listing_with_supplement.json
369
- - spec/fixtures/listing_cart_post.json
370
- - spec/fixtures/listing_with_videos.json
371
- - spec/fixtures/listing_with_vtour.json
372
377
  - spec/fixtures/generic_failure.json
373
378
  - spec/fixtures/session.json
374
379
  - spec/fixtures/generic_delete.json
375
- - spec/fixtures/note_new.json
376
- - spec/fixtures/agent_shared_note.json
377
- - spec/fixtures/listing_document_index.json
378
- - spec/fixtures/listing_photos_index.json
379
380
  - spec/fixtures/oauth2/refresh_body.json
380
381
  - spec/fixtures/oauth2/access_with_refresh.json
381
382
  - spec/fixtures/oauth2/password_body.json
@@ -383,14 +384,10 @@ files:
383
384
  - spec/fixtures/oauth2/error.json
384
385
  - spec/fixtures/oauth2/access.json
385
386
  - spec/fixtures/oauth2/access_with_old_refresh.json
386
- - spec/fixtures/open_houses.json
387
- - spec/fixtures/add_note.json
388
- - spec/fixtures/contacts.json
389
- - spec/fixtures/listing_cart.json
390
- - spec/fixtures/contact_new_notify.json
391
- - spec/fixtures/standardfields_stateorprovince.json
392
- - spec/fixtures/listing_with_photos.json
393
- - spec/fixtures/listing_with_documents.json
387
+ - spec/fixtures/standardfields/nearby.json
388
+ - spec/fixtures/standardfields/city.json
389
+ - spec/fixtures/standardfields/stateorprovince.json
390
+ - spec/fixtures/standardfields/standardfields.json
394
391
  - spec/fixtures/accounts/all.json
395
392
  - spec/fixtures/accounts/office.json
396
393
  - spec/fixtures/accounts/my.json
@@ -398,24 +395,46 @@ files:
398
395
  - spec/fixtures/accounts/my_save.json
399
396
  - spec/fixtures/accounts/my_portal.json
400
397
  - spec/fixtures/success.json
401
- - spec/fixtures/listing_virtual_tours_index.json
402
- - spec/fixtures/contacts_post.json
403
398
  - spec/fixtures/empty.json
399
+ - spec/fixtures/listing_carts/remove_listing.json
400
+ - spec/fixtures/listing_carts/add_listing_post.json
401
+ - spec/fixtures/listing_carts/listing_cart.json
402
+ - spec/fixtures/listing_carts/empty.json
403
+ - spec/fixtures/listing_carts/new.json
404
+ - spec/fixtures/listing_carts/post.json
405
+ - spec/fixtures/listing_carts/add_listing.json
404
406
  - spec/fixtures/authentication_failure.json
405
- - spec/fixtures/listing_cart_add_listing.json
406
- - spec/fixtures/shared_listing_new.json
407
- - spec/fixtures/contact_new_empty.json
408
- - spec/fixtures/standardfields_nearby.json
409
- - spec/fixtures/listing_cart_remove_listing.json
410
- - spec/fixtures/contact_new.json
411
- - spec/fixtures/listing_cart_new.json
412
- - spec/fixtures/tour_of_homes.json
413
- - spec/fixtures/shared_listing_post.json
414
- - spec/fixtures/contact_my.json
415
- - spec/fixtures/listing_cart_empty.json
416
- - spec/fixtures/standardfields.json
417
- - spec/fixtures/contact_tags.json
407
+ - spec/fixtures/listings/no_subresources.json
408
+ - spec/fixtures/listings/saved_search.json
409
+ - spec/fixtures/listings/constraints_with_pagination.json
410
+ - spec/fixtures/listings/open_houses.json
411
+ - spec/fixtures/listings/photos/new.json
412
+ - spec/fixtures/listings/photos/post.json
413
+ - spec/fixtures/listings/photos/index.json
414
+ - spec/fixtures/listings/with_videos.json
415
+ - spec/fixtures/listings/with_documents.json
416
+ - spec/fixtures/listings/put.json
417
+ - spec/fixtures/listings/with_permissions.json
418
+ - spec/fixtures/listings/with_vtour.json
419
+ - spec/fixtures/listings/with_photos.json
420
+ - spec/fixtures/listings/shared_listing_new.json
421
+ - spec/fixtures/listings/videos_index.json
422
+ - spec/fixtures/listings/with_supplement.json
423
+ - spec/fixtures/listings/tour_of_homes.json
424
+ - spec/fixtures/listings/shared_listing_post.json
425
+ - spec/fixtures/listings/virtual_tours_index.json
426
+ - spec/fixtures/listings/document_index.json
427
+ - spec/fixtures/listings/constraints.json
428
+ - spec/fixtures/contacts/tags.json
429
+ - spec/fixtures/contacts/my.json
430
+ - spec/fixtures/contacts/new_empty.json
431
+ - spec/fixtures/contacts/contacts.json
432
+ - spec/fixtures/contacts/new_notify.json
433
+ - spec/fixtures/contacts/new.json
434
+ - spec/fixtures/contacts/post.json
435
+ - spec/fixtures/logo_fbs.png
418
436
  - spec/unit/flexmls_api_spec.rb
437
+ - spec/unit/flexmls_api/authentication/base_auth_spec.rb
419
438
  - spec/unit/flexmls_api/authentication/oauth2_impl/grant_type_base_spec.rb
420
439
  - spec/unit/flexmls_api/authentication/oauth2_spec.rb
421
440
  - spec/unit/flexmls_api/authentication/api_auth_spec.rb
@@ -424,6 +443,7 @@ files:
424
443
  - spec/unit/flexmls_api/models/open_house_spec.rb
425
444
  - spec/unit/flexmls_api/models/account_spec.rb
426
445
  - spec/unit/flexmls_api/models/virtual_tour_spec.rb
446
+ - spec/unit/flexmls_api/models/constraint_spec.rb
427
447
  - spec/unit/flexmls_api/models/saved_search_spec.rb
428
448
  - spec/unit/flexmls_api/models/contact_spec.rb
429
449
  - spec/unit/flexmls_api/models/listing_cart_spec.rb
@@ -443,12 +463,12 @@ files:
443
463
  - spec/unit/flexmls_api/primary_array_spec.rb
444
464
  - spec/unit/flexmls_api/configuration_spec.rb
445
465
  - spec/unit/flexmls_api/request_spec.rb
466
+ - spec/unit/flexmls_api/configuration/yaml_spec.rb
446
467
  - spec/unit/flexmls_api/multi_client_spec.rb
447
468
  - spec/spec_helper.rb
448
469
  - spec/oauth2_helper.rb
449
470
  - spec/json_helper.rb
450
471
  - spec/mock_helper.rb
451
- has_rdoc: true
452
472
  homepage: https://github.com/flexmls/flexmls_api
453
473
  licenses: []
454
474
 
@@ -480,33 +500,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
480
500
  requirements: []
481
501
 
482
502
  rubyforge_project: flexmls_api
483
- rubygems_version: 1.6.2
503
+ rubygems_version: 1.8.10
484
504
  signing_key:
485
505
  specification_version: 3
486
506
  summary: A library for interacting with the flexmls web services.
487
507
  test_files:
488
- - spec/fixtures/standardfields_city.json
489
- - spec/fixtures/listing_videos_index.json
490
508
  - spec/fixtures/oauth2_error.json
491
509
  - spec/fixtures/errors/expired.json
492
510
  - spec/fixtures/errors/failure.json
493
- - spec/fixtures/agent_shared_note_empty.json
494
511
  - spec/fixtures/count.json
495
- - spec/fixtures/listing_cart_add_listing_post.json
496
- - spec/fixtures/saved_search.json
497
- - spec/fixtures/listing_no_subresources.json
512
+ - spec/fixtures/notes/new.json
513
+ - spec/fixtures/notes/agent_shared.json
514
+ - spec/fixtures/notes/add.json
515
+ - spec/fixtures/notes/agent_shared_empty.json
498
516
  - spec/fixtures/base.json
499
- - spec/fixtures/listing_with_supplement.json
500
- - spec/fixtures/listing_cart_post.json
501
- - spec/fixtures/listing_with_videos.json
502
- - spec/fixtures/listing_with_vtour.json
503
517
  - spec/fixtures/generic_failure.json
504
518
  - spec/fixtures/session.json
505
519
  - spec/fixtures/generic_delete.json
506
- - spec/fixtures/note_new.json
507
- - spec/fixtures/agent_shared_note.json
508
- - spec/fixtures/listing_document_index.json
509
- - spec/fixtures/listing_photos_index.json
510
520
  - spec/fixtures/oauth2/refresh_body.json
511
521
  - spec/fixtures/oauth2/access_with_refresh.json
512
522
  - spec/fixtures/oauth2/password_body.json
@@ -514,14 +524,10 @@ test_files:
514
524
  - spec/fixtures/oauth2/error.json
515
525
  - spec/fixtures/oauth2/access.json
516
526
  - spec/fixtures/oauth2/access_with_old_refresh.json
517
- - spec/fixtures/open_houses.json
518
- - spec/fixtures/add_note.json
519
- - spec/fixtures/contacts.json
520
- - spec/fixtures/listing_cart.json
521
- - spec/fixtures/contact_new_notify.json
522
- - spec/fixtures/standardfields_stateorprovince.json
523
- - spec/fixtures/listing_with_photos.json
524
- - spec/fixtures/listing_with_documents.json
527
+ - spec/fixtures/standardfields/nearby.json
528
+ - spec/fixtures/standardfields/city.json
529
+ - spec/fixtures/standardfields/stateorprovince.json
530
+ - spec/fixtures/standardfields/standardfields.json
525
531
  - spec/fixtures/accounts/all.json
526
532
  - spec/fixtures/accounts/office.json
527
533
  - spec/fixtures/accounts/my.json
@@ -529,24 +535,46 @@ test_files:
529
535
  - spec/fixtures/accounts/my_save.json
530
536
  - spec/fixtures/accounts/my_portal.json
531
537
  - spec/fixtures/success.json
532
- - spec/fixtures/listing_virtual_tours_index.json
533
- - spec/fixtures/contacts_post.json
534
538
  - spec/fixtures/empty.json
539
+ - spec/fixtures/listing_carts/remove_listing.json
540
+ - spec/fixtures/listing_carts/add_listing_post.json
541
+ - spec/fixtures/listing_carts/listing_cart.json
542
+ - spec/fixtures/listing_carts/empty.json
543
+ - spec/fixtures/listing_carts/new.json
544
+ - spec/fixtures/listing_carts/post.json
545
+ - spec/fixtures/listing_carts/add_listing.json
535
546
  - spec/fixtures/authentication_failure.json
536
- - spec/fixtures/listing_cart_add_listing.json
537
- - spec/fixtures/shared_listing_new.json
538
- - spec/fixtures/contact_new_empty.json
539
- - spec/fixtures/standardfields_nearby.json
540
- - spec/fixtures/listing_cart_remove_listing.json
541
- - spec/fixtures/contact_new.json
542
- - spec/fixtures/listing_cart_new.json
543
- - spec/fixtures/tour_of_homes.json
544
- - spec/fixtures/shared_listing_post.json
545
- - spec/fixtures/contact_my.json
546
- - spec/fixtures/listing_cart_empty.json
547
- - spec/fixtures/standardfields.json
548
- - spec/fixtures/contact_tags.json
547
+ - spec/fixtures/listings/no_subresources.json
548
+ - spec/fixtures/listings/saved_search.json
549
+ - spec/fixtures/listings/constraints_with_pagination.json
550
+ - spec/fixtures/listings/open_houses.json
551
+ - spec/fixtures/listings/photos/new.json
552
+ - spec/fixtures/listings/photos/post.json
553
+ - spec/fixtures/listings/photos/index.json
554
+ - spec/fixtures/listings/with_videos.json
555
+ - spec/fixtures/listings/with_documents.json
556
+ - spec/fixtures/listings/put.json
557
+ - spec/fixtures/listings/with_permissions.json
558
+ - spec/fixtures/listings/with_vtour.json
559
+ - spec/fixtures/listings/with_photos.json
560
+ - spec/fixtures/listings/shared_listing_new.json
561
+ - spec/fixtures/listings/videos_index.json
562
+ - spec/fixtures/listings/with_supplement.json
563
+ - spec/fixtures/listings/tour_of_homes.json
564
+ - spec/fixtures/listings/shared_listing_post.json
565
+ - spec/fixtures/listings/virtual_tours_index.json
566
+ - spec/fixtures/listings/document_index.json
567
+ - spec/fixtures/listings/constraints.json
568
+ - spec/fixtures/contacts/tags.json
569
+ - spec/fixtures/contacts/my.json
570
+ - spec/fixtures/contacts/new_empty.json
571
+ - spec/fixtures/contacts/contacts.json
572
+ - spec/fixtures/contacts/new_notify.json
573
+ - spec/fixtures/contacts/new.json
574
+ - spec/fixtures/contacts/post.json
575
+ - spec/fixtures/logo_fbs.png
549
576
  - spec/unit/flexmls_api_spec.rb
577
+ - spec/unit/flexmls_api/authentication/base_auth_spec.rb
550
578
  - spec/unit/flexmls_api/authentication/oauth2_impl/grant_type_base_spec.rb
551
579
  - spec/unit/flexmls_api/authentication/oauth2_spec.rb
552
580
  - spec/unit/flexmls_api/authentication/api_auth_spec.rb
@@ -555,6 +583,7 @@ test_files:
555
583
  - spec/unit/flexmls_api/models/open_house_spec.rb
556
584
  - spec/unit/flexmls_api/models/account_spec.rb
557
585
  - spec/unit/flexmls_api/models/virtual_tour_spec.rb
586
+ - spec/unit/flexmls_api/models/constraint_spec.rb
558
587
  - spec/unit/flexmls_api/models/saved_search_spec.rb
559
588
  - spec/unit/flexmls_api/models/contact_spec.rb
560
589
  - spec/unit/flexmls_api/models/listing_cart_spec.rb
@@ -574,6 +603,7 @@ test_files:
574
603
  - spec/unit/flexmls_api/primary_array_spec.rb
575
604
  - spec/unit/flexmls_api/configuration_spec.rb
576
605
  - spec/unit/flexmls_api/request_spec.rb
606
+ - spec/unit/flexmls_api/configuration/yaml_spec.rb
577
607
  - spec/unit/flexmls_api/multi_client_spec.rb
578
608
  - spec/spec_helper.rb
579
609
  - spec/oauth2_helper.rb