simplyrets 2.0.0 → 2.0.1

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 (93) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +6 -3
  3. data/Makefile +1 -2
  4. data/README.org +2 -0
  5. data/lib/simplyrets.rb +12 -1
  6. data/lib/simplyrets/api/default_api.rb +132 -128
  7. data/lib/simplyrets/api_client.rb +48 -9
  8. data/lib/simplyrets/api_client.rb.orig +373 -0
  9. data/lib/simplyrets/api_error.rb +12 -1
  10. data/lib/simplyrets/configuration.rb +23 -0
  11. data/lib/simplyrets/models/agent.rb +61 -27
  12. data/lib/simplyrets/models/broker.rb +57 -20
  13. data/lib/simplyrets/models/contact_information.rb +62 -27
  14. data/lib/simplyrets/models/error.rb +59 -23
  15. data/lib/simplyrets/models/geographic_data.rb +61 -28
  16. data/lib/simplyrets/models/listing.rb +94 -70
  17. data/lib/simplyrets/models/mls_information.rb +95 -37
  18. data/lib/simplyrets/models/office.rb +62 -28
  19. data/lib/simplyrets/models/open_house.rb +66 -36
  20. data/lib/simplyrets/models/parking.rb +59 -24
  21. data/lib/simplyrets/models/property.rb +128 -136
  22. data/lib/simplyrets/models/sales.rb +61 -28
  23. data/lib/simplyrets/models/school.rb +60 -34
  24. data/lib/simplyrets/models/street_address.rb +66 -55
  25. data/lib/simplyrets/models/tax.rb +70 -35
  26. data/lib/simplyrets/version.rb +13 -2
  27. data/ruby-client.meta +1 -0
  28. data/ruby-client.zip +0 -0
  29. data/ruby-client/.gitignore +50 -0
  30. data/ruby-client/.rspec +2 -0
  31. data/ruby-client/.swagger-codegen-ignore +23 -0
  32. data/ruby-client/LICENSE +201 -0
  33. data/ruby-client/README.md +128 -0
  34. data/ruby-client/docs/Agent.md +11 -0
  35. data/ruby-client/docs/Broker.md +8 -0
  36. data/ruby-client/docs/ContactInformation.md +10 -0
  37. data/ruby-client/docs/DefaultApi.md +306 -0
  38. data/ruby-client/docs/Error.md +9 -0
  39. data/ruby-client/docs/GeographicData.md +12 -0
  40. data/ruby-client/docs/Listing.md +30 -0
  41. data/ruby-client/docs/MlsInformation.md +11 -0
  42. data/ruby-client/docs/Office.md +11 -0
  43. data/ruby-client/docs/OpenHouse.md +15 -0
  44. data/ruby-client/docs/Parking.md +10 -0
  45. data/ruby-client/docs/Property.md +43 -0
  46. data/ruby-client/docs/Sales.md +12 -0
  47. data/ruby-client/docs/School.md +11 -0
  48. data/ruby-client/docs/StreetAddress.md +16 -0
  49. data/ruby-client/docs/Tax.md +10 -0
  50. data/ruby-client/git_push.sh +67 -0
  51. data/ruby-client/lib/swagger_client.rb +66 -0
  52. data/ruby-client/lib/swagger_client/api/default_api.rb +383 -0
  53. data/ruby-client/lib/swagger_client/api_client.rb +373 -0
  54. data/ruby-client/lib/swagger_client/api_error.rb +47 -0
  55. data/ruby-client/lib/swagger_client/configuration.rb +193 -0
  56. data/ruby-client/lib/swagger_client/models/agent.rb +230 -0
  57. data/ruby-client/lib/swagger_client/models/broker.rb +200 -0
  58. data/ruby-client/lib/swagger_client/models/contact_information.rb +220 -0
  59. data/ruby-client/lib/swagger_client/models/error.rb +210 -0
  60. data/ruby-client/lib/swagger_client/models/geographic_data.rb +240 -0
  61. data/ruby-client/lib/swagger_client/models/listing.rb +422 -0
  62. data/ruby-client/lib/swagger_client/models/mls_information.rb +263 -0
  63. data/ruby-client/lib/swagger_client/models/office.rb +230 -0
  64. data/ruby-client/lib/swagger_client/models/open_house.rb +270 -0
  65. data/ruby-client/lib/swagger_client/models/parking.rb +219 -0
  66. data/ruby-client/lib/swagger_client/models/property.rb +574 -0
  67. data/ruby-client/lib/swagger_client/models/sales.rb +240 -0
  68. data/ruby-client/lib/swagger_client/models/school.rb +230 -0
  69. data/ruby-client/lib/swagger_client/models/street_address.rb +280 -0
  70. data/ruby-client/lib/swagger_client/models/tax.rb +220 -0
  71. data/ruby-client/lib/swagger_client/version.rb +26 -0
  72. data/ruby-client/spec/api/default_api_spec.rb +132 -0
  73. data/ruby-client/spec/api_client_spec.rb +296 -0
  74. data/ruby-client/spec/configuration_spec.rb +48 -0
  75. data/ruby-client/spec/models/agent_spec.rb +71 -0
  76. data/ruby-client/spec/models/broker_spec.rb +53 -0
  77. data/ruby-client/spec/models/contact_information_spec.rb +65 -0
  78. data/ruby-client/spec/models/error_spec.rb +59 -0
  79. data/ruby-client/spec/models/geographic_data_spec.rb +77 -0
  80. data/ruby-client/spec/models/listing_spec.rb +185 -0
  81. data/ruby-client/spec/models/mls_information_spec.rb +74 -0
  82. data/ruby-client/spec/models/office_spec.rb +71 -0
  83. data/ruby-client/spec/models/open_house_spec.rb +95 -0
  84. data/ruby-client/spec/models/parking_spec.rb +65 -0
  85. data/ruby-client/spec/models/property_spec.rb +266 -0
  86. data/ruby-client/spec/models/sales_spec.rb +77 -0
  87. data/ruby-client/spec/models/school_spec.rb +71 -0
  88. data/ruby-client/spec/models/street_address_spec.rb +101 -0
  89. data/ruby-client/spec/models/tax_spec.rb +65 -0
  90. data/ruby-client/spec/spec_helper.rb +122 -0
  91. data/ruby-client/swagger_client.gemspec +55 -0
  92. data/simplyrets.gemspec +1 -1
  93. metadata +71 -5
@@ -0,0 +1,9 @@
1
+ # SwaggerClient::Error
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error** | **Integer** | Error code. In general, we try to adhere to HTTP status code and use these error statuses for detailed reporting. | [optional]
7
+ **message** | **String** | Status message with an explanation of the error | [optional]
8
+
9
+
@@ -0,0 +1,12 @@
1
+ # SwaggerClient::GeographicData
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **county** | **String** | Listing county | [optional]
7
+ **lat** | **Float** | Listing latitude (if available) | [optional]
8
+ **lng** | **Float** | Listing longitude (if available) | [optional]
9
+ **market_area** | **String** | Listing GeoMarket area. May be the same as mlsArea | [optional]
10
+ **directions** | **String** | Directions to the property | [optional]
11
+
12
+
@@ -0,0 +1,30 @@
1
+ # SwaggerClient::Listing
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **private_remarks** | **String** | Agent only remarks | [optional]
7
+ **property** | [**Property**](Property.md) | Specific property data associated with listing. | [optional]
8
+ **mls_id** | **Integer** | A unique identifier for this listing specific to the SimplyRETS API. Thie identifier is specific to the SimplyRETS api and has no correlation with the MLS number. Use this id when making requests to the single listing endpoint (eg, `/properties/{mlsId}`). Applications should not rely on specific `mlsId`s being present. Instead, apps should dynamically use the `mlsId` after using other more general query parameters. Many mls vendors require listings which are expired, terminated or sold to be purged, which will render calls to specific `mlsId`s to return nothing (or possibly a 404). | [optional]
9
+ **showing_instructions** | **String** | Public instructions for showing the property. | [optional]
10
+ **office** | [**Office**](Office.md) | Listing office or brokerage. | [optional]
11
+ **lease_term** | **String** | Represents the length of the lease. | [optional]
12
+ **disclaimer** | **String** | Data accuracy disclaimer. The value in the disclaimer may change depending on your MLS vendors rules. | [optional]
13
+ **address** | [**StreetAddress**](StreetAddress.md) | Comprehensive property address information | [optional]
14
+ **list_date** | **DateTime** | Date and time the listing became Active | [optional]
15
+ **agent** | [**Agent**](Agent.md) | Comprehensive listing agent information | [optional]
16
+ **modified** | **DateTime** | Date and time of the last modification | [optional]
17
+ **school** | [**School**](School.md) | Comprehensive school zone data | [optional]
18
+ **photos** | **Array<String>** | Photos of the property. Images are served over https and are suitable for production use on secure websites | [optional]
19
+ **list_price** | **Float** | Price of the listing | [optional]
20
+ **listing_id** | **String** | Data Dictionary v1.3 ListingId. The well known identifier for the listing. The value is the id or number by the MLS as a public identifier for the listing. This identifier should not be confused with the `mlsId`, which is specific to the SimplyRETS API. | [optional]
21
+ **mls** | [**MlsInformation**](MlsInformation.md) | MLS vendor information and data | [optional]
22
+ **geo** | [**GeographicData**](GeographicData.md) | Geographic data for the listing | [optional]
23
+ **tax** | [**Tax**](Tax.md) | Associate tax data | [optional]
24
+ **co_agent** | [**Agent**](Agent.md) | co-listing agent information. *NOTE*: If your RETS feed stores co-list information outside of the `Property` resource, co-list agent information will not be available. | [optional]
25
+ **sales** | [**Sales**](Sales.md) | Sales data | [optional]
26
+ **lease_type** | **String** | Information about the status of the existing lease on the property. | [optional]
27
+ **virtual_tour_url** | **String** | The URL for an unbranded virtual tour of the property. **Added on 2016/05/04 - Not available for all RETS vendors** | [optional]
28
+ **remarks** | **String** | Description or remarks | [optional]
29
+
30
+
@@ -0,0 +1,11 @@
1
+ # SwaggerClient::MlsInformation
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **status** | **String** | MLS Status Code. Compliant with data dictionary v1.3 ListingStatus Listing statuses depend on your MLS's availability. Below is a brief description of each status with possible synonyms which may map to your MLS-specific statuses - Active: Active Listing which is still on the market - ActiveUnderContract: An offer has been accepted but the listing is still on market. Synonyms: Accepting Backup Offers, Backup Offer, Active With Accepted. Synonyms: Offer, Backup, Contingent - Pending: An offer has been accepted and the listing is no longer on market. Synonyms: Offer Accepted, Under Contract - Hold: The listing has been withdrawn from the market, but a contract still exists between the seller and the listing member. Synonyms: Hold, Hold Do Not Show, Temp Off Market - Withdrawn: The listing has been withdrawn from the market, but a contract still exists between the seller and the listing member. Synonyms: Hold, Hold Do Not Show, Temp Off Market - Closed: The purchase agreement has been fulfilled or the lease agreement has been executed. Synonyms: Sold, Leased, Rented, Closed Sale - Expired: The listing contract has expired - Delete: The listing contract was never valid or other reason for the contract to be nullified. Synonyms: Kill, Zap - Incomplete: The listing has not yet be completely entered and is not yet published in the MLS. Synonyms: Draft, Partially Complted - ComingSoon | [optional]
7
+ **area** | **String** | MLS Area. Generally a subdivision or community name. | [optional]
8
+ **days_on_market** | **Integer** | Amount of days the property has been Active | [optional]
9
+ **originating_system_name** | **String** | Alias for the listing office or brokerage This field corresponds to the data-dictionary `OriginatingSystemName` field The name of the originating record provider. Most commonly the name of the MLS. The place where the listing is originally input by the member. The legal name of the company. To be used for display. If you're RETS provider aggregates feeds from multiple MLS's, this will be the name of the corresponding MLS. | [optional]
10
+
11
+
@@ -0,0 +1,11 @@
1
+ # SwaggerClient::Office
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **contact** | [**ContactInformation**](ContactInformation.md) | Associated contact details for the office. The availability of this information depends on your MLS rules and regulations *Contact information is not available for all RETS Vendors.* | [optional]
7
+ **name** | **String** | Pimary office name | [optional]
8
+ **serving_name** | **String** | Primary office or brokerage name | [optional]
9
+ **brokerid** | **String** | Office or brokerage MLS identifier **Not available for all RETS vendors** | [optional]
10
+
11
+
@@ -0,0 +1,15 @@
1
+ # SwaggerClient::OpenHouse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **refreshments** | **String** | Provided | [optional]
7
+ **listing** | [**Listing**](Listing.md) | The full listing associated with the OpenHouse | [optional]
8
+ **start_time** | **DateTime** | Start Date for the open house | [optional]
9
+ **open_house_key** | **String** | A unique identifier for the open house which is specific to the SimplyRETS API | [optional]
10
+ **end_time** | **DateTime** | The ending date time for the open house | [optional]
11
+ **open_house_id** | **String** | The MLS number or id provided by the MLS | [optional]
12
+ **type** | **String** | The open house type. For example, Public or Private | [optional]
13
+ **description** | **String** | The remarks and/or description details for the open house | [optional]
14
+
15
+
@@ -0,0 +1,10 @@
1
+ # SwaggerClient::Parking
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **leased** | **String** | | [optional]
7
+ **spaces** | **Integer** | Number of parking spaces | [optional]
8
+ **description** | **String** | Parking features description | [optional]
9
+
10
+
@@ -0,0 +1,43 @@
1
+ # SwaggerClient::Property
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **roof** | **String** | Property roof description | [optional]
7
+ **cooling** | **String** | A description of the cooling or air conditioning features of the property. | [optional]
8
+ **style** | **String** | Property style description or short string | [optional]
9
+ **area** | **Integer** | Square footage of the building associated with a listing | [optional]
10
+ **baths_full** | **Integer** | Number of full bathrooms | [optional]
11
+ **baths_half** | **Integer** | Number of half bathrooms | [optional]
12
+ **stories** | **Float** | Number of stories or levels. Represented as a `double' to account for half stories. | [optional]
13
+ **fireplaces** | **Integer** | Number of fireplaces | [optional]
14
+ **flooring** | **String** | The type(s) of flooring found within the property. | [optional]
15
+ **heating** | **String** | Heating description or short string | [optional]
16
+ **foundation** | **String** | | [optional]
17
+ **pool_features** | **String** | | [optional]
18
+ **laundry_features** | **String** | | [optional]
19
+ **occupant_name** | **String** | | [optional]
20
+ **lot_description** | **String** | | [optional]
21
+ **lot_size_acres** | **Float** | Lot size in acres **Added on 2016/05/04 - Not available for all RETS vendors** | [optional]
22
+ **sub_type** | **String** | The property's sub-type, i.e. SingleFamilyResidential, Condo, etc. Or a list of Sub Types for Mobile, such as Expando, Manufactured, Modular, etc. | [optional]
23
+ **bedrooms** | **Integer** | Number of bedrooms | [optional]
24
+ **interior_features** | **String** | The properties interior features | [optional]
25
+ **lot_size** | **String** | Lot size dimensions or square footage as a text. This field is generally used to show the pretty formatted lot size. | [optional]
26
+ **area_source** | **String** | | [optional]
27
+ **maintenance_expense** | **Float** | Yearly maintenance expense | [optional]
28
+ **additional_rooms** | **String** | Additional room information | [optional]
29
+ **exterior_features** | **String** | Exterior Features for the listing | [optional]
30
+ **water** | **String** | Water description and details | [optional]
31
+ **view** | **String** | View details and description | [optional]
32
+ **lot_size_area** | **Float** | The total area of the lot. See `lotSizeUnits` for the units of measurement (Square Feet, Square Meters, Acres, etc.). **Added on 2016/05/04 - Not available for all RETS vendors** | [optional]
33
+ **subdivision** | **String** | The subdivision or community name | [optional]
34
+ **construction** | **String** | The materials that were used in the construction of the property. | [optional]
35
+ **parking** | [**Parking**](Parking.md) | | [optional]
36
+ **lot_size_area_units** | **String** | Unit of measurement for the lotSizeArea field. e.g. Square Feet, Square Meters, Acres, etc. If this field is `null` the units is the default unit of measure specified by your RETS provider. **Added on 2016/05/04 - Not available for all RETS vendors** | [optional]
37
+ **type** | **String** | Abbreviated property type. RES is Residential, CND is CondoOrTownhome, RNT is Rental, MLF is Multi-Family, CRE is Commercial, LND is Land, FRM is Farm. See the `propertySubType` field for more information. | [optional]
38
+ **garage_spaces** | **Float** | Number of garage spaces | [optional]
39
+ **accessibility** | **String** | | [optional]
40
+ **occupant_type** | **String** | | [optional]
41
+ **year_built** | **Integer** | Year the property was built | [optional]
42
+
43
+
@@ -0,0 +1,12 @@
1
+ # SwaggerClient::Sales
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **close_date** | **DateTime** | RETS Sales data close date | [optional]
7
+ **office** | **String** | RETS Sales data selling office/brokerage id | [optional]
8
+ **close_price** | **Integer** | RETS Sales data sold price | [optional]
9
+ **agent** | **String** | RETS Sales data agent id | [optional]
10
+ **contract_date** | **DateTime** | RETS Sales data contract date | [optional]
11
+
12
+
@@ -0,0 +1,11 @@
1
+ # SwaggerClient::School
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **middle_school** | **String** | Middle or junior school name | [optional]
7
+ **high_school** | **String** | High school name | [optional]
8
+ **elementary_school** | **String** | Elementary school name. | [optional]
9
+ **district** | **String** | School district name. | [optional]
10
+
11
+
@@ -0,0 +1,16 @@
1
+ # SwaggerClient::StreetAddress
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **cross_street** | **String** | Known cross street | [optional]
7
+ **state** | **String** | State or province. Maps to the data dictionary field `StateOrProvince`. | [optional]
8
+ **country** | **String** | Street address country (United States or Canada) | [optional]
9
+ **postal_code** | **String** | Street Address postal code | [optional]
10
+ **street_name** | **String** | Name of the street | [optional]
11
+ **street_number_text** | **String** | Textual representation of the street number. This field is usually redundant with what's in `streetNumber` but is occassionally usefuly for street number which are actually alpha-numerical. For example, \"N63453\" or \"34556B\". **Added on 2016/05/02** | [optional]
12
+ **city** | **String** | City name | [optional]
13
+ **street_number** | **Integer** | Street number | [optional]
14
+ **full** | **String** | Full pretty-printed address with suffix (if available) | [optional]
15
+
16
+
@@ -0,0 +1,10 @@
1
+ # SwaggerClient::Tax
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **tax_year** | **Integer** | Tax Year | [optional]
7
+ **tax_annual_amount** | **String** | Annual tax amount in USD | [optional]
8
+ **id** | **String** | Tax Parcel ID for the listing | [optional]
9
+
10
+
@@ -0,0 +1,67 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
18
+ #
19
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
20
+
21
+ git_user_id=$1
22
+ git_repo_id=$2
23
+ release_note=$3
24
+
25
+ if [ "$git_user_id" = "" ]; then
26
+ git_user_id=""
27
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
28
+ fi
29
+
30
+ if [ "$git_repo_id" = "" ]; then
31
+ git_repo_id=""
32
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
33
+ fi
34
+
35
+ if [ "$release_note" = "" ]; then
36
+ release_note=""
37
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
38
+ fi
39
+
40
+ # Initialize the local directory as a Git repository
41
+ git init
42
+
43
+ # Adds the files in the local repository and stages them for commit.
44
+ git add .
45
+
46
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
47
+ git commit -m "$release_note"
48
+
49
+ # Sets the new remote
50
+ git_remote=`git remote`
51
+ if [ "$git_remote" = "" ]; then # git remote not defined
52
+
53
+ if [ "$GIT_TOKEN" = "" ]; then
54
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
55
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
56
+ else
57
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
58
+ fi
59
+
60
+ fi
61
+
62
+ git pull origin master
63
+
64
+ # Pushes (Forces) the changes in the local repository up to the remote repository
65
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
66
+ git push origin master 2>&1 | grep -v 'To https'
67
+
@@ -0,0 +1,66 @@
1
+ =begin
2
+ SimplyRETS API
3
+
4
+ The SimplyRETS API is an exciting step towards making it easier for developers and real estate agents to build something awesome with real estate data! The documentation below makes live requests to our API using the trial data. To get set up with the API using live MLS data, you must have RETS credentials from your MLS, which you can then use to create an app with SimplyRETS. For more information on that process, please see our [FAQ](https://simplyrets.com/faq), [Getting Started](https://simplyrets.com/blog/getting-set-up.html) page, or [contact us](https://simplyrets.com/\\#home-contact). Below you'll find the API endpoints, query parameters, response bodies, and other information about using the SimplyRETS API. You can run queries by clicking the 'Try it Out' button at the bottom of each section. ### Authentication The SimplyRETS API uses Basic Authentication. When you create an app, you'll get a set of API credentials to access your listings. If you're trying out the test data, you can use `simplyrets:simplyrets` for connecting to the API. ### Media Types The SimplyRETS API uses the `Accept` header to allow clients to control media types (content versions). We maintain backwards compatibility with API clients by allowing them to specify a content version. We highly recommend setting and explicity media type when your application reaches production. Both the structure and content of our API response bodies is subject to change so we can add new features while respecting the stability of applications which have already been developed. To always use the latest SimplyRETS content version, simply use `application/json` in your application `Accept` header. If you want to pin your clients media type to a specific version, you can use the vendor-specific SimplyRETS media type, e.g. `application/vnd.simplyrets-v0.1+json\"` To view all valid content-types for making an `OPTIONS`, make a request to the SimplyRETS api root `curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/` The default media types used in our API responses may change in the future. If you're building an application and care about the stability of the API, be sure to request a specific media type in the Accept header as shown in the examples below. The wordpress plugin automatically sets the `Accept` header for the compatible SimplyRETS media types. ### Pagination There a few pieces of useful information about each request stored in the HTTP Headers: - `X-Total-Count` shows you the total amount of listings that match your current query. - `Link` contains pre-built pagination links for accessing the next 'page' of listings that match your query. Read more about that [here](https://simplyrets.com/blog/api-pagination.html).
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ # Common files
25
+ require 'swagger_client/api_client'
26
+ require 'swagger_client/api_error'
27
+ require 'swagger_client/version'
28
+ require 'swagger_client/configuration'
29
+
30
+ # Models
31
+ require 'swagger_client/models/agent'
32
+ require 'swagger_client/models/broker'
33
+ require 'swagger_client/models/contact_information'
34
+ require 'swagger_client/models/error'
35
+ require 'swagger_client/models/geographic_data'
36
+ require 'swagger_client/models/listing'
37
+ require 'swagger_client/models/mls_information'
38
+ require 'swagger_client/models/office'
39
+ require 'swagger_client/models/open_house'
40
+ require 'swagger_client/models/parking'
41
+ require 'swagger_client/models/property'
42
+ require 'swagger_client/models/sales'
43
+ require 'swagger_client/models/school'
44
+ require 'swagger_client/models/street_address'
45
+ require 'swagger_client/models/tax'
46
+
47
+ # APIs
48
+ require 'swagger_client/api/default_api'
49
+
50
+ module SwaggerClient
51
+ class << self
52
+ # Customize default settings for the SDK using block.
53
+ # SwaggerClient.configure do |config|
54
+ # config.username = "xxx"
55
+ # config.password = "xxx"
56
+ # end
57
+ # If no block given, return the default Configuration object.
58
+ def configure
59
+ if block_given?
60
+ yield(Configuration.default)
61
+ else
62
+ Configuration.default
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,383 @@
1
+ =begin
2
+ SimplyRETS API
3
+
4
+ The SimplyRETS API is an exciting step towards making it easier for developers and real estate agents to build something awesome with real estate data! The documentation below makes live requests to our API using the trial data. To get set up with the API using live MLS data, you must have RETS credentials from your MLS, which you can then use to create an app with SimplyRETS. For more information on that process, please see our [FAQ](https://simplyrets.com/faq), [Getting Started](https://simplyrets.com/blog/getting-set-up.html) page, or [contact us](https://simplyrets.com/\\#home-contact). Below you'll find the API endpoints, query parameters, response bodies, and other information about using the SimplyRETS API. You can run queries by clicking the 'Try it Out' button at the bottom of each section. ### Authentication The SimplyRETS API uses Basic Authentication. When you create an app, you'll get a set of API credentials to access your listings. If you're trying out the test data, you can use `simplyrets:simplyrets` for connecting to the API. ### Media Types The SimplyRETS API uses the `Accept` header to allow clients to control media types (content versions). We maintain backwards compatibility with API clients by allowing them to specify a content version. We highly recommend setting and explicity media type when your application reaches production. Both the structure and content of our API response bodies is subject to change so we can add new features while respecting the stability of applications which have already been developed. To always use the latest SimplyRETS content version, simply use `application/json` in your application `Accept` header. If you want to pin your clients media type to a specific version, you can use the vendor-specific SimplyRETS media type, e.g. `application/vnd.simplyrets-v0.1+json\"` To view all valid content-types for making an `OPTIONS`, make a request to the SimplyRETS api root `curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/` The default media types used in our API responses may change in the future. If you're building an application and care about the stability of the API, be sure to request a specific media type in the Accept header as shown in the examples below. The wordpress plugin automatically sets the `Accept` header for the compatible SimplyRETS media types. ### Pagination There a few pieces of useful information about each request stored in the HTTP Headers: - `X-Total-Count` shows you the total amount of listings that match your current query. - `Link` contains pre-built pagination links for accessing the next 'page' of listings that match your query. Read more about that [here](https://simplyrets.com/blog/api-pagination.html).
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module SwaggerClient
27
+ class DefaultApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # The SimplyRETS OpenHouses API
35
+ # This is the main endpoint for accessing openhouses.
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :type Request listings by a specific property type. This defaults to Residential, and you can only specify one type in a single query.
38
+ # @option opts [String] :listing_id Request openhouses for a specific &#x60;listingId&#x60;.
39
+ # @option opts [Array<String>] :cities Filter the openhouses returned by a list of valid cities. A list of valid cities can be found by making an OPTIONS request to the &#x60;/openhouses&#x60; endpoint.
40
+ # @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID. You can specific multiple broker parameters. Note, the Broker ID is provided by your MLS.
41
+ # @option opts [String] :agent Filter the listings returned by an agent ID. Note, the Agent ID is provided by your MLS.
42
+ # @option opts [Integer] :minprice Filter listings by a minimum price.
43
+ # @option opts [DateTime] :startdate Scheduled date and time of the open house showing
44
+ # @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter by the limit to go to the next \&quot;page\&quot; of listings. Also take a look at the Link HTTP Header for pre-built pagination.
45
+ # @option opts [Integer] :limit Set the number of listings to return in the response. This defaults to 20 listings, and can be a maximum of 50. To paginate through to the next page of listings, take a look at the &#x60;offset&#x60; parameter, or the Link in the HTTP Header.
46
+ # @option opts [String] :sort Sort the response by a specific field. Values starting with a minus (-) denote descending order, while the others are ascending.
47
+ # @option opts [Array<String>] :include Include a extra fields which are not in the default response body - &#39;association&#39; includes additional HOA data - &#39;agreement&#39; information on the listing agreement - &#39;garageSpaces&#39; additional garage data - &#39;maintenanceExpense&#39; data on maintenance expenses - &#39;parking&#39; additional parking data - &#39;pool&#39; includes an additional pool description - &#39;taxAnnualAmount&#39; include the annual tax amount - &#39;taxYear&#39; include the tax year data - &#39;rooms&#39; include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available in the API response. In the future, fields which require an &#39;include&#39; may become available by default.
48
+ # @return [Array<OpenHouse>]
49
+ def openhouses_get(opts = {})
50
+ data, _status_code, _headers = openhouses_get_with_http_info(opts)
51
+ return data
52
+ end
53
+
54
+ # The SimplyRETS OpenHouses API
55
+ # This is the main endpoint for accessing openhouses.
56
+ # @param [Hash] opts the optional parameters
57
+ # @option opts [String] :type Request listings by a specific property type. This defaults to Residential, and you can only specify one type in a single query.
58
+ # @option opts [String] :listing_id Request openhouses for a specific &#x60;listingId&#x60;.
59
+ # @option opts [Array<String>] :cities Filter the openhouses returned by a list of valid cities. A list of valid cities can be found by making an OPTIONS request to the &#x60;/openhouses&#x60; endpoint.
60
+ # @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID. You can specific multiple broker parameters. Note, the Broker ID is provided by your MLS.
61
+ # @option opts [String] :agent Filter the listings returned by an agent ID. Note, the Agent ID is provided by your MLS.
62
+ # @option opts [Integer] :minprice Filter listings by a minimum price.
63
+ # @option opts [DateTime] :startdate Scheduled date and time of the open house showing
64
+ # @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter by the limit to go to the next \&quot;page\&quot; of listings. Also take a look at the Link HTTP Header for pre-built pagination.
65
+ # @option opts [Integer] :limit Set the number of listings to return in the response. This defaults to 20 listings, and can be a maximum of 50. To paginate through to the next page of listings, take a look at the &#x60;offset&#x60; parameter, or the Link in the HTTP Header.
66
+ # @option opts [String] :sort Sort the response by a specific field. Values starting with a minus (-) denote descending order, while the others are ascending.
67
+ # @option opts [Array<String>] :include Include a extra fields which are not in the default response body - &#39;association&#39; includes additional HOA data - &#39;agreement&#39; information on the listing agreement - &#39;garageSpaces&#39; additional garage data - &#39;maintenanceExpense&#39; data on maintenance expenses - &#39;parking&#39; additional parking data - &#39;pool&#39; includes an additional pool description - &#39;taxAnnualAmount&#39; include the annual tax amount - &#39;taxYear&#39; include the tax year data - &#39;rooms&#39; include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available in the API response. In the future, fields which require an &#39;include&#39; may become available by default.
68
+ # @return [Array<(Array<OpenHouse>, Fixnum, Hash)>] Array<OpenHouse> data, response status code and response headers
69
+ def openhouses_get_with_http_info(opts = {})
70
+ if @api_client.config.debugging
71
+ @api_client.config.logger.debug "Calling API: DefaultApi.openhouses_get ..."
72
+ end
73
+ if opts[:'type'] && !['Residential', 'Rental', 'Multifamily', 'Condominium', 'Commercial', 'Land'].include?(opts[:'type'])
74
+ fail ArgumentError, 'invalid value for "type", must be one of Residential, Rental, Multifamily, Condominium, Commercial, Land'
75
+ end
76
+ if opts[:'sort'] && !['listprice', '-listprice', 'listdate', '-listdate', 'beds', '-beds', 'baths', '-baths'].include?(opts[:'sort'])
77
+ fail ArgumentError, 'invalid value for "sort", must be one of listprice, -listprice, listdate, -listdate, beds, -beds, baths, -baths'
78
+ end
79
+ # resource path
80
+ local_var_path = "/openhouses".sub('{format}','json')
81
+
82
+ # query parameters
83
+ query_params = {}
84
+ query_params[:'type'] = opts[:'type'] if opts[:'type']
85
+ query_params[:'listingId'] = opts[:'listing_id'] if opts[:'listing_id']
86
+ query_params[:'cities'] = @api_client.build_collection_param(opts[:'cities'], :multi) if opts[:'cities']
87
+ query_params[:'brokers'] = @api_client.build_collection_param(opts[:'brokers'], :multi) if opts[:'brokers']
88
+ query_params[:'agent'] = opts[:'agent'] if opts[:'agent']
89
+ query_params[:'minprice'] = opts[:'minprice'] if opts[:'minprice']
90
+ query_params[:'startdate'] = opts[:'startdate'] if opts[:'startdate']
91
+ query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
92
+ query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
93
+ query_params[:'sort'] = opts[:'sort'] if opts[:'sort']
94
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if opts[:'include']
95
+
96
+ # header parameters
97
+ header_params = {}
98
+
99
+ # HTTP header 'Accept' (if needed)
100
+ local_header_accept = ['application/json', 'application/vnd.simplyrets-v0.1+json']
101
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
102
+
103
+ # HTTP header 'Content-Type'
104
+ local_header_content_type = ['application/json']
105
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
106
+
107
+ # form parameters
108
+ form_params = {}
109
+
110
+ # http body (model)
111
+ post_body = nil
112
+ auth_names = ['basicAuth']
113
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
114
+ :header_params => header_params,
115
+ :query_params => query_params,
116
+ :form_params => form_params,
117
+ :body => post_body,
118
+ :auth_names => auth_names,
119
+ :return_type => 'Array<OpenHouse>')
120
+ if @api_client.config.debugging
121
+ @api_client.config.logger.debug "API called: DefaultApi#openhouses_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
122
+ end
123
+ return data, status_code, headers
124
+ end
125
+
126
+ # Single OpenHouse Endpoint
127
+ # Use this endpoint for accessing a single OpenHouse.
128
+ # @param open_house_key A unique OpenHouse identification key
129
+ # @param [Hash] opts the optional parameters
130
+ # @option opts [Array<String>] :include Include a extra fields which are not in the default response body - &#39;association&#39; includes additional HOA data - &#39;agreement&#39; information on the listing agreement - &#39;garageSpaces&#39; additional garage data - &#39;maintenanceExpense&#39; data on maintenance expenses - &#39;parking&#39; additional parking data - &#39;pool&#39; includes an additional pool description - &#39;taxAnnualAmount&#39; include the annual tax amount - &#39;taxYear&#39; include the tax year data - &#39;rooms&#39; include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available in the API response. In the future, fields which require an &#39;include&#39; may become available by default.
131
+ # @return [OpenHouse]
132
+ def openhouses_open_house_key_get(open_house_key, opts = {})
133
+ data, _status_code, _headers = openhouses_open_house_key_get_with_http_info(open_house_key, opts)
134
+ return data
135
+ end
136
+
137
+ # Single OpenHouse Endpoint
138
+ # Use this endpoint for accessing a single OpenHouse.
139
+ # @param open_house_key A unique OpenHouse identification key
140
+ # @param [Hash] opts the optional parameters
141
+ # @option opts [Array<String>] :include Include a extra fields which are not in the default response body - &#39;association&#39; includes additional HOA data - &#39;agreement&#39; information on the listing agreement - &#39;garageSpaces&#39; additional garage data - &#39;maintenanceExpense&#39; data on maintenance expenses - &#39;parking&#39; additional parking data - &#39;pool&#39; includes an additional pool description - &#39;taxAnnualAmount&#39; include the annual tax amount - &#39;taxYear&#39; include the tax year data - &#39;rooms&#39; include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available in the API response. In the future, fields which require an &#39;include&#39; may become available by default.
142
+ # @return [Array<(OpenHouse, Fixnum, Hash)>] OpenHouse data, response status code and response headers
143
+ def openhouses_open_house_key_get_with_http_info(open_house_key, opts = {})
144
+ if @api_client.config.debugging
145
+ @api_client.config.logger.debug "Calling API: DefaultApi.openhouses_open_house_key_get ..."
146
+ end
147
+ # verify the required parameter 'open_house_key' is set
148
+ fail ArgumentError, "Missing the required parameter 'open_house_key' when calling DefaultApi.openhouses_open_house_key_get" if open_house_key.nil?
149
+ # resource path
150
+ local_var_path = "/openhouses/{openHouseKey}".sub('{format}','json').sub('{' + 'openHouseKey' + '}', open_house_key.to_s)
151
+
152
+ # query parameters
153
+ query_params = {}
154
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if opts[:'include']
155
+
156
+ # header parameters
157
+ header_params = {}
158
+
159
+ # HTTP header 'Accept' (if needed)
160
+ local_header_accept = ['application/json', 'application/vnd.simplyrets-v0.1+json']
161
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
162
+
163
+ # HTTP header 'Content-Type'
164
+ local_header_content_type = ['application/json']
165
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
166
+
167
+ # form parameters
168
+ form_params = {}
169
+
170
+ # http body (model)
171
+ post_body = nil
172
+ auth_names = ['basicAuth']
173
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
174
+ :header_params => header_params,
175
+ :query_params => query_params,
176
+ :form_params => form_params,
177
+ :body => post_body,
178
+ :auth_names => auth_names,
179
+ :return_type => 'OpenHouse')
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug "API called: DefaultApi#openhouses_open_house_key_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
182
+ end
183
+ return data, status_code, headers
184
+ end
185
+
186
+ # The SimplyRETS Listings API
187
+ # This is the main endpoint for accessing your properties. View all of the available query parameters and make requests below! The API uses Basic Authentication, which most HTTP libraries will handle for you. To use the test data (which is what this pages uses), you can use the api key `simplyrets` and secret `simplyrets`. Note that these test listings are not live MLS listings but the data, query parameters, and response bodies will all work the same.
188
+ # @param [Hash] opts the optional parameters
189
+ # @option opts [String] :q A textual keyword search. This parameter will search the following fields, when available: - listingId (This does _not_ search the &#x60;mlsId&#x60; field in the SimplyRETS response body) - street number - street name - mls area (major) - city - subdivision name - postal code
190
+ # @option opts [Array<String>] :status Request listings by a specific status. This parameter defaults to active and you can specify multiple statuses in a single query. Listing statuses depend on your MLS&#39;s availability. Below is a brief description of each status with possible synonyms which may map to your MLS-specific statuses - *Active*: Active Listing which is still on the market - *ActiveUnderContract*: An offer has been accepted but the listing is still on market. Synonyms: Accepting Backup Offers, Backup Offer, Active With Accepted. Synonyms: Offer, Backup, Contingent - *Pending*: An offer has been accepted and the listing is no longer on market. Synonyms: Offer Accepted, Under Contract - *Hold*: The listing has been withdrawn from the market, but a contract still exists between the seller and the listing member. Synonyms: Hold, Hold Do Not Show, Temp Off Market - *Withdrawn*: The listing has been withdrawn from the market, but a contract still exists between the seller and the listing member. Synonyms: Hold, Hold Do Not Show, Temp Off Market - *Closed*: The purchase agreement has been fulfilled or the lease agreement has been executed. Synonyms: Sold, Leased, Rented, Closed Sale - *Expired*: The listing contract has expired - *Delete*: The listing contract was never valid or other reason for the contract to be nullified. Synonyms: Kill, Zap - *Incomplete*: The listing has not yet be completely entered and is not yet published in the MLS. Synonyms: Draft, Partially Complted - *ComingSoon*
191
+ # @option opts [Array<String>] :type Request listings by a specific property type. This defaults to Residential and Rental. You can specify multiple property types in a single query.
192
+ # @option opts [String] :agent Filter the listings returned by an agent ID. Note, the Agent ID is provided by your MLS. The co-listing agent is not included in this query parameter.
193
+ # @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID. For some MLS areas, this is the ListOfficeId (Listing Office ID). You can specific multiple broker parameters. Note, this query parameter is only available if a Broker ID is provided by your MLS.
194
+ # @option opts [Integer] :minprice Filter listings by a minimum price.
195
+ # @option opts [Integer] :maxprice Filter listings by a maximum price
196
+ # @option opts [Integer] :minarea Filter listings by a minimum area size in Sq Ft.
197
+ # @option opts [Integer] :maxarea Filter listings by a maximum area size in Sq Ft.
198
+ # @option opts [Integer] :minbaths Filter listings by a minimum number of bathrooms.
199
+ # @option opts [Integer] :maxbaths Filter listings by a maximum number of bathrooms.
200
+ # @option opts [Integer] :minbeds Filter listings by a minimum number of bedrooms.
201
+ # @option opts [Integer] :maxbeds Filter listings by a maximum number of bedrooms.
202
+ # @option opts [Integer] :maxdom Filter listings by a maximum number of days on market. _Note that your MLS must provide Days on Market data._
203
+ # @option opts [Integer] :minyear Filter listings by a setting a minimum year built.
204
+ # @option opts [Integer] :limit Set the number of listings to return in the response. This defaults to 20 listings, and can be a maximum of 50. To paginate through to the next page of listings, take a look at the &#x60;offset&#x60; parameter, or the Link in the HTTP Header.
205
+ # @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter by the limit to go to the next \&quot;page\&quot; of listings. Also take a look at the Link HTTP Header for pre-built pagination. *NOTE:* If you&#39;re offset is too high, you will receive an &#x60;HTTP 400 offset too high&#x60; error message.
206
+ # @option opts [String] :vendor Used to specify the vendor (MLS) to search from. This parameter is required on multi-MLS apps, and you can only query one vendor at a time. To get your vendor id&#39;s make an OPTIONS request to https://api.simplyrets.com.
207
+ # @option opts [Array<String>] :postal_codes Filter the listings returned by postal codes / zip code. You can specify multiple.
208
+ # @option opts [Array<String>] :features Filter the listings by specific interior features. You can filter by multiple. For example, to filter trial listings by multiple features you can use, Return listings that are within a set of latitude longitude coordinates. For example, &#x60;&#x60;&#x60; Wet Bar High Ceiling &#x60;&#x60;&#x60; e.g. &#x60;https://simplyrets.com/services?features&#x3D;Wet%20Bar&amp;features&#x3D;High%20Ceiling&#x60; The features provided by your MLS can be seen in your OPTIONS request. To view all valid features, make a request to the SimplyRETS api root &#x60;curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/&#x60;
209
+ # @option opts [String] :water Query water/waterfront listings only. Specify &#x60;true&#x60; to filter waterfront listings.
210
+ # @option opts [Array<String>] :neighborhoods Filter the listings returned by specific neighborhoods and subdivisions. You can specify multiple.
211
+ # @option opts [Array<String>] :cities Filter the listings returned by specific cities. You can specify multiple.
212
+ # @option opts [Array<String>] :counties Filter the listings returned by specific counties. You can specify multiple.
213
+ # @option opts [Array<String>] :points Return listings that are within a set of latitude longitude coordinates. For example; &#x60;&#x60;&#x60; 29.723837,-95.69778 29.938275,-95.69778 29.938275,-95.32974 29.723837,-95.32974 &#x60;&#x60;&#x60; Note that some MLS&#39;s do not provide latitude and longitude for their listings, which is required for this parameter to work. In these cases, SimplyRETS offers a [Geocoding Addon](https://simplyrets.com/services#geocoding). Check out our [blog post](https://simplyrets.com/blog/interactive-map-search.html) on using the &#x60;points&#x60; parameter to build a map-based app in javascript.
214
+ # @option opts [Array<String>] :include Include a extra fields which are not in the default response body - &#39;association&#39; includes additional HOA data - &#39;agreement&#39; information on the listing agreement - &#39;garageSpaces&#39; additional garage data - &#39;maintenanceExpense&#39; data on maintenance expenses - &#39;parking&#39; additional parking data - &#39;pool&#39; includes an additional pool description - &#39;taxAnnualAmount&#39; include the annual tax amount - &#39;taxYear&#39; include the tax year data - &#39;rooms&#39; include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available in the API response.
215
+ # @option opts [String] :sort Sort the response by a specific field. Values starting with a minus (-) denote descending order, while the others are ascending.
216
+ # @return [Array<Listing>]
217
+ def properties_get(opts = {})
218
+ data, _status_code, _headers = properties_get_with_http_info(opts)
219
+ return data
220
+ end
221
+
222
+ # The SimplyRETS Listings API
223
+ # This is the main endpoint for accessing your properties. View all of the available query parameters and make requests below! The API uses Basic Authentication, which most HTTP libraries will handle for you. To use the test data (which is what this pages uses), you can use the api key &#x60;simplyrets&#x60; and secret &#x60;simplyrets&#x60;. Note that these test listings are not live MLS listings but the data, query parameters, and response bodies will all work the same.
224
+ # @param [Hash] opts the optional parameters
225
+ # @option opts [String] :q A textual keyword search. This parameter will search the following fields, when available: - listingId (This does _not_ search the &#x60;mlsId&#x60; field in the SimplyRETS response body) - street number - street name - mls area (major) - city - subdivision name - postal code
226
+ # @option opts [Array<String>] :status Request listings by a specific status. This parameter defaults to active and you can specify multiple statuses in a single query. Listing statuses depend on your MLS&#39;s availability. Below is a brief description of each status with possible synonyms which may map to your MLS-specific statuses - *Active*: Active Listing which is still on the market - *ActiveUnderContract*: An offer has been accepted but the listing is still on market. Synonyms: Accepting Backup Offers, Backup Offer, Active With Accepted. Synonyms: Offer, Backup, Contingent - *Pending*: An offer has been accepted and the listing is no longer on market. Synonyms: Offer Accepted, Under Contract - *Hold*: The listing has been withdrawn from the market, but a contract still exists between the seller and the listing member. Synonyms: Hold, Hold Do Not Show, Temp Off Market - *Withdrawn*: The listing has been withdrawn from the market, but a contract still exists between the seller and the listing member. Synonyms: Hold, Hold Do Not Show, Temp Off Market - *Closed*: The purchase agreement has been fulfilled or the lease agreement has been executed. Synonyms: Sold, Leased, Rented, Closed Sale - *Expired*: The listing contract has expired - *Delete*: The listing contract was never valid or other reason for the contract to be nullified. Synonyms: Kill, Zap - *Incomplete*: The listing has not yet be completely entered and is not yet published in the MLS. Synonyms: Draft, Partially Complted - *ComingSoon*
227
+ # @option opts [Array<String>] :type Request listings by a specific property type. This defaults to Residential and Rental. You can specify multiple property types in a single query.
228
+ # @option opts [String] :agent Filter the listings returned by an agent ID. Note, the Agent ID is provided by your MLS. The co-listing agent is not included in this query parameter.
229
+ # @option opts [Array<String>] :brokers Filter the listings returned by brokerage with a Broker ID. For some MLS areas, this is the ListOfficeId (Listing Office ID). You can specific multiple broker parameters. Note, this query parameter is only available if a Broker ID is provided by your MLS.
230
+ # @option opts [Integer] :minprice Filter listings by a minimum price.
231
+ # @option opts [Integer] :maxprice Filter listings by a maximum price
232
+ # @option opts [Integer] :minarea Filter listings by a minimum area size in Sq Ft.
233
+ # @option opts [Integer] :maxarea Filter listings by a maximum area size in Sq Ft.
234
+ # @option opts [Integer] :minbaths Filter listings by a minimum number of bathrooms.
235
+ # @option opts [Integer] :maxbaths Filter listings by a maximum number of bathrooms.
236
+ # @option opts [Integer] :minbeds Filter listings by a minimum number of bedrooms.
237
+ # @option opts [Integer] :maxbeds Filter listings by a maximum number of bedrooms.
238
+ # @option opts [Integer] :maxdom Filter listings by a maximum number of days on market. _Note that your MLS must provide Days on Market data._
239
+ # @option opts [Integer] :minyear Filter listings by a setting a minimum year built.
240
+ # @option opts [Integer] :limit Set the number of listings to return in the response. This defaults to 20 listings, and can be a maximum of 50. To paginate through to the next page of listings, take a look at the &#x60;offset&#x60; parameter, or the Link in the HTTP Header.
241
+ # @option opts [Integer] :offset Used as a cursor for pagination. Increase the offset parameter by the limit to go to the next \&quot;page\&quot; of listings. Also take a look at the Link HTTP Header for pre-built pagination. *NOTE:* If you&#39;re offset is too high, you will receive an &#x60;HTTP 400 offset too high&#x60; error message.
242
+ # @option opts [String] :vendor Used to specify the vendor (MLS) to search from. This parameter is required on multi-MLS apps, and you can only query one vendor at a time. To get your vendor id&#39;s make an OPTIONS request to https://api.simplyrets.com.
243
+ # @option opts [Array<String>] :postal_codes Filter the listings returned by postal codes / zip code. You can specify multiple.
244
+ # @option opts [Array<String>] :features Filter the listings by specific interior features. You can filter by multiple. For example, to filter trial listings by multiple features you can use, Return listings that are within a set of latitude longitude coordinates. For example, &#x60;&#x60;&#x60; Wet Bar High Ceiling &#x60;&#x60;&#x60; e.g. &#x60;https://simplyrets.com/services?features&#x3D;Wet%20Bar&amp;features&#x3D;High%20Ceiling&#x60; The features provided by your MLS can be seen in your OPTIONS request. To view all valid features, make a request to the SimplyRETS api root &#x60;curl -XOPTIONS -u simplyrets:simplyrets https://api.simplyrets.com/&#x60;
245
+ # @option opts [String] :water Query water/waterfront listings only. Specify &#x60;true&#x60; to filter waterfront listings.
246
+ # @option opts [Array<String>] :neighborhoods Filter the listings returned by specific neighborhoods and subdivisions. You can specify multiple.
247
+ # @option opts [Array<String>] :cities Filter the listings returned by specific cities. You can specify multiple.
248
+ # @option opts [Array<String>] :counties Filter the listings returned by specific counties. You can specify multiple.
249
+ # @option opts [Array<String>] :points Return listings that are within a set of latitude longitude coordinates. For example; &#x60;&#x60;&#x60; 29.723837,-95.69778 29.938275,-95.69778 29.938275,-95.32974 29.723837,-95.32974 &#x60;&#x60;&#x60; Note that some MLS&#39;s do not provide latitude and longitude for their listings, which is required for this parameter to work. In these cases, SimplyRETS offers a [Geocoding Addon](https://simplyrets.com/services#geocoding). Check out our [blog post](https://simplyrets.com/blog/interactive-map-search.html) on using the &#x60;points&#x60; parameter to build a map-based app in javascript.
250
+ # @option opts [Array<String>] :include Include a extra fields which are not in the default response body - &#39;association&#39; includes additional HOA data - &#39;agreement&#39; information on the listing agreement - &#39;garageSpaces&#39; additional garage data - &#39;maintenanceExpense&#39; data on maintenance expenses - &#39;parking&#39; additional parking data - &#39;pool&#39; includes an additional pool description - &#39;taxAnnualAmount&#39; include the annual tax amount - &#39;taxYear&#39; include the tax year data - &#39;rooms&#39; include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available in the API response.
251
+ # @option opts [String] :sort Sort the response by a specific field. Values starting with a minus (-) denote descending order, while the others are ascending.
252
+ # @return [Array<(Array<Listing>, Fixnum, Hash)>] Array<Listing> data, response status code and response headers
253
+ def properties_get_with_http_info(opts = {})
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug "Calling API: DefaultApi.properties_get ..."
256
+ end
257
+ if opts[:'sort'] && !['listprice', '-listprice', 'listdate', '-listdate', 'beds', '-beds', 'baths', '-baths'].include?(opts[:'sort'])
258
+ fail ArgumentError, 'invalid value for "sort", must be one of listprice, -listprice, listdate, -listdate, beds, -beds, baths, -baths'
259
+ end
260
+ # resource path
261
+ local_var_path = "/properties".sub('{format}','json')
262
+
263
+ # query parameters
264
+ query_params = {}
265
+ query_params[:'q'] = opts[:'q'] if opts[:'q']
266
+ query_params[:'status'] = @api_client.build_collection_param(opts[:'status'], :multi) if opts[:'status']
267
+ query_params[:'type'] = @api_client.build_collection_param(opts[:'type'], :multi) if opts[:'type']
268
+ query_params[:'agent'] = opts[:'agent'] if opts[:'agent']
269
+ query_params[:'brokers'] = @api_client.build_collection_param(opts[:'brokers'], :multi) if opts[:'brokers']
270
+ query_params[:'minprice'] = opts[:'minprice'] if opts[:'minprice']
271
+ query_params[:'maxprice'] = opts[:'maxprice'] if opts[:'maxprice']
272
+ query_params[:'minarea'] = opts[:'minarea'] if opts[:'minarea']
273
+ query_params[:'maxarea'] = opts[:'maxarea'] if opts[:'maxarea']
274
+ query_params[:'minbaths'] = opts[:'minbaths'] if opts[:'minbaths']
275
+ query_params[:'maxbaths'] = opts[:'maxbaths'] if opts[:'maxbaths']
276
+ query_params[:'minbeds'] = opts[:'minbeds'] if opts[:'minbeds']
277
+ query_params[:'maxbeds'] = opts[:'maxbeds'] if opts[:'maxbeds']
278
+ query_params[:'maxdom'] = opts[:'maxdom'] if opts[:'maxdom']
279
+ query_params[:'minyear'] = opts[:'minyear'] if opts[:'minyear']
280
+ query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
281
+ query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
282
+ query_params[:'vendor'] = opts[:'vendor'] if opts[:'vendor']
283
+ query_params[:'postalCodes'] = @api_client.build_collection_param(opts[:'postal_codes'], :multi) if opts[:'postal_codes']
284
+ query_params[:'features'] = @api_client.build_collection_param(opts[:'features'], :multi) if opts[:'features']
285
+ query_params[:'water'] = opts[:'water'] if opts[:'water']
286
+ query_params[:'neighborhoods'] = @api_client.build_collection_param(opts[:'neighborhoods'], :multi) if opts[:'neighborhoods']
287
+ query_params[:'cities'] = @api_client.build_collection_param(opts[:'cities'], :multi) if opts[:'cities']
288
+ query_params[:'counties'] = @api_client.build_collection_param(opts[:'counties'], :multi) if opts[:'counties']
289
+ query_params[:'points'] = @api_client.build_collection_param(opts[:'points'], :multi) if opts[:'points']
290
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if opts[:'include']
291
+ query_params[:'sort'] = opts[:'sort'] if opts[:'sort']
292
+
293
+ # header parameters
294
+ header_params = {}
295
+
296
+ # HTTP header 'Accept' (if needed)
297
+ local_header_accept = ['application/json', 'application/vnd.simplyrets-v0.1+json']
298
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
299
+
300
+ # HTTP header 'Content-Type'
301
+ local_header_content_type = ['application/json']
302
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
303
+
304
+ # form parameters
305
+ form_params = {}
306
+
307
+ # http body (model)
308
+ post_body = nil
309
+ auth_names = ['basicAuth']
310
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
311
+ :header_params => header_params,
312
+ :query_params => query_params,
313
+ :form_params => form_params,
314
+ :body => post_body,
315
+ :auth_names => auth_names,
316
+ :return_type => 'Array<Listing>')
317
+ if @api_client.config.debugging
318
+ @api_client.config.logger.debug "API called: DefaultApi#properties_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
319
+ end
320
+ return data, status_code, headers
321
+ end
322
+
323
+ # Single Listing Endpoint
324
+ # Use this endpoint for accessing a single listing. When you make a search to the `/properties` endpoint, each listing in the response will contain a unique `mlsId` field which should be used to request that listing on this route. The `mlsId` field is a unique identifier for a listing which is specific to the SimplyRETS API only. It is different from the `listingId` field is the public number given to a listing by the MLS and is not used here.
325
+ # @param mls_id The &#x60;mlsId&#x60; field is a unique identifier which is specific to the SimplyRETS API only. This field is different from the &#x60;listingId&#x60; field (which is the public number given to a listing by the MLS and is not used here).
326
+ # @param [Hash] opts the optional parameters
327
+ # @option opts [Array<String>] :include Include a extra fields which are not in the default response body - &#39;association&#39; includes additional HOA data - &#39;agreement&#39; information on the listing agreement - &#39;garageSpaces&#39; additional garage data - &#39;maintenanceExpense&#39; data on maintenance expenses - &#39;parking&#39; additional parking data - &#39;pool&#39; includes an additional pool description - &#39;rooms&#39; include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available with valid data in the API response. If your MLS does not offer these fields, they will contain &#39;null&#39;.
328
+ # @return [Listing]
329
+ def properties_mls_id_get(mls_id, opts = {})
330
+ data, _status_code, _headers = properties_mls_id_get_with_http_info(mls_id, opts)
331
+ return data
332
+ end
333
+
334
+ # Single Listing Endpoint
335
+ # Use this endpoint for accessing a single listing. When you make a search to the &#x60;/properties&#x60; endpoint, each listing in the response will contain a unique &#x60;mlsId&#x60; field which should be used to request that listing on this route. The &#x60;mlsId&#x60; field is a unique identifier for a listing which is specific to the SimplyRETS API only. It is different from the &#x60;listingId&#x60; field is the public number given to a listing by the MLS and is not used here.
336
+ # @param mls_id The &#x60;mlsId&#x60; field is a unique identifier which is specific to the SimplyRETS API only. This field is different from the &#x60;listingId&#x60; field (which is the public number given to a listing by the MLS and is not used here).
337
+ # @param [Hash] opts the optional parameters
338
+ # @option opts [Array<String>] :include Include a extra fields which are not in the default response body - &#39;association&#39; includes additional HOA data - &#39;agreement&#39; information on the listing agreement - &#39;garageSpaces&#39; additional garage data - &#39;maintenanceExpense&#39; data on maintenance expenses - &#39;parking&#39; additional parking data - &#39;pool&#39; includes an additional pool description - &#39;rooms&#39; include parameter will include any additional rooms as a list. Note that your MLS must provide these fields in their RETS data for them to be available with valid data in the API response. If your MLS does not offer these fields, they will contain &#39;null&#39;.
339
+ # @return [Array<(Listing, Fixnum, Hash)>] Listing data, response status code and response headers
340
+ def properties_mls_id_get_with_http_info(mls_id, opts = {})
341
+ if @api_client.config.debugging
342
+ @api_client.config.logger.debug "Calling API: DefaultApi.properties_mls_id_get ..."
343
+ end
344
+ # verify the required parameter 'mls_id' is set
345
+ fail ArgumentError, "Missing the required parameter 'mls_id' when calling DefaultApi.properties_mls_id_get" if mls_id.nil?
346
+ # resource path
347
+ local_var_path = "/properties/{mlsId}".sub('{format}','json').sub('{' + 'mlsId' + '}', mls_id.to_s)
348
+
349
+ # query parameters
350
+ query_params = {}
351
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if opts[:'include']
352
+
353
+ # header parameters
354
+ header_params = {}
355
+
356
+ # HTTP header 'Accept' (if needed)
357
+ local_header_accept = ['application/json', 'application/vnd.simplyrets-v0.1+json']
358
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
359
+
360
+ # HTTP header 'Content-Type'
361
+ local_header_content_type = ['application/json']
362
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
363
+
364
+ # form parameters
365
+ form_params = {}
366
+
367
+ # http body (model)
368
+ post_body = nil
369
+ auth_names = ['basicAuth']
370
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
371
+ :header_params => header_params,
372
+ :query_params => query_params,
373
+ :form_params => form_params,
374
+ :body => post_body,
375
+ :auth_names => auth_names,
376
+ :return_type => 'Listing')
377
+ if @api_client.config.debugging
378
+ @api_client.config.logger.debug "API called: DefaultApi#properties_mls_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
379
+ end
380
+ return data, status_code, headers
381
+ end
382
+ end
383
+ end