simplyrets 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,86 +0,0 @@
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 SwaggerClient::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 = SwaggerClient::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(SwaggerClient::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
86
-
@@ -1,76 +0,0 @@
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 SwaggerClient::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 = SwaggerClient::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(SwaggerClient::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
76
-
@@ -1,106 +0,0 @@
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 SwaggerClient::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 = SwaggerClient::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(SwaggerClient::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
106
-
@@ -1,66 +0,0 @@
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 SwaggerClient::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 = SwaggerClient::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(SwaggerClient::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
66
-
@@ -1,80 +0,0 @@
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/simplyrets'
11
- require 'simplyrets/simplyrets/configuration'
12
- require 'simplyrets/simplyrets/api_error'
13
- require 'simplyrets/simplyrets/request'
14
- require 'simplyrets/simplyrets/response'
15
- require 'simplyrets/simplyrets/version'
16
- require 'simplyrets/api/default_api'
17
-
18
-
19
- RSpec.configure do |config|
20
- # some (optional) config here
21
- config.expect_with :rspec do |c|
22
- c.syntax = :should
23
- end
24
- config.mock_with :rspec do |c|
25
- c.syntax = :should
26
- end
27
- end
28
-
29
-
30
- WebMock.allow_net_connect! if defined? WebMock
31
-
32
- def help
33
- puts "\nOh noes! You gotta stuff your swagger credentials in ~/.swagger.yml like so:\n\n"
34
- puts "api_key: '12345abcdefg'"
35
- puts "username: 'fumanchu'"
36
- puts "password: 'kalamazoo'\n\n"
37
- exit
38
- end
39
-
40
- # no longer reading credentials (not used) from file (20150413)
41
- # Parse ~/.swagger.yml for user credentials
42
- #begin
43
- # CREDENTIALS = YAML::load_file(File.join(ENV['HOME'], ".swagger.yml")).symbolize_keys
44
- #rescue
45
- # help
46
- #end
47
-
48
- API_CLIENT = SimplyRetsClient::Properties_api.new(SimplyRetsClient::SimplyRets.configure)
49
-
50
- def random_id
51
- rand(1000000) + 20000
52
- end
53
-
54
- ## create a random pet, return its id
55
- #def prepare_pet(pet_api)
56
- # pet_id = random_id
57
- # category = Petstore::Category.new('id' => 20002, 'name' => 'category test')
58
- # tag = Petstore::Tag.new('id' => 30002, 'name' => 'tag test')
59
- # pet = Petstore::Pet.new('id' => pet_id, 'name' => "RUBY UNIT TESTING", 'photo_urls' => 'photo url',
60
- # 'category' => category, 'tags' => [tag], 'status' => 'pending')
61
- # pet_api.add_pet(pet)
62
- # return pet_id
63
- #end
64
- #
65
- ## create a random order, return its id
66
- #def prepare_store(store_api)
67
- # order_id = random_id
68
- # order = Petstore::Order.new("id" => order_id,
69
- # "petId" => 123,
70
- # "quantity" => 789,
71
- # "shipDate" => "2015-04-06T23:42:01.678Z",
72
- # "status" => "placed",
73
- # "complete" => false)
74
- # store_api.place_order(order)
75
- # return order_id
76
- #end
77
-
78
- # A random string to tack onto stuff to ensure we're not seeing
79
- # data from a previous test run
80
- RAND = ("a".."z").to_a.sample(8).join
@@ -1,71 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler/setup'
3
- require 'petstore'
4
- require 'vcr'
5
- require 'typhoeus'
6
- require 'json'
7
- require 'yaml'
8
- require 'rspec'
9
-
10
- RSpec.configure do |config|
11
- # some (optional) config here
12
- config.expect_with :rspec do |c|
13
- c.syntax = :should
14
- end
15
- config.mock_with :rspec do |c|
16
- c.syntax = :should
17
- end
18
- end
19
-
20
-
21
- WebMock.allow_net_connect! if defined? WebMock
22
-
23
- def help
24
- puts "\nOh noes! You gotta stuff your swagger credentials in ~/.swagger.yml like so:\n\n"
25
- puts "api_key: '12345abcdefg'"
26
- puts "username: 'fumanchu'"
27
- puts "password: 'kalamazoo'\n\n"
28
- exit
29
- end
30
-
31
- # no longer reading credentials (not used) from file (20150413)
32
- # Parse ~/.swagger.yml for user credentials
33
- #begin
34
- # CREDENTIALS = YAML::load_file(File.join(ENV['HOME'], ".swagger.yml")).symbolize_keys
35
- #rescue
36
- # help
37
- #end
38
-
39
- API_CLIENT = Petstore::ApiClient.new(Petstore::Configuration.new)
40
-
41
- def random_id
42
- rand(1000000) + 20000
43
- end
44
-
45
- # create a random pet, return its id
46
- def prepare_pet(pet_api)
47
- pet_id = random_id
48
- category = Petstore::Category.new('id' => 20002, 'name' => 'category test')
49
- tag = Petstore::Tag.new('id' => 30002, 'name' => 'tag test')
50
- pet = Petstore::Pet.new('id' => pet_id, 'name' => "RUBY UNIT TESTING", 'photo_urls' => 'photo url',
51
- 'category' => category, 'tags' => [tag], 'status' => 'pending')
52
- pet_api.add_pet(pet)
53
- return pet_id
54
- end
55
-
56
- # create a random order, return its id
57
- def prepare_store(store_api)
58
- order_id = random_id
59
- order = Petstore::Order.new("id" => order_id,
60
- "petId" => 123,
61
- "quantity" => 789,
62
- "shipDate" => "2015-04-06T23:42:01.678Z",
63
- "status" => "placed",
64
- "complete" => false)
65
- store_api.place_order(order)
66
- return order_id
67
- end
68
-
69
- # A random string to tack onto stuff to ensure we're not seeing
70
- # data from a previous test run
71
- RAND = ("a".."z").to_a.sample(8).join