flexmls_api 0.3.6 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +6 -6
- data/Gemfile.lock +6 -6
- data/README.md +5 -3
- data/Rakefile +2 -1
- data/VERSION +1 -1
- data/lib/flexmls_api/authentication.rb +25 -54
- data/lib/flexmls_api/authentication/api_auth.rb +100 -0
- data/lib/flexmls_api/authentication/base_auth.rb +47 -0
- data/lib/flexmls_api/authentication/oauth2.rb +219 -0
- data/lib/flexmls_api/client.rb +7 -1
- data/lib/flexmls_api/configuration.rb +5 -2
- data/lib/flexmls_api/faraday.rb +6 -2
- data/lib/flexmls_api/models.rb +2 -0
- data/lib/flexmls_api/models/base.rb +5 -1
- data/lib/flexmls_api/models/contact.rb +1 -0
- data/lib/flexmls_api/models/custom_fields.rb +2 -2
- data/lib/flexmls_api/models/finders.rb +2 -2
- data/lib/flexmls_api/models/idx_link.rb +1 -1
- data/lib/flexmls_api/models/listing.rb +31 -5
- data/lib/flexmls_api/models/market_statistics.rb +1 -1
- data/lib/flexmls_api/models/note.rb +43 -0
- data/lib/flexmls_api/models/standard_fields.rb +43 -0
- data/lib/flexmls_api/models/subresource.rb +5 -2
- data/lib/flexmls_api/models/system_info.rb +7 -0
- data/lib/flexmls_api/models/tour_of_home.rb +24 -0
- data/lib/flexmls_api/request.rb +13 -28
- data/spec/fixtures/add_note.json +11 -0
- data/spec/fixtures/agent_shared_note.json +11 -0
- data/spec/fixtures/agent_shared_note_empty.json +7 -0
- data/spec/fixtures/authentication_failure.json +7 -0
- data/spec/fixtures/count.json +10 -0
- data/spec/fixtures/errors/expired.json +7 -0
- data/spec/fixtures/generic_delete.json +1 -0
- data/spec/fixtures/generic_failure.json +5 -0
- data/spec/fixtures/oauth2_access.json +3 -0
- data/spec/fixtures/oauth2_error.json +3 -0
- data/spec/fixtures/session.json +1 -1
- data/spec/fixtures/standardfields.json +188 -0
- data/spec/fixtures/standardfields_city.json +1031 -0
- data/spec/fixtures/standardfields_nearby.json +53 -0
- data/spec/fixtures/standardfields_stateorprovince.json +36 -0
- data/spec/fixtures/tour_of_homes.json +23 -0
- data/spec/spec_helper.rb +22 -5
- data/spec/unit/flexmls_api/authentication/api_auth_spec.rb +159 -0
- data/spec/unit/flexmls_api/authentication/oauth2_spec.rb +183 -0
- data/spec/unit/flexmls_api/authentication_spec.rb +10 -2
- data/spec/unit/flexmls_api/configuration_spec.rb +2 -2
- data/spec/unit/flexmls_api/faraday_spec.rb +3 -7
- data/spec/unit/flexmls_api/models/base_spec.rb +1 -1
- data/spec/unit/flexmls_api/models/contact_spec.rb +8 -4
- data/spec/unit/flexmls_api/models/document_spec.rb +2 -5
- data/spec/unit/flexmls_api/models/listing_spec.rb +46 -9
- data/spec/unit/flexmls_api/models/note_spec.rb +90 -0
- data/spec/unit/flexmls_api/models/photo_spec.rb +2 -2
- data/spec/unit/flexmls_api/models/system_info_spec.rb +37 -3
- data/spec/unit/flexmls_api/models/tour_of_home_spec.rb +43 -0
- data/spec/unit/flexmls_api/models/video_spec.rb +2 -4
- data/spec/unit/flexmls_api/models/virtual_tour_spec.rb +2 -2
- data/spec/unit/flexmls_api/paginate_spec.rb +11 -8
- data/spec/unit/flexmls_api/request_spec.rb +31 -16
- data/spec/unit/flexmls_api/standard_fields_spec.rb +86 -0
- data/spec/unit/flexmls_api_spec.rb +6 -27
- metadata +119 -76
@@ -2,7 +2,6 @@ require './spec/spec_helper'
|
|
2
2
|
|
3
3
|
describe Video do
|
4
4
|
|
5
|
-
|
6
5
|
it "responds to" do
|
7
6
|
Video.should respond_to(:find_by_listing_key)
|
8
7
|
Video.new.should respond_to(:branded?)
|
@@ -16,7 +15,6 @@ describe Video do
|
|
16
15
|
Video.new(:Type => "branded").unbranded?.should == false
|
17
16
|
end
|
18
17
|
|
19
|
-
|
20
18
|
describe "find videos by listing id" do
|
21
19
|
before do
|
22
20
|
stub_auth_request
|
@@ -30,8 +28,8 @@ describe Video do
|
|
30
28
|
end
|
31
29
|
|
32
30
|
it "should get an array of videos" do
|
33
|
-
p = Video.find_by_listing_key('1234'
|
34
|
-
p.should be_an
|
31
|
+
p = Video.find_by_listing_key('1234')
|
32
|
+
p.should be_an(Array)
|
35
33
|
p.length.should == 2
|
36
34
|
end
|
37
35
|
|
@@ -32,8 +32,8 @@ describe VirtualTour do
|
|
32
32
|
}).
|
33
33
|
to_return(:body => fixture('listing_virtual_tours_index.json'))
|
34
34
|
|
35
|
-
v = VirtualTour.find_by_listing_key('1234'
|
36
|
-
v.should be_an
|
35
|
+
v = VirtualTour.find_by_listing_key('1234')
|
36
|
+
v.should be_an(Array)
|
37
37
|
v.length.should == 5
|
38
38
|
end
|
39
39
|
|
@@ -94,7 +94,7 @@ describe FlexmlsApi::Paginate do
|
|
94
94
|
describe "paginate" do
|
95
95
|
it "should give me a will paginate collection" do
|
96
96
|
results = PaginateModelTester.paginate(:page => 1)
|
97
|
-
results.
|
97
|
+
results.should be_a(WillPaginate::Collection)
|
98
98
|
results.offset.should eq(0)
|
99
99
|
results.next_page.should eq(2)
|
100
100
|
results.previous_page.should eq(nil)
|
@@ -103,7 +103,7 @@ describe FlexmlsApi::Paginate do
|
|
103
103
|
results.total_pages.should eq(4)
|
104
104
|
results.total_entries.should eq(38)
|
105
105
|
|
106
|
-
results[0].
|
106
|
+
results[0].should be_a(PaginateModelTester)
|
107
107
|
results[0].val.should eq(1)
|
108
108
|
|
109
109
|
end
|
@@ -143,7 +143,8 @@ describe FlexmlsApi::Paginate do
|
|
143
143
|
JSON
|
144
144
|
stub_request(:get, "#{FlexmlsApi.endpoint}/#{FlexmlsApi.version}/listings").
|
145
145
|
with(:query => {
|
146
|
-
:ApiSig => "
|
146
|
+
:ApiSig => "4a00ca0e657c824d85a5fe1007d9c52d",
|
147
|
+
:ApiUser => "foobar",
|
147
148
|
:AuthToken => "c401736bf3d3f754f07c04e460e09573",
|
148
149
|
:_limit => '10',
|
149
150
|
:_page => '1',
|
@@ -151,7 +152,7 @@ describe FlexmlsApi::Paginate do
|
|
151
152
|
}).
|
152
153
|
to_return(:body => json)
|
153
154
|
results = subject.paginate(:page=>1, :per_page=>10)
|
154
|
-
results.
|
155
|
+
results.should be_a(WillPaginate::Collection)
|
155
156
|
results.offset.should eq(0)
|
156
157
|
results.next_page.should eq(2)
|
157
158
|
results.previous_page.should eq(nil)
|
@@ -161,7 +162,7 @@ describe FlexmlsApi::Paginate do
|
|
161
162
|
results.total_entries.should eq(38)
|
162
163
|
results.length.should eq(10)
|
163
164
|
|
164
|
-
results[0].
|
165
|
+
results[0].should be_a(subject)
|
165
166
|
results[0].ListPrice.should eq(50000.0)
|
166
167
|
|
167
168
|
end
|
@@ -175,7 +176,8 @@ describe FlexmlsApi::Paginate do
|
|
175
176
|
JSON
|
176
177
|
stub_request(:get, "#{FlexmlsApi.endpoint}/#{FlexmlsApi.version}/listings").
|
177
178
|
with(:query => {
|
178
|
-
:ApiSig => "
|
179
|
+
:ApiSig => "094d3851a0c4c4563baf70ca45087e30",
|
180
|
+
:ApiUser => "foobar",
|
179
181
|
:AuthToken => "c401736bf3d3f754f07c04e460e09573",
|
180
182
|
:_limit => '10',
|
181
183
|
:_page => '2',
|
@@ -197,7 +199,8 @@ describe FlexmlsApi::Paginate do
|
|
197
199
|
JSON
|
198
200
|
stub_request(:get, "#{FlexmlsApi.endpoint}/#{FlexmlsApi.version}/listings").
|
199
201
|
with(:query => {
|
200
|
-
:ApiSig => "
|
202
|
+
:ApiSig => "dcfce1fe9289c905f8d2d01cbb850edc",
|
203
|
+
:ApiUser => "foobar",
|
201
204
|
:AuthToken => "c401736bf3d3f754f07c04e460e09573",
|
202
205
|
:_limit => '10',
|
203
206
|
:_page => '4',
|
@@ -213,7 +216,7 @@ describe FlexmlsApi::Paginate do
|
|
213
216
|
results.total_entries.should eq(38)
|
214
217
|
|
215
218
|
results.length.should eq(8)
|
216
|
-
results[0].
|
219
|
+
results[0].should be_a(subject)
|
217
220
|
results[0].ListPrice.should eq(50000.0)
|
218
221
|
end
|
219
222
|
|
@@ -100,22 +100,22 @@ describe FlexmlsApi do
|
|
100
100
|
subject do
|
101
101
|
class RequestTest
|
102
102
|
include FlexmlsApi::Request
|
103
|
+
|
103
104
|
attr_accessor *FlexmlsApi::Configuration::VALID_OPTION_KEYS
|
105
|
+
attr_accessor :authenticator
|
104
106
|
def initialize(session)
|
105
|
-
@
|
107
|
+
@authenticator=MockApiAuthenticator.new(self)
|
108
|
+
@authenticator.session=session
|
106
109
|
end
|
107
110
|
def authenticate()
|
108
111
|
raise "Should not be invoked #{@session.inspect}"
|
109
112
|
end
|
110
|
-
def
|
111
|
-
|
113
|
+
def authenticated?
|
114
|
+
true
|
112
115
|
end
|
113
116
|
def version()
|
114
117
|
"v1"
|
115
118
|
end
|
116
|
-
def empty_parameters()
|
117
|
-
build_url_parameters()
|
118
|
-
end
|
119
119
|
attr_accessor :connection
|
120
120
|
end
|
121
121
|
my_s = mock_session()
|
@@ -123,9 +123,6 @@ describe FlexmlsApi do
|
|
123
123
|
r.connection = @connection
|
124
124
|
r
|
125
125
|
end
|
126
|
-
it "should give me empty string when no parameters" do
|
127
|
-
subject.empty_parameters().should == ""
|
128
|
-
end
|
129
126
|
it "should get a service" do
|
130
127
|
subject.get('/system')[0]["Name"].should == "My User"
|
131
128
|
end
|
@@ -151,9 +148,9 @@ describe FlexmlsApi do
|
|
151
148
|
it "should give me BigDecimal results for large floating point numbers" do
|
152
149
|
MultiJson.default_engine.should eq(:yajl)
|
153
150
|
result = subject.get('/listings/1000')[0]
|
154
|
-
result["StandardFields"]["BuildingAreaTotal"].
|
151
|
+
result["StandardFields"]["BuildingAreaTotal"].should be_a(Float)
|
155
152
|
pending("our JSON parser does not support large decimal types. Anyone feel like writing some c code?") do
|
156
|
-
result["StandardFields"]["BuildingAreaTotal"].
|
153
|
+
result["StandardFields"]["BuildingAreaTotal"].should be_a(BigDecimal)
|
157
154
|
number = BigDecimal.new(result["StandardFields"]["BuildingAreaTotal"].to_s)
|
158
155
|
number.to_s.should eq(BigDecimal.new("0.000000000000000000000000001").to_s)
|
159
156
|
number = BigDecimal.new(result["StandardFields"]["ListPrice"].to_s)
|
@@ -168,8 +165,15 @@ describe FlexmlsApi do
|
|
168
165
|
class RequestAuthTest
|
169
166
|
include FlexmlsApi::Request
|
170
167
|
attr_accessor *FlexmlsApi::Configuration::VALID_OPTION_KEYS
|
168
|
+
attr_accessor :authenticator
|
169
|
+
def initialize()
|
170
|
+
@authenticator=MockApiAuthenticator.new(self)
|
171
|
+
end
|
171
172
|
def authenticate()
|
172
|
-
@session ||= mock_session()
|
173
|
+
@authenticator.session ||= mock_session()
|
174
|
+
end
|
175
|
+
def authenticated?
|
176
|
+
@authenticator.authenticated?
|
173
177
|
end
|
174
178
|
def sign_token(path, params = {}, post_data="")
|
175
179
|
"SignedToken"
|
@@ -197,14 +201,20 @@ describe FlexmlsApi do
|
|
197
201
|
class RequestExpiredTest
|
198
202
|
include FlexmlsApi::Request
|
199
203
|
attr_accessor *FlexmlsApi::Configuration::VALID_OPTION_KEYS
|
204
|
+
attr_accessor :authenticator
|
200
205
|
def initialize(session)
|
201
|
-
@
|
206
|
+
@authenticator=MockApiAuthenticator.new(self)
|
207
|
+
@authenticator.session=session
|
202
208
|
@reauthenticated = false
|
203
209
|
end
|
204
210
|
def authenticate()
|
205
211
|
@reauthenticated = true
|
206
|
-
@session = mock_session()
|
212
|
+
@authenticator.session = mock_session()
|
207
213
|
end
|
214
|
+
def authenticated?
|
215
|
+
@authenticator.authenticated?
|
216
|
+
end
|
217
|
+
|
208
218
|
def sign_token(path, params = {}, post_data="")
|
209
219
|
"SignedToken"
|
210
220
|
end
|
@@ -233,7 +243,7 @@ describe FlexmlsApi do
|
|
233
243
|
|
234
244
|
context "when expire response" do
|
235
245
|
subject do
|
236
|
-
session = FlexmlsApi::Authentication::Session.new("AuthToken" => "EXPIRED", "Expires" => (Time.now
|
246
|
+
session = FlexmlsApi::Authentication::Session.new("AuthToken" => "EXPIRED", "Expires" => (Time.now - 3600).to_s, "Roles" => "['idx']")
|
237
247
|
r = RequestExpiredTest.new(session)
|
238
248
|
r.connection = @connection
|
239
249
|
r
|
@@ -254,12 +264,17 @@ describe FlexmlsApi do
|
|
254
264
|
class RequestAlwaysExpiredJerkTest
|
255
265
|
include FlexmlsApi::Request
|
256
266
|
attr_accessor *FlexmlsApi::Configuration::VALID_OPTION_KEYS
|
267
|
+
attr_accessor :authenticator
|
257
268
|
def initialize()
|
269
|
+
@authenticator=MockApiAuthenticator.new(self)
|
258
270
|
@reauthenticated = 0
|
259
271
|
end
|
260
272
|
def authenticate()
|
261
273
|
@reauthenticated += 1
|
262
|
-
@session =
|
274
|
+
@authenticator.session = FlexmlsApi::Authentication::Session.new("AuthToken" => "EXPIRED", "Expires" => (Time.now + 60).to_s, "Roles" => "['idx']")
|
275
|
+
end
|
276
|
+
def authenticated?
|
277
|
+
@authenticator.authenticated?
|
263
278
|
end
|
264
279
|
def sign_token(path, params = {}, post_data="")
|
265
280
|
"SignedToken"
|
@@ -0,0 +1,86 @@
|
|
1
|
+
require './spec/spec_helper'
|
2
|
+
|
3
|
+
describe StandardFields do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
stub_auth_request
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
it "should respond to get" do
|
11
|
+
StandardFields.should respond_to(:get)
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
it "should find and expand all" do
|
16
|
+
StandardFields.should respond_to(:find_and_expand_all)
|
17
|
+
|
18
|
+
# stub request to standardFields
|
19
|
+
stub_request(:get, "#{FlexmlsApi.endpoint}/#{FlexmlsApi.version}/standardfields").
|
20
|
+
with(:query => {
|
21
|
+
:ApiSig => "e8c27a6d4b96ed4267776581917bc9ef",
|
22
|
+
:AuthToken => "c401736bf3d3f754f07c04e460e09573",
|
23
|
+
:ApiUser => "foobar"
|
24
|
+
}).
|
25
|
+
to_return(:body => fixture('standardfields.json'))
|
26
|
+
|
27
|
+
# stub request for City
|
28
|
+
stub_request(:get, "#{FlexmlsApi.endpoint}/#{FlexmlsApi.version}/standardfields/City").
|
29
|
+
with(:query => {
|
30
|
+
:ApiSig => "447045bf65019ed960ee16ba64311e7f",
|
31
|
+
:AuthToken => "c401736bf3d3f754f07c04e460e09573",
|
32
|
+
:ApiUser => "foobar"
|
33
|
+
}).
|
34
|
+
to_return(:body => fixture('standardfields_city.json'))
|
35
|
+
|
36
|
+
# stub request for StateOrProvince
|
37
|
+
stub_request(:get, "#{FlexmlsApi.endpoint}/#{FlexmlsApi.version}/standardfields/StateOrProvince").
|
38
|
+
with(:query => {
|
39
|
+
:ApiSig => "2828f29a5c68978cb29e6048d0f82a31",
|
40
|
+
:AuthToken => "c401736bf3d3f754f07c04e460e09573",
|
41
|
+
:ApiUser => "foobar"
|
42
|
+
}).
|
43
|
+
to_return(:body => fixture('standardfields_stateorprovince.json'))
|
44
|
+
|
45
|
+
# request
|
46
|
+
fields = StandardFields.find_and_expand_all(["City","StateOrProvince"])
|
47
|
+
|
48
|
+
# keys are present
|
49
|
+
fields.should have_key("City")
|
50
|
+
fields.should have_key("StateOrProvince")
|
51
|
+
fields.should_not have_key("SubdivisionName")
|
52
|
+
|
53
|
+
# FieldList
|
54
|
+
fields["City"]["FieldList"].length.should eq(235)
|
55
|
+
fields["StateOrProvince"]["FieldList"].length.should eq(5)
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
it "should find nearby fields" do
|
61
|
+
StandardFields.should respond_to(:find_nearby)
|
62
|
+
|
63
|
+
# stub request
|
64
|
+
stub_request(:get, "#{FlexmlsApi.endpoint}/#{FlexmlsApi.version}/standardfields/nearby/A").
|
65
|
+
with(:query => {
|
66
|
+
:ApiSig => "0601ee6e972659098318721a3c0ecb00",
|
67
|
+
:AuthToken => "c401736bf3d3f754f07c04e460e09573",
|
68
|
+
:ApiUser => "foobar",
|
69
|
+
:Lat => "50",
|
70
|
+
:Lon => "-92",
|
71
|
+
:_expand => "1"
|
72
|
+
}).
|
73
|
+
to_return(:body => fixture('standardfields_nearby.json'))
|
74
|
+
|
75
|
+
# request
|
76
|
+
fields = StandardFields.find_nearby(["A"], {:Lat => 50, :Lon => -92})
|
77
|
+
|
78
|
+
# validate response
|
79
|
+
fields["D"]["Success"].should eq(true)
|
80
|
+
fields["D"]["Results"].first.should have_key("City")
|
81
|
+
fields["D"]["Results"].first.should have_key("PostalCode")
|
82
|
+
fields["D"]["Results"].first.should have_key("StateOrProvince")
|
83
|
+
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
@@ -1,44 +1,23 @@
|
|
1
1
|
require './spec/spec_helper'
|
2
2
|
|
3
3
|
describe FlexmlsApi do
|
4
|
+
after(:each) do
|
5
|
+
reset_config
|
6
|
+
end
|
7
|
+
|
4
8
|
it "should load the version" do
|
5
9
|
subject::VERSION.should match(/\d+\.\d+\.\d+/)
|
6
10
|
end
|
7
11
|
|
8
12
|
it "should give me a client connection" do
|
9
|
-
subject.client.
|
13
|
+
subject.client.should be_a(FlexmlsApi::Client)
|
10
14
|
end
|
11
15
|
|
12
16
|
it "should reset my connection" do
|
13
17
|
c1 = subject.client
|
14
18
|
subject.reset
|
15
|
-
subject.client.should_not eq
|
19
|
+
subject.client.should_not eq(c1)
|
16
20
|
end
|
17
21
|
|
18
22
|
end
|
19
23
|
|
20
|
-
describe FlexmlsApi::Authentication, "Authentication" do
|
21
|
-
describe "build_param_hash" do
|
22
|
-
before(:each) do
|
23
|
-
class StubClass
|
24
|
-
end
|
25
|
-
@auth_stub = StubClass.new
|
26
|
-
@auth_stub.extend(FlexmlsApi::Authentication)
|
27
|
-
end
|
28
|
-
|
29
|
-
it "Should return a blank string when passed nil" do
|
30
|
-
@auth_stub.build_param_string(nil).should be_empty
|
31
|
-
end
|
32
|
-
|
33
|
-
it "should return a correct param string for one item" do
|
34
|
-
@auth_stub.build_param_string({:foo => "bar"}).should match "foobar"
|
35
|
-
end
|
36
|
-
|
37
|
-
it "should alphabatize the param names by key first, then by value" do
|
38
|
-
@auth_stub.build_param_string({:zoo => "zar", :ooo => "car"}).should match "ooocarzoozar"
|
39
|
-
@auth_stub.build_param_string({:Akey => "aValue", :aNotherkey => "AnotherValue"}).should
|
40
|
-
match "AkeyaValueaNotherkeyAnotherValue"
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
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:
|
5
|
-
prerelease:
|
4
|
+
hash: 5
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 4
|
9
|
+
- 5
|
10
|
+
version: 0.4.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brandon Hornseth
|
@@ -16,95 +16,108 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-05-25 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
|
-
|
23
|
+
type: :runtime
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
25
|
none: false
|
25
26
|
requirements:
|
26
|
-
- - "
|
27
|
+
- - "="
|
27
28
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
29
|
+
hash: 19
|
29
30
|
segments:
|
30
31
|
- 0
|
31
|
-
|
32
|
-
|
32
|
+
- 7
|
33
|
+
- 8
|
34
|
+
version: 0.7.8
|
35
|
+
name: curb
|
36
|
+
version_requirements: *id001
|
33
37
|
prerelease: false
|
34
|
-
type: :runtime
|
35
|
-
name: faraday
|
36
38
|
- !ruby/object:Gem::Dependency
|
37
|
-
|
39
|
+
type: :runtime
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
41
|
none: false
|
39
42
|
requirements:
|
40
|
-
- - "
|
43
|
+
- - "="
|
41
44
|
- !ruby/object:Gem::Version
|
42
|
-
hash:
|
45
|
+
hash: 13
|
43
46
|
segments:
|
44
47
|
- 0
|
45
|
-
|
46
|
-
|
48
|
+
- 5
|
49
|
+
- 3
|
50
|
+
version: 0.5.3
|
51
|
+
name: faraday
|
52
|
+
version_requirements: *id002
|
47
53
|
prerelease: false
|
48
|
-
type: :runtime
|
49
|
-
name: curb
|
50
54
|
- !ruby/object:Gem::Dependency
|
51
|
-
|
55
|
+
type: :runtime
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
57
|
none: false
|
53
58
|
requirements:
|
54
|
-
- - "
|
59
|
+
- - "="
|
55
60
|
- !ruby/object:Gem::Version
|
56
|
-
hash:
|
61
|
+
hash: 17
|
57
62
|
segments:
|
58
63
|
- 0
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
type: :runtime
|
64
|
+
- 3
|
65
|
+
- 1
|
66
|
+
version: 0.3.1
|
63
67
|
name: faraday_middleware
|
68
|
+
version_requirements: *id003
|
69
|
+
prerelease: false
|
64
70
|
- !ruby/object:Gem::Dependency
|
65
|
-
|
71
|
+
type: :runtime
|
72
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
73
|
none: false
|
67
74
|
requirements:
|
68
|
-
- - "
|
75
|
+
- - "="
|
69
76
|
- !ruby/object:Gem::Version
|
70
|
-
hash:
|
77
|
+
hash: 21
|
71
78
|
segments:
|
72
79
|
- 0
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
type: :runtime
|
80
|
+
- 0
|
81
|
+
- 5
|
82
|
+
version: 0.0.5
|
77
83
|
name: multi_json
|
84
|
+
version_requirements: *id004
|
85
|
+
prerelease: false
|
78
86
|
- !ruby/object:Gem::Dependency
|
79
|
-
|
87
|
+
type: :runtime
|
88
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
89
|
none: false
|
81
90
|
requirements:
|
82
|
-
- - "
|
91
|
+
- - "="
|
83
92
|
- !ruby/object:Gem::Version
|
84
|
-
hash:
|
93
|
+
hash: 11
|
85
94
|
segments:
|
86
|
-
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
type: :runtime
|
95
|
+
- 1
|
96
|
+
- 4
|
97
|
+
- 6
|
98
|
+
version: 1.4.6
|
91
99
|
name: json
|
100
|
+
version_requirements: *id005
|
101
|
+
prerelease: false
|
92
102
|
- !ruby/object:Gem::Dependency
|
93
|
-
|
103
|
+
type: :runtime
|
104
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
94
105
|
none: false
|
95
106
|
requirements:
|
96
|
-
- - "
|
107
|
+
- - "="
|
97
108
|
- !ruby/object:Gem::Version
|
98
|
-
hash:
|
109
|
+
hash: 19
|
99
110
|
segments:
|
100
111
|
- 0
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
type: :runtime
|
112
|
+
- 7
|
113
|
+
- 8
|
114
|
+
version: 0.7.8
|
105
115
|
name: yajl-ruby
|
116
|
+
version_requirements: *id006
|
117
|
+
prerelease: false
|
106
118
|
- !ruby/object:Gem::Dependency
|
107
|
-
|
119
|
+
type: :runtime
|
120
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
108
121
|
none: false
|
109
122
|
requirements:
|
110
123
|
- - "="
|
@@ -115,28 +128,29 @@ dependencies:
|
|
115
128
|
- 1
|
116
129
|
- 2
|
117
130
|
version: 2.1.2
|
118
|
-
requirement: *id007
|
119
|
-
prerelease: false
|
120
|
-
type: :runtime
|
121
131
|
name: builder
|
132
|
+
version_requirements: *id007
|
133
|
+
prerelease: false
|
122
134
|
- !ruby/object:Gem::Dependency
|
123
|
-
|
135
|
+
type: :runtime
|
136
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
124
137
|
none: false
|
125
138
|
requirements:
|
126
139
|
- - ~>
|
127
140
|
- !ruby/object:Gem::Version
|
128
|
-
hash:
|
141
|
+
hash: 1923831917
|
129
142
|
segments:
|
130
143
|
- 3
|
131
144
|
- 0
|
132
|
-
-
|
145
|
+
- pre
|
146
|
+
- 2
|
133
147
|
version: 3.0.pre2
|
134
|
-
requirement: *id008
|
135
|
-
prerelease: false
|
136
|
-
type: :runtime
|
137
148
|
name: will_paginate
|
149
|
+
version_requirements: *id008
|
150
|
+
prerelease: false
|
138
151
|
- !ruby/object:Gem::Dependency
|
139
|
-
|
152
|
+
type: :development
|
153
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
140
154
|
none: false
|
141
155
|
requirements:
|
142
156
|
- - ">="
|
@@ -145,12 +159,12 @@ dependencies:
|
|
145
159
|
segments:
|
146
160
|
- 0
|
147
161
|
version: "0"
|
148
|
-
requirement: *id009
|
149
|
-
prerelease: false
|
150
|
-
type: :development
|
151
162
|
name: rspec
|
163
|
+
version_requirements: *id009
|
164
|
+
prerelease: false
|
152
165
|
- !ruby/object:Gem::Dependency
|
153
|
-
|
166
|
+
type: :development
|
167
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
154
168
|
none: false
|
155
169
|
requirements:
|
156
170
|
- - ">="
|
@@ -159,12 +173,12 @@ dependencies:
|
|
159
173
|
segments:
|
160
174
|
- 0
|
161
175
|
version: "0"
|
162
|
-
requirement: *id010
|
163
|
-
prerelease: false
|
164
|
-
type: :development
|
165
176
|
name: jeweler
|
177
|
+
version_requirements: *id010
|
178
|
+
prerelease: false
|
166
179
|
- !ruby/object:Gem::Dependency
|
167
|
-
|
180
|
+
type: :development
|
181
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
168
182
|
none: false
|
169
183
|
requirements:
|
170
184
|
- - ">="
|
@@ -173,12 +187,12 @@ dependencies:
|
|
173
187
|
segments:
|
174
188
|
- 0
|
175
189
|
version: "0"
|
176
|
-
requirement: *id011
|
177
|
-
prerelease: false
|
178
|
-
type: :development
|
179
190
|
name: curb
|
191
|
+
version_requirements: *id011
|
192
|
+
prerelease: false
|
180
193
|
- !ruby/object:Gem::Dependency
|
181
|
-
|
194
|
+
type: :development
|
195
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
182
196
|
none: false
|
183
197
|
requirements:
|
184
198
|
- - ">="
|
@@ -187,10 +201,9 @@ dependencies:
|
|
187
201
|
segments:
|
188
202
|
- 0
|
189
203
|
version: "0"
|
190
|
-
requirement: *id012
|
191
|
-
prerelease: false
|
192
|
-
type: :development
|
193
204
|
name: json
|
205
|
+
version_requirements: *id012
|
206
|
+
prerelease: false
|
194
207
|
description: A library for interacting with the flexmls web services.
|
195
208
|
email: api-support@flexmls.com
|
196
209
|
executables: []
|
@@ -209,6 +222,9 @@ files:
|
|
209
222
|
- VERSION
|
210
223
|
- lib/flexmls_api.rb
|
211
224
|
- lib/flexmls_api/authentication.rb
|
225
|
+
- lib/flexmls_api/authentication/api_auth.rb
|
226
|
+
- lib/flexmls_api/authentication/base_auth.rb
|
227
|
+
- lib/flexmls_api/authentication/oauth2.rb
|
212
228
|
- lib/flexmls_api/client.rb
|
213
229
|
- lib/flexmls_api/configuration.rb
|
214
230
|
- lib/flexmls_api/faraday.rb
|
@@ -223,18 +239,28 @@ files:
|
|
223
239
|
- lib/flexmls_api/models/idx_link.rb
|
224
240
|
- lib/flexmls_api/models/listing.rb
|
225
241
|
- lib/flexmls_api/models/market_statistics.rb
|
242
|
+
- lib/flexmls_api/models/note.rb
|
226
243
|
- lib/flexmls_api/models/photo.rb
|
227
244
|
- lib/flexmls_api/models/property_types.rb
|
228
245
|
- lib/flexmls_api/models/standard_fields.rb
|
229
246
|
- lib/flexmls_api/models/subresource.rb
|
230
247
|
- lib/flexmls_api/models/system_info.rb
|
248
|
+
- lib/flexmls_api/models/tour_of_home.rb
|
231
249
|
- lib/flexmls_api/models/video.rb
|
232
250
|
- lib/flexmls_api/models/virtual_tour.rb
|
233
251
|
- lib/flexmls_api/paginate.rb
|
234
252
|
- lib/flexmls_api/primary_array.rb
|
235
253
|
- lib/flexmls_api/request.rb
|
236
254
|
- lib/flexmls_api/version.rb
|
255
|
+
- spec/fixtures/add_note.json
|
256
|
+
- spec/fixtures/agent_shared_note.json
|
257
|
+
- spec/fixtures/agent_shared_note_empty.json
|
258
|
+
- spec/fixtures/authentication_failure.json
|
237
259
|
- spec/fixtures/contacts.json
|
260
|
+
- spec/fixtures/count.json
|
261
|
+
- spec/fixtures/errors/expired.json
|
262
|
+
- spec/fixtures/generic_delete.json
|
263
|
+
- spec/fixtures/generic_failure.json
|
238
264
|
- spec/fixtures/listing_document_index.json
|
239
265
|
- spec/fixtures/listing_no_subresources.json
|
240
266
|
- spec/fixtures/listing_photos_index.json
|
@@ -245,10 +271,19 @@ files:
|
|
245
271
|
- spec/fixtures/listing_with_supplement.json
|
246
272
|
- spec/fixtures/listing_with_videos.json
|
247
273
|
- spec/fixtures/listing_with_vtour.json
|
274
|
+
- spec/fixtures/oauth2_access.json
|
275
|
+
- spec/fixtures/oauth2_error.json
|
248
276
|
- spec/fixtures/session.json
|
277
|
+
- spec/fixtures/standardfields.json
|
278
|
+
- spec/fixtures/standardfields_city.json
|
279
|
+
- spec/fixtures/standardfields_nearby.json
|
280
|
+
- spec/fixtures/standardfields_stateorprovince.json
|
249
281
|
- spec/fixtures/success.json
|
282
|
+
- spec/fixtures/tour_of_homes.json
|
250
283
|
- spec/json_helper.rb
|
251
284
|
- spec/spec_helper.rb
|
285
|
+
- spec/unit/flexmls_api/authentication/api_auth_spec.rb
|
286
|
+
- spec/unit/flexmls_api/authentication/oauth2_spec.rb
|
252
287
|
- spec/unit/flexmls_api/authentication_spec.rb
|
253
288
|
- spec/unit/flexmls_api/configuration_spec.rb
|
254
289
|
- spec/unit/flexmls_api/faraday_spec.rb
|
@@ -258,15 +293,18 @@ files:
|
|
258
293
|
- spec/unit/flexmls_api/models/contact_spec.rb
|
259
294
|
- spec/unit/flexmls_api/models/document_spec.rb
|
260
295
|
- spec/unit/flexmls_api/models/listing_spec.rb
|
296
|
+
- spec/unit/flexmls_api/models/note_spec.rb
|
261
297
|
- spec/unit/flexmls_api/models/photo_spec.rb
|
262
298
|
- spec/unit/flexmls_api/models/property_types_spec.rb
|
263
299
|
- spec/unit/flexmls_api/models/standard_fields_spec.rb
|
264
300
|
- spec/unit/flexmls_api/models/system_info_spec.rb
|
301
|
+
- spec/unit/flexmls_api/models/tour_of_home_spec.rb
|
265
302
|
- spec/unit/flexmls_api/models/video_spec.rb
|
266
303
|
- spec/unit/flexmls_api/models/virtual_tour_spec.rb
|
267
304
|
- spec/unit/flexmls_api/paginate_spec.rb
|
268
305
|
- spec/unit/flexmls_api/primary_array_spec.rb
|
269
306
|
- spec/unit/flexmls_api/request_spec.rb
|
307
|
+
- spec/unit/flexmls_api/standard_fields_spec.rb
|
270
308
|
- spec/unit/flexmls_api_spec.rb
|
271
309
|
has_rdoc: true
|
272
310
|
homepage: https://github.com/flexmls/flexmls_api
|
@@ -298,13 +336,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
298
336
|
requirements: []
|
299
337
|
|
300
338
|
rubyforge_project:
|
301
|
-
rubygems_version: 1.
|
339
|
+
rubygems_version: 1.6.2
|
302
340
|
signing_key:
|
303
341
|
specification_version: 3
|
304
342
|
summary: A library for interacting with the flexmls web services.
|
305
343
|
test_files:
|
306
344
|
- spec/json_helper.rb
|
307
345
|
- spec/spec_helper.rb
|
346
|
+
- spec/unit/flexmls_api/authentication/api_auth_spec.rb
|
347
|
+
- spec/unit/flexmls_api/authentication/oauth2_spec.rb
|
308
348
|
- spec/unit/flexmls_api/authentication_spec.rb
|
309
349
|
- spec/unit/flexmls_api/configuration_spec.rb
|
310
350
|
- spec/unit/flexmls_api/faraday_spec.rb
|
@@ -314,13 +354,16 @@ test_files:
|
|
314
354
|
- spec/unit/flexmls_api/models/contact_spec.rb
|
315
355
|
- spec/unit/flexmls_api/models/document_spec.rb
|
316
356
|
- spec/unit/flexmls_api/models/listing_spec.rb
|
357
|
+
- spec/unit/flexmls_api/models/note_spec.rb
|
317
358
|
- spec/unit/flexmls_api/models/photo_spec.rb
|
318
359
|
- spec/unit/flexmls_api/models/property_types_spec.rb
|
319
360
|
- spec/unit/flexmls_api/models/standard_fields_spec.rb
|
320
361
|
- spec/unit/flexmls_api/models/system_info_spec.rb
|
362
|
+
- spec/unit/flexmls_api/models/tour_of_home_spec.rb
|
321
363
|
- spec/unit/flexmls_api/models/video_spec.rb
|
322
364
|
- spec/unit/flexmls_api/models/virtual_tour_spec.rb
|
323
365
|
- spec/unit/flexmls_api/paginate_spec.rb
|
324
366
|
- spec/unit/flexmls_api/primary_array_spec.rb
|
325
367
|
- spec/unit/flexmls_api/request_spec.rb
|
368
|
+
- spec/unit/flexmls_api/standard_fields_spec.rb
|
326
369
|
- spec/unit/flexmls_api_spec.rb
|