simplyrets 1.0.7 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +23 -21
- data/Makefile +48 -0
- data/README.org +5 -58
- data/example.rb +14 -4
- data/lib/simplyrets.rb +42 -21
- data/lib/simplyrets/api/default_api.rb +292 -59
- data/lib/simplyrets/api_client.rb +370 -0
- data/lib/simplyrets/api_error.rb +36 -0
- data/lib/simplyrets/configuration.rb +170 -0
- data/lib/simplyrets/models/agent.rb +146 -11
- data/lib/simplyrets/models/broker.rb +133 -7
- data/lib/simplyrets/models/contact_information.rb +149 -17
- data/lib/simplyrets/models/error.rb +138 -9
- data/lib/simplyrets/models/geographic_data.rb +150 -12
- data/lib/simplyrets/models/listing.rb +248 -49
- data/lib/simplyrets/models/mls_information.rb +148 -12
- data/lib/simplyrets/models/office.rb +146 -11
- data/lib/simplyrets/models/open_house.rb +215 -12
- data/lib/simplyrets/models/parking.rb +148 -17
- data/lib/simplyrets/models/property.rb +353 -129
- data/lib/simplyrets/models/sales.rb +163 -25
- data/lib/simplyrets/models/school.rb +167 -24
- data/lib/simplyrets/models/street_address.rb +204 -26
- data/lib/simplyrets/models/tax.rb +150 -18
- data/lib/simplyrets/version.rb +15 -0
- data/multi-query-param.patch +44 -0
- data/simplyrets.gemspec +4 -4
- data/spec/api/default_api_spec.rb +172 -0
- data/spec/models/agent_spec.rb +75 -0
- data/spec/models/broker_spec.rb +45 -0
- data/spec/models/contact_information_spec.rb +65 -0
- data/spec/models/error_spec.rb +55 -0
- data/spec/models/geographic_data_spec.rb +85 -0
- data/spec/models/listing_spec.rb +245 -0
- data/spec/models/mls_information_spec.rb +75 -0
- data/spec/models/office_spec.rb +75 -0
- data/spec/models/open_house_spec.rb +115 -0
- data/spec/models/parking_spec.rb +65 -0
- data/spec/models/property_spec.rb +365 -0
- data/spec/models/sales_spec.rb +85 -0
- data/spec/models/school_spec.rb +75 -0
- data/spec/models/street_address_spec.rb +105 -0
- data/spec/models/tax_spec.rb +65 -0
- data/spec/spec_helper.rb +78 -0
- metadata +33 -18
- data/lib/simplyrets.rb~ +0 -34
- data/lib/simplyrets/api/#default_api.rb# +0 -146
- data/lib/simplyrets/simplyrets/api_error.rb +0 -26
- data/lib/simplyrets/simplyrets/configuration.rb +0 -101
- data/lib/simplyrets/simplyrets/request.rb +0 -248
- data/lib/simplyrets/simplyrets/response.rb +0 -156
- data/lib/simplyrets/simplyrets/version.rb +0 -5
- data/simplyrets-1.0.6.gem +0 -0
@@ -0,0 +1,85 @@
|
|
1
|
+
=begin
|
2
|
+
SimplyRETS API
|
3
|
+
|
4
|
+
The SimplyRETS API is an exciting step towards making it easier for\ndevelopers and real estate agents to build something awesome with\nreal estate data!\n\nThe documentation below makes live requests to our API using the\ntrial data. To get set up with the API using live MLS data, you\nmust have RETS credentials from your MLS, which you can then use to\ncreate an app with SimplyRETS. For more information on that\nprocess, please see our [FAQ](https://simplyrets.com/faq), [Getting\nStarted](https://simplyrets.com/blog/getting-set-up.html) page, or\n[contact us](https://simplyrets.com/\\#home-contact).\n\nBelow you'll find the API endpoints, query parameters, response bodies,\nand other information about using the SimplyRETS API. You can run\nqueries by clicking the 'Try it Out' button at the bottom of each\nsection.\n\n### Authentication\nThe SimplyRETS API uses Basic Authentication. When you create an\napp, you'll get a set of API credentials to access your\nlistings. If you're trying out the test data, you can use\n`simplyrets:simplyrets` for connecting to the API.\n\n### Media Types\nThe SimplyRETS API uses the 'Accept' header to allow clients to\ncontrol media types (content versions). We maintain backwards\ncompatibility with API clients by allowing them to specify a\ncontent version. We highly recommend setting and explicity media\ntype when your application reaches production. Both the structure\nand content of our API response bodies is subject to change so we\ncan add new features while respecting the stability of applications\nwhich have already been developed.\n\nTo always use the latest SimplyRETS content version, simply use\n`application/json` in your application `Accept` header.\n\nIf you want to pin your clients media type to a specific version,\nyou can use the vendor-specific SimplyRETS media type, e.g.\n`application/vnd.simplyrets-v0.1+json\"`\n\nTo view all valid content-types for making an `OPTIONS`, make a\nrequest to the SimplyRETS api root\n\n`curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/`\n\nThe default media types used in our API responses may change in the\nfuture. If you're building an application and care about the\nstability of the API, be sure to request a specific media type in the\nAccept header as shown in the examples below.\n\nThe wordpress plugin automatically sets the `Accept` header for the\ncompatible SimplyRETS media types.\n\n### Pagination\nThere a few pieces of useful information about each request stored\nin the HTTP Headers:\n\n- `X-Total-Count` shows you the total amount of listings that match\n your current query.\n- `Link` contains pre-built pagination links for accessing the next\n'page' of listings that match your query. Read more about that\n[here](https://simplyrets.com/blog/api-pagination.html).\n
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for SimplyRetsClient::Sales
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'Sales' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = SimplyRetsClient::Sales.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of Sales' do
|
31
|
+
it 'should create an instact of Sales' do
|
32
|
+
@instance.should be_a(SimplyRetsClient::Sales)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "close_date"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here
|
38
|
+
# should be_a()
|
39
|
+
# should be_nil
|
40
|
+
# should ==
|
41
|
+
# should_not ==
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe 'test attribute "office"' do
|
46
|
+
it 'should work' do
|
47
|
+
# assertion here
|
48
|
+
# should be_a()
|
49
|
+
# should be_nil
|
50
|
+
# should ==
|
51
|
+
# should_not ==
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe 'test attribute "close_price"' do
|
56
|
+
it 'should work' do
|
57
|
+
# assertion here
|
58
|
+
# should be_a()
|
59
|
+
# should be_nil
|
60
|
+
# should ==
|
61
|
+
# should_not ==
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'test attribute "agent"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here
|
68
|
+
# should be_a()
|
69
|
+
# should be_nil
|
70
|
+
# should ==
|
71
|
+
# should_not ==
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
describe 'test attribute "contract_date"' do
|
76
|
+
it 'should work' do
|
77
|
+
# assertion here
|
78
|
+
# should be_a()
|
79
|
+
# should be_nil
|
80
|
+
# should ==
|
81
|
+
# should_not ==
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
=begin
|
2
|
+
SimplyRETS API
|
3
|
+
|
4
|
+
The SimplyRETS API is an exciting step towards making it easier for\ndevelopers and real estate agents to build something awesome with\nreal estate data!\n\nThe documentation below makes live requests to our API using the\ntrial data. To get set up with the API using live MLS data, you\nmust have RETS credentials from your MLS, which you can then use to\ncreate an app with SimplyRETS. For more information on that\nprocess, please see our [FAQ](https://simplyrets.com/faq), [Getting\nStarted](https://simplyrets.com/blog/getting-set-up.html) page, or\n[contact us](https://simplyrets.com/\\#home-contact).\n\nBelow you'll find the API endpoints, query parameters, response bodies,\nand other information about using the SimplyRETS API. You can run\nqueries by clicking the 'Try it Out' button at the bottom of each\nsection.\n\n### Authentication\nThe SimplyRETS API uses Basic Authentication. When you create an\napp, you'll get a set of API credentials to access your\nlistings. If you're trying out the test data, you can use\n`simplyrets:simplyrets` for connecting to the API.\n\n### Media Types\nThe SimplyRETS API uses the 'Accept' header to allow clients to\ncontrol media types (content versions). We maintain backwards\ncompatibility with API clients by allowing them to specify a\ncontent version. We highly recommend setting and explicity media\ntype when your application reaches production. Both the structure\nand content of our API response bodies is subject to change so we\ncan add new features while respecting the stability of applications\nwhich have already been developed.\n\nTo always use the latest SimplyRETS content version, simply use\n`application/json` in your application `Accept` header.\n\nIf you want to pin your clients media type to a specific version,\nyou can use the vendor-specific SimplyRETS media type, e.g.\n`application/vnd.simplyrets-v0.1+json\"`\n\nTo view all valid content-types for making an `OPTIONS`, make a\nrequest to the SimplyRETS api root\n\n`curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/`\n\nThe default media types used in our API responses may change in the\nfuture. If you're building an application and care about the\nstability of the API, be sure to request a specific media type in the\nAccept header as shown in the examples below.\n\nThe wordpress plugin automatically sets the `Accept` header for the\ncompatible SimplyRETS media types.\n\n### Pagination\nThere a few pieces of useful information about each request stored\nin the HTTP Headers:\n\n- `X-Total-Count` shows you the total amount of listings that match\n your current query.\n- `Link` contains pre-built pagination links for accessing the next\n'page' of listings that match your query. Read more about that\n[here](https://simplyrets.com/blog/api-pagination.html).\n
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for SimplyRetsClient::School
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'School' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = SimplyRetsClient::School.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of School' do
|
31
|
+
it 'should create an instact of School' do
|
32
|
+
@instance.should be_a(SimplyRetsClient::School)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "middle_school"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here
|
38
|
+
# should be_a()
|
39
|
+
# should be_nil
|
40
|
+
# should ==
|
41
|
+
# should_not ==
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe 'test attribute "high_school"' do
|
46
|
+
it 'should work' do
|
47
|
+
# assertion here
|
48
|
+
# should be_a()
|
49
|
+
# should be_nil
|
50
|
+
# should ==
|
51
|
+
# should_not ==
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe 'test attribute "elementary_school"' do
|
56
|
+
it 'should work' do
|
57
|
+
# assertion here
|
58
|
+
# should be_a()
|
59
|
+
# should be_nil
|
60
|
+
# should ==
|
61
|
+
# should_not ==
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'test attribute "district"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here
|
68
|
+
# should be_a()
|
69
|
+
# should be_nil
|
70
|
+
# should ==
|
71
|
+
# should_not ==
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
@@ -0,0 +1,105 @@
|
|
1
|
+
=begin
|
2
|
+
SimplyRETS API
|
3
|
+
|
4
|
+
The SimplyRETS API is an exciting step towards making it easier for\ndevelopers and real estate agents to build something awesome with\nreal estate data!\n\nThe documentation below makes live requests to our API using the\ntrial data. To get set up with the API using live MLS data, you\nmust have RETS credentials from your MLS, which you can then use to\ncreate an app with SimplyRETS. For more information on that\nprocess, please see our [FAQ](https://simplyrets.com/faq), [Getting\nStarted](https://simplyrets.com/blog/getting-set-up.html) page, or\n[contact us](https://simplyrets.com/\\#home-contact).\n\nBelow you'll find the API endpoints, query parameters, response bodies,\nand other information about using the SimplyRETS API. You can run\nqueries by clicking the 'Try it Out' button at the bottom of each\nsection.\n\n### Authentication\nThe SimplyRETS API uses Basic Authentication. When you create an\napp, you'll get a set of API credentials to access your\nlistings. If you're trying out the test data, you can use\n`simplyrets:simplyrets` for connecting to the API.\n\n### Media Types\nThe SimplyRETS API uses the 'Accept' header to allow clients to\ncontrol media types (content versions). We maintain backwards\ncompatibility with API clients by allowing them to specify a\ncontent version. We highly recommend setting and explicity media\ntype when your application reaches production. Both the structure\nand content of our API response bodies is subject to change so we\ncan add new features while respecting the stability of applications\nwhich have already been developed.\n\nTo always use the latest SimplyRETS content version, simply use\n`application/json` in your application `Accept` header.\n\nIf you want to pin your clients media type to a specific version,\nyou can use the vendor-specific SimplyRETS media type, e.g.\n`application/vnd.simplyrets-v0.1+json\"`\n\nTo view all valid content-types for making an `OPTIONS`, make a\nrequest to the SimplyRETS api root\n\n`curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/`\n\nThe default media types used in our API responses may change in the\nfuture. If you're building an application and care about the\nstability of the API, be sure to request a specific media type in the\nAccept header as shown in the examples below.\n\nThe wordpress plugin automatically sets the `Accept` header for the\ncompatible SimplyRETS media types.\n\n### Pagination\nThere a few pieces of useful information about each request stored\nin the HTTP Headers:\n\n- `X-Total-Count` shows you the total amount of listings that match\n your current query.\n- `Link` contains pre-built pagination links for accessing the next\n'page' of listings that match your query. Read more about that\n[here](https://simplyrets.com/blog/api-pagination.html).\n
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for SimplyRetsClient::StreetAddress
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'StreetAddress' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = SimplyRetsClient::StreetAddress.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of StreetAddress' do
|
31
|
+
it 'should create an instact of StreetAddress' do
|
32
|
+
@instance.should be_a(SimplyRetsClient::StreetAddress)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "cross_street"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here
|
38
|
+
# should be_a()
|
39
|
+
# should be_nil
|
40
|
+
# should ==
|
41
|
+
# should_not ==
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe 'test attribute "country"' do
|
46
|
+
it 'should work' do
|
47
|
+
# assertion here
|
48
|
+
# should be_a()
|
49
|
+
# should be_nil
|
50
|
+
# should ==
|
51
|
+
# should_not ==
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe 'test attribute "postal_code"' do
|
56
|
+
it 'should work' do
|
57
|
+
# assertion here
|
58
|
+
# should be_a()
|
59
|
+
# should be_nil
|
60
|
+
# should ==
|
61
|
+
# should_not ==
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'test attribute "street_name"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here
|
68
|
+
# should be_a()
|
69
|
+
# should be_nil
|
70
|
+
# should ==
|
71
|
+
# should_not ==
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
describe 'test attribute "city"' do
|
76
|
+
it 'should work' do
|
77
|
+
# assertion here
|
78
|
+
# should be_a()
|
79
|
+
# should be_nil
|
80
|
+
# should ==
|
81
|
+
# should_not ==
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
describe 'test attribute "street_number"' do
|
86
|
+
it 'should work' do
|
87
|
+
# assertion here
|
88
|
+
# should be_a()
|
89
|
+
# should be_nil
|
90
|
+
# should ==
|
91
|
+
# should_not ==
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
describe 'test attribute "full"' do
|
96
|
+
it 'should work' do
|
97
|
+
# assertion here
|
98
|
+
# should be_a()
|
99
|
+
# should be_nil
|
100
|
+
# should ==
|
101
|
+
# should_not ==
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
=begin
|
2
|
+
SimplyRETS API
|
3
|
+
|
4
|
+
The SimplyRETS API is an exciting step towards making it easier for\ndevelopers and real estate agents to build something awesome with\nreal estate data!\n\nThe documentation below makes live requests to our API using the\ntrial data. To get set up with the API using live MLS data, you\nmust have RETS credentials from your MLS, which you can then use to\ncreate an app with SimplyRETS. For more information on that\nprocess, please see our [FAQ](https://simplyrets.com/faq), [Getting\nStarted](https://simplyrets.com/blog/getting-set-up.html) page, or\n[contact us](https://simplyrets.com/\\#home-contact).\n\nBelow you'll find the API endpoints, query parameters, response bodies,\nand other information about using the SimplyRETS API. You can run\nqueries by clicking the 'Try it Out' button at the bottom of each\nsection.\n\n### Authentication\nThe SimplyRETS API uses Basic Authentication. When you create an\napp, you'll get a set of API credentials to access your\nlistings. If you're trying out the test data, you can use\n`simplyrets:simplyrets` for connecting to the API.\n\n### Media Types\nThe SimplyRETS API uses the 'Accept' header to allow clients to\ncontrol media types (content versions). We maintain backwards\ncompatibility with API clients by allowing them to specify a\ncontent version. We highly recommend setting and explicity media\ntype when your application reaches production. Both the structure\nand content of our API response bodies is subject to change so we\ncan add new features while respecting the stability of applications\nwhich have already been developed.\n\nTo always use the latest SimplyRETS content version, simply use\n`application/json` in your application `Accept` header.\n\nIf you want to pin your clients media type to a specific version,\nyou can use the vendor-specific SimplyRETS media type, e.g.\n`application/vnd.simplyrets-v0.1+json\"`\n\nTo view all valid content-types for making an `OPTIONS`, make a\nrequest to the SimplyRETS api root\n\n`curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/`\n\nThe default media types used in our API responses may change in the\nfuture. If you're building an application and care about the\nstability of the API, be sure to request a specific media type in the\nAccept header as shown in the examples below.\n\nThe wordpress plugin automatically sets the `Accept` header for the\ncompatible SimplyRETS media types.\n\n### Pagination\nThere a few pieces of useful information about each request stored\nin the HTTP Headers:\n\n- `X-Total-Count` shows you the total amount of listings that match\n your current query.\n- `Link` contains pre-built pagination links for accessing the next\n'page' of listings that match your query. Read more about that\n[here](https://simplyrets.com/blog/api-pagination.html).\n
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for SimplyRetsClient::Tax
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'Tax' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = SimplyRetsClient::Tax.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of Tax' do
|
31
|
+
it 'should create an instact of Tax' do
|
32
|
+
@instance.should be_a(SimplyRetsClient::Tax)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "year"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here
|
38
|
+
# should be_a()
|
39
|
+
# should be_nil
|
40
|
+
# should ==
|
41
|
+
# should_not ==
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe 'test attribute "annual_amount"' do
|
46
|
+
it 'should work' do
|
47
|
+
# assertion here
|
48
|
+
# should be_a()
|
49
|
+
# should be_nil
|
50
|
+
# should ==
|
51
|
+
# should_not ==
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe 'test attribute "id"' do
|
56
|
+
it 'should work' do
|
57
|
+
# assertion here
|
58
|
+
# should be_a()
|
59
|
+
# should be_nil
|
60
|
+
# should ==
|
61
|
+
# should_not ==
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
require 'vcr'
|
4
|
+
require 'typhoeus'
|
5
|
+
require 'json'
|
6
|
+
require 'yaml'
|
7
|
+
require 'rspec'
|
8
|
+
|
9
|
+
require 'simplyrets'
|
10
|
+
require 'simplyrets/configuration'
|
11
|
+
require 'simplyrets/api_error'
|
12
|
+
require 'simplyrets/api_client'
|
13
|
+
require 'simplyrets/version'
|
14
|
+
require 'simplyrets/api/default_api'
|
15
|
+
|
16
|
+
|
17
|
+
RSpec.configure do |config|
|
18
|
+
# some (optional) config here
|
19
|
+
config.expect_with :rspec do |c|
|
20
|
+
c.syntax = :should
|
21
|
+
end
|
22
|
+
config.mock_with :rspec do |c|
|
23
|
+
c.syntax = :should
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
WebMock.allow_net_connect! if defined? WebMock
|
29
|
+
|
30
|
+
def help
|
31
|
+
puts "\nOh noes! You gotta stuff your swagger credentials in ~/.swagger.yml like so:\n\n"
|
32
|
+
puts "api_key: '12345abcdefg'"
|
33
|
+
puts "username: 'fumanchu'"
|
34
|
+
puts "password: 'kalamazoo'\n\n"
|
35
|
+
exit
|
36
|
+
end
|
37
|
+
|
38
|
+
# no longer reading credentials (not used) from file (20150413)
|
39
|
+
# Parse ~/.swagger.yml for user credentials
|
40
|
+
#begin
|
41
|
+
# CREDENTIALS = YAML::load_file(File.join(ENV['HOME'], ".swagger.yml")).symbolize_keys
|
42
|
+
#rescue
|
43
|
+
# help
|
44
|
+
#end
|
45
|
+
|
46
|
+
API_CLIENT = SimplyRetsClient::DefaultApi.new(SimplyRetsClient.configure)
|
47
|
+
|
48
|
+
def random_id
|
49
|
+
rand(1000000) + 20000
|
50
|
+
end
|
51
|
+
|
52
|
+
## create a random pet, return its id
|
53
|
+
#def prepare_pet(pet_api)
|
54
|
+
# pet_id = random_id
|
55
|
+
# category = Petstore::Category.new('id' => 20002, 'name' => 'category test')
|
56
|
+
# tag = Petstore::Tag.new('id' => 30002, 'name' => 'tag test')
|
57
|
+
# pet = Petstore::Pet.new('id' => pet_id, 'name' => "RUBY UNIT TESTING", 'photo_urls' => 'photo url',
|
58
|
+
# 'category' => category, 'tags' => [tag], 'status' => 'pending')
|
59
|
+
# pet_api.add_pet(pet)
|
60
|
+
# return pet_id
|
61
|
+
#end
|
62
|
+
#
|
63
|
+
## create a random order, return its id
|
64
|
+
#def prepare_store(store_api)
|
65
|
+
# order_id = random_id
|
66
|
+
# order = Petstore::Order.new("id" => order_id,
|
67
|
+
# "petId" => 123,
|
68
|
+
# "quantity" => 789,
|
69
|
+
# "shipDate" => "2015-04-06T23:42:01.678Z",
|
70
|
+
# "status" => "placed",
|
71
|
+
# "complete" => false)
|
72
|
+
# store_api.place_order(order)
|
73
|
+
# return order_id
|
74
|
+
#end
|
75
|
+
|
76
|
+
# A random string to tack onto stuff to ensure we're not seeing
|
77
|
+
# data from a previous test run
|
78
|
+
RAND = ("a".."z").to_a.sample(8).join
|
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Reichert
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-05-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: typhoeus
|
@@ -17,40 +17,40 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '0.
|
20
|
+
version: '0.8'
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.
|
23
|
+
version: '0.8'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: '0.
|
30
|
+
version: '0.8'
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: '0.8'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: json
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.8'
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 1.
|
43
|
+
version: 1.8.3
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
48
|
- - "~>"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: '1.
|
50
|
+
version: '1.8'
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
53
|
+
version: 1.8.3
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: rspec
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,13 +203,15 @@ files:
|
|
203
203
|
- Gemfile
|
204
204
|
- Gemfile.lock
|
205
205
|
- LICENSE
|
206
|
+
- Makefile
|
206
207
|
- README.org
|
207
208
|
- Rakefile
|
208
209
|
- example.rb
|
209
210
|
- lib/simplyrets.rb
|
210
|
-
- lib/simplyrets.rb~
|
211
|
-
- lib/simplyrets/api/#default_api.rb#
|
212
211
|
- lib/simplyrets/api/default_api.rb
|
212
|
+
- lib/simplyrets/api_client.rb
|
213
|
+
- lib/simplyrets/api_error.rb
|
214
|
+
- lib/simplyrets/configuration.rb
|
213
215
|
- lib/simplyrets/models/agent.rb
|
214
216
|
- lib/simplyrets/models/base_object.rb
|
215
217
|
- lib/simplyrets/models/broker.rb
|
@@ -227,13 +229,26 @@ files:
|
|
227
229
|
- lib/simplyrets/models/street_address.rb
|
228
230
|
- lib/simplyrets/models/tax.rb
|
229
231
|
- lib/simplyrets/simplyrets.rb
|
230
|
-
- lib/simplyrets/
|
231
|
-
-
|
232
|
-
- lib/simplyrets/simplyrets/request.rb
|
233
|
-
- lib/simplyrets/simplyrets/response.rb
|
234
|
-
- lib/simplyrets/simplyrets/version.rb
|
235
|
-
- simplyrets-1.0.6.gem
|
232
|
+
- lib/simplyrets/version.rb
|
233
|
+
- multi-query-param.patch
|
236
234
|
- simplyrets.gemspec
|
235
|
+
- spec/api/default_api_spec.rb
|
236
|
+
- spec/models/agent_spec.rb
|
237
|
+
- spec/models/broker_spec.rb
|
238
|
+
- spec/models/contact_information_spec.rb
|
239
|
+
- spec/models/error_spec.rb
|
240
|
+
- spec/models/geographic_data_spec.rb
|
241
|
+
- spec/models/listing_spec.rb
|
242
|
+
- spec/models/mls_information_spec.rb
|
243
|
+
- spec/models/office_spec.rb
|
244
|
+
- spec/models/open_house_spec.rb
|
245
|
+
- spec/models/parking_spec.rb
|
246
|
+
- spec/models/property_spec.rb
|
247
|
+
- spec/models/sales_spec.rb
|
248
|
+
- spec/models/school_spec.rb
|
249
|
+
- spec/models/street_address_spec.rb
|
250
|
+
- spec/models/tax_spec.rb
|
251
|
+
- spec/spec_helper.rb
|
237
252
|
homepage: https://simplyrets.com
|
238
253
|
licenses:
|
239
254
|
- MIT
|