scrapebadger 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +548 -0
  5. data/Rakefile +10 -0
  6. data/docs/AccountApi.md +76 -0
  7. data/docs/AccountInfo.md +28 -0
  8. data/docs/AmazonApi.md +1244 -0
  9. data/docs/ApartmentsApi.md +373 -0
  10. data/docs/BaiduApi.md +447 -0
  11. data/docs/BillingLogListResponse.md +24 -0
  12. data/docs/BillingLogResponse.md +32 -0
  13. data/docs/BingApi.md +610 -0
  14. data/docs/ChatGPTApi.md +521 -0
  15. data/docs/DepopApi.md +542 -0
  16. data/docs/DuckDuckGoApi.md +700 -0
  17. data/docs/EBayApi.md +1019 -0
  18. data/docs/FacebookApi.md +1671 -0
  19. data/docs/FilterRuleCreate.md +28 -0
  20. data/docs/FilterRuleDeliveryLogListResponse.md +24 -0
  21. data/docs/FilterRuleDeliveryLogResponse.md +44 -0
  22. data/docs/FilterRuleListResponse.md +24 -0
  23. data/docs/FilterRuleResponse.md +40 -0
  24. data/docs/FilterRuleUpdate.md +30 -0
  25. data/docs/FilterRuleValidateRequest.md +18 -0
  26. data/docs/FilterRuleValidateResponse.md +22 -0
  27. data/docs/GoogleApi.md +3175 -0
  28. data/docs/HTTPValidationError.md +18 -0
  29. data/docs/IdealistaApi.md +822 -0
  30. data/docs/ImmobiliareApi.md +773 -0
  31. data/docs/InstagramApi.md +1673 -0
  32. data/docs/LeboncoinApi.md +884 -0
  33. data/docs/LinkedInApi.md +925 -0
  34. data/docs/LoopNetApi.md +529 -0
  35. data/docs/PortalApiRoutersV1TwitterFilterRulesFilterRulePricingResponse.md +20 -0
  36. data/docs/RealtorApi.md +474 -0
  37. data/docs/RedditApi.md +1677 -0
  38. data/docs/RedfinApi.md +616 -0
  39. data/docs/StreamMonitorCreate.md +26 -0
  40. data/docs/StreamMonitorListResponse.md +24 -0
  41. data/docs/StreamMonitorResponse.md +42 -0
  42. data/docs/StreamMonitorUpdate.md +28 -0
  43. data/docs/SubscriptionInfo.md +40 -0
  44. data/docs/TikTokApi.md +2104 -0
  45. data/docs/TweetDeliveryLogListResponse.md +24 -0
  46. data/docs/TweetDeliveryLogResponse.md +44 -0
  47. data/docs/TwitterApi.md +4091 -0
  48. data/docs/ValidationError.md +22 -0
  49. data/docs/ValidationErrorLocInner.md +15 -0
  50. data/docs/VintedApi.md +766 -0
  51. data/docs/WalmartApi.md +904 -0
  52. data/docs/WebApi.md +634 -0
  53. data/docs/WebhookCreate.md +22 -0
  54. data/docs/WebhookListItem.md +28 -0
  55. data/docs/WebhookListResponse.md +20 -0
  56. data/docs/WebhookResponse.md +26 -0
  57. data/docs/WebhookTestRequest.md +18 -0
  58. data/docs/WebhookTestResponse.md +24 -0
  59. data/docs/YahooApi.md +602 -0
  60. data/docs/YandexApi.md +450 -0
  61. data/docs/YouTubeApi.md +2872 -0
  62. data/docs/ZillowApi.md +622 -0
  63. data/git_push.sh +57 -0
  64. data/lib/scrapebadger/api/account_api.rb +79 -0
  65. data/lib/scrapebadger/api/amazon_api.rb +1165 -0
  66. data/lib/scrapebadger/api/apartments_api.rb +377 -0
  67. data/lib/scrapebadger/api/baidu_api.rb +436 -0
  68. data/lib/scrapebadger/api/bing_api.rb +580 -0
  69. data/lib/scrapebadger/api/chat_gpt_api.rb +466 -0
  70. data/lib/scrapebadger/api/depop_api.rb +518 -0
  71. data/lib/scrapebadger/api/duck_duck_go_api.rb +675 -0
  72. data/lib/scrapebadger/api/e_bay_api.rb +1029 -0
  73. data/lib/scrapebadger/api/facebook_api.rb +1492 -0
  74. data/lib/scrapebadger/api/google_api.rb +3191 -0
  75. data/lib/scrapebadger/api/idealista_api.rb +864 -0
  76. data/lib/scrapebadger/api/immobiliare_api.rb +734 -0
  77. data/lib/scrapebadger/api/instagram_api.rb +1555 -0
  78. data/lib/scrapebadger/api/leboncoin_api.rb +818 -0
  79. data/lib/scrapebadger/api/linked_in_api.rb +832 -0
  80. data/lib/scrapebadger/api/loop_net_api.rb +503 -0
  81. data/lib/scrapebadger/api/realtor_api.rb +481 -0
  82. data/lib/scrapebadger/api/reddit_api.rb +1601 -0
  83. data/lib/scrapebadger/api/redfin_api.rb +625 -0
  84. data/lib/scrapebadger/api/tik_tok_api.rb +2029 -0
  85. data/lib/scrapebadger/api/twitter_api.rb +3696 -0
  86. data/lib/scrapebadger/api/vinted_api.rb +705 -0
  87. data/lib/scrapebadger/api/walmart_api.rb +876 -0
  88. data/lib/scrapebadger/api/web_api.rb +547 -0
  89. data/lib/scrapebadger/api/yahoo_api.rb +560 -0
  90. data/lib/scrapebadger/api/yandex_api.rb +422 -0
  91. data/lib/scrapebadger/api/you_tube_api.rb +2520 -0
  92. data/lib/scrapebadger/api/zillow_api.rb +634 -0
  93. data/lib/scrapebadger/api_client.rb +394 -0
  94. data/lib/scrapebadger/api_error.rb +58 -0
  95. data/lib/scrapebadger/configuration.rb +308 -0
  96. data/lib/scrapebadger/models/account_info.rb +288 -0
  97. data/lib/scrapebadger/models/billing_log_list_response.rb +272 -0
  98. data/lib/scrapebadger/models/billing_log_response.rb +334 -0
  99. data/lib/scrapebadger/models/filter_rule_create.rb +427 -0
  100. data/lib/scrapebadger/models/filter_rule_delivery_log_list_response.rb +272 -0
  101. data/lib/scrapebadger/models/filter_rule_delivery_log_response.rb +422 -0
  102. data/lib/scrapebadger/models/filter_rule_list_response.rb +272 -0
  103. data/lib/scrapebadger/models/filter_rule_response.rb +390 -0
  104. data/lib/scrapebadger/models/filter_rule_update.rb +389 -0
  105. data/lib/scrapebadger/models/filter_rule_validate_request.rb +250 -0
  106. data/lib/scrapebadger/models/filter_rule_validate_response.rb +248 -0
  107. data/lib/scrapebadger/models/http_validation_error.rb +216 -0
  108. data/lib/scrapebadger/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response.rb +238 -0
  109. data/lib/scrapebadger/models/stream_monitor_create.rb +373 -0
  110. data/lib/scrapebadger/models/stream_monitor_list_response.rb +272 -0
  111. data/lib/scrapebadger/models/stream_monitor_response.rb +406 -0
  112. data/lib/scrapebadger/models/stream_monitor_update.rb +335 -0
  113. data/lib/scrapebadger/models/subscription_info.rb +352 -0
  114. data/lib/scrapebadger/models/tweet_delivery_log_list_response.rb +272 -0
  115. data/lib/scrapebadger/models/tweet_delivery_log_response.rb +422 -0
  116. data/lib/scrapebadger/models/validation_error.rb +255 -0
  117. data/lib/scrapebadger/models/validation_error_loc_inner.rb +104 -0
  118. data/lib/scrapebadger/models/webhook_create.rb +282 -0
  119. data/lib/scrapebadger/models/webhook_list_item.rb +302 -0
  120. data/lib/scrapebadger/models/webhook_list_response.rb +240 -0
  121. data/lib/scrapebadger/models/webhook_response.rb +286 -0
  122. data/lib/scrapebadger/models/webhook_test_request.rb +223 -0
  123. data/lib/scrapebadger/models/webhook_test_response.rb +259 -0
  124. data/lib/scrapebadger/version.rb +15 -0
  125. data/lib/scrapebadger.rb +96 -0
  126. data/scrapebadger.gemspec +39 -0
  127. data/spec/api/account_api_spec.rb +46 -0
  128. data/spec/api/amazon_api_spec.rb +258 -0
  129. data/spec/api/apartments_api_spec.rb +98 -0
  130. data/spec/api/baidu_api_spec.rb +109 -0
  131. data/spec/api/bing_api_spec.rb +141 -0
  132. data/spec/api/chat_gpt_api_spec.rb +123 -0
  133. data/spec/api/depop_api_spec.rb +132 -0
  134. data/spec/api/duck_duck_go_api_spec.rb +162 -0
  135. data/spec/api/e_bay_api_spec.rb +222 -0
  136. data/spec/api/facebook_api_spec.rb +326 -0
  137. data/spec/api/google_api_spec.rb +649 -0
  138. data/spec/api/idealista_api_spec.rb +197 -0
  139. data/spec/api/immobiliare_api_spec.rb +174 -0
  140. data/spec/api/instagram_api_spec.rb +309 -0
  141. data/spec/api/leboncoin_api_spec.rb +184 -0
  142. data/spec/api/linked_in_api_spec.rb +197 -0
  143. data/spec/api/loop_net_api_spec.rb +127 -0
  144. data/spec/api/realtor_api_spec.rb +123 -0
  145. data/spec/api/reddit_api_spec.rb +331 -0
  146. data/spec/api/redfin_api_spec.rb +147 -0
  147. data/spec/api/tik_tok_api_spec.rb +413 -0
  148. data/spec/api/twitter_api_spec.rb +735 -0
  149. data/spec/api/vinted_api_spec.rb +169 -0
  150. data/spec/api/walmart_api_spec.rb +192 -0
  151. data/spec/api/web_api_spec.rb +136 -0
  152. data/spec/api/yahoo_api_spec.rb +137 -0
  153. data/spec/api/yandex_api_spec.rb +111 -0
  154. data/spec/api/you_tube_api_spec.rb +500 -0
  155. data/spec/api/zillow_api_spec.rb +150 -0
  156. data/spec/models/account_info_spec.rb +66 -0
  157. data/spec/models/billing_log_list_response_spec.rb +54 -0
  158. data/spec/models/billing_log_response_spec.rb +78 -0
  159. data/spec/models/filter_rule_create_spec.rb +66 -0
  160. data/spec/models/filter_rule_delivery_log_list_response_spec.rb +54 -0
  161. data/spec/models/filter_rule_delivery_log_response_spec.rb +114 -0
  162. data/spec/models/filter_rule_list_response_spec.rb +54 -0
  163. data/spec/models/filter_rule_response_spec.rb +102 -0
  164. data/spec/models/filter_rule_update_spec.rb +72 -0
  165. data/spec/models/filter_rule_validate_request_spec.rb +36 -0
  166. data/spec/models/filter_rule_validate_response_spec.rb +48 -0
  167. data/spec/models/http_validation_error_spec.rb +36 -0
  168. data/spec/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response_spec.rb +42 -0
  169. data/spec/models/stream_monitor_create_spec.rb +60 -0
  170. data/spec/models/stream_monitor_list_response_spec.rb +54 -0
  171. data/spec/models/stream_monitor_response_spec.rb +108 -0
  172. data/spec/models/stream_monitor_update_spec.rb +66 -0
  173. data/spec/models/subscription_info_spec.rb +102 -0
  174. data/spec/models/tweet_delivery_log_list_response_spec.rb +54 -0
  175. data/spec/models/tweet_delivery_log_response_spec.rb +114 -0
  176. data/spec/models/validation_error_loc_inner_spec.rb +21 -0
  177. data/spec/models/validation_error_spec.rb +48 -0
  178. data/spec/models/webhook_create_spec.rb +48 -0
  179. data/spec/models/webhook_list_item_spec.rb +66 -0
  180. data/spec/models/webhook_list_response_spec.rb +42 -0
  181. data/spec/models/webhook_response_spec.rb +60 -0
  182. data/spec/models/webhook_test_request_spec.rb +36 -0
  183. data/spec/models/webhook_test_response_spec.rb +54 -0
  184. data/spec/spec_helper.rb +111 -0
  185. metadata +324 -0
@@ -0,0 +1,625 @@
1
+ =begin
2
+ #ScrapeBadger API
3
+
4
+ #Unified credit-based scraping API. https://docs.scrapebadger.com
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module ScrapeBadger
16
+ class RedfinApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get agent profile + listings
23
+ # Get a Redfin real-estate agent's profile and their active listings.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :url Full Redfin /realestateagents/ URL
26
+ # @option opts [String] :agent_id Redfin agent id
27
+ # @return [Object]
28
+ def redfin_get_agent_profile_listings(opts = {})
29
+ data, _status_code, _headers = redfin_get_agent_profile_listings_with_http_info(opts)
30
+ data
31
+ end
32
+
33
+ # Get agent profile + listings
34
+ # Get a Redfin real-estate agent's profile and their active listings.
35
+ # @param [Hash] opts the optional parameters
36
+ # @option opts [String] :url Full Redfin /realestateagents/ URL
37
+ # @option opts [String] :agent_id Redfin agent id
38
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
39
+ def redfin_get_agent_profile_listings_with_http_info(opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: RedfinApi.redfin_get_agent_profile_listings ...'
42
+ end
43
+ # resource path
44
+ local_var_path = '/v1/redfin/agent'
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+ query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil?
49
+ query_params[:'agent_id'] = opts[:'agent_id'] if !opts[:'agent_id'].nil?
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:debug_body]
61
+
62
+ # return_type
63
+ return_type = opts[:debug_return_type] || 'Object'
64
+
65
+ # auth_names
66
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
67
+
68
+ new_options = opts.merge(
69
+ :operation => :"RedfinApi.redfin_get_agent_profile_listings",
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type
76
+ )
77
+
78
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: RedfinApi#redfin_get_agent_profile_listings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
85
+ # Get property detail
86
+ # Get a single Redfin property's full detail by its numeric propertyId.
87
+ # @param property_id [String]
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [Object]
90
+ def redfin_get_property_detail(property_id, opts = {})
91
+ data, _status_code, _headers = redfin_get_property_detail_with_http_info(property_id, opts)
92
+ data
93
+ end
94
+
95
+ # Get property detail
96
+ # Get a single Redfin property&#39;s full detail by its numeric propertyId.
97
+ # @param property_id [String]
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
100
+ def redfin_get_property_detail_with_http_info(property_id, opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: RedfinApi.redfin_get_property_detail ...'
103
+ end
104
+ # verify the required parameter 'property_id' is set
105
+ if @api_client.config.client_side_validation && property_id.nil?
106
+ fail ArgumentError, "Missing the required parameter 'property_id' when calling RedfinApi.redfin_get_property_detail"
107
+ end
108
+ # resource path
109
+ local_var_path = '/v1/redfin/property/{property_id}'.sub('{' + 'property_id' + '}', CGI.escape(property_id.to_s))
110
+
111
+ # query parameters
112
+ query_params = opts[:query_params] || {}
113
+
114
+ # header parameters
115
+ header_params = opts[:header_params] || {}
116
+ # HTTP header 'Accept' (if needed)
117
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
118
+
119
+ # form parameters
120
+ form_params = opts[:form_params] || {}
121
+
122
+ # http body (model)
123
+ post_body = opts[:debug_body]
124
+
125
+ # return_type
126
+ return_type = opts[:debug_return_type] || 'Object'
127
+
128
+ # auth_names
129
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
130
+
131
+ new_options = opts.merge(
132
+ :operation => :"RedfinApi.redfin_get_property_detail",
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: RedfinApi#redfin_get_property_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Get property detail by URL
149
+ # Get a single Redfin property's full detail by its home URL.
150
+ # @param url [String] Full Redfin property URL (/CA/City/.../home/12345678)
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [Object]
153
+ def redfin_get_property_detail_by_url(url, opts = {})
154
+ data, _status_code, _headers = redfin_get_property_detail_by_url_with_http_info(url, opts)
155
+ data
156
+ end
157
+
158
+ # Get property detail by URL
159
+ # Get a single Redfin property&#39;s full detail by its home URL.
160
+ # @param url [String] Full Redfin property URL (/CA/City/.../home/12345678)
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
163
+ def redfin_get_property_detail_by_url_with_http_info(url, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: RedfinApi.redfin_get_property_detail_by_url ...'
166
+ end
167
+ # verify the required parameter 'url' is set
168
+ if @api_client.config.client_side_validation && url.nil?
169
+ fail ArgumentError, "Missing the required parameter 'url' when calling RedfinApi.redfin_get_property_detail_by_url"
170
+ end
171
+ # resource path
172
+ local_var_path = '/v1/redfin/property'
173
+
174
+ # query parameters
175
+ query_params = opts[:query_params] || {}
176
+ query_params[:'url'] = url
177
+
178
+ # header parameters
179
+ header_params = opts[:header_params] || {}
180
+ # HTTP header 'Accept' (if needed)
181
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
182
+
183
+ # form parameters
184
+ form_params = opts[:form_params] || {}
185
+
186
+ # http body (model)
187
+ post_body = opts[:debug_body]
188
+
189
+ # return_type
190
+ return_type = opts[:debug_return_type] || 'Object'
191
+
192
+ # auth_names
193
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
194
+
195
+ new_options = opts.merge(
196
+ :operation => :"RedfinApi.redfin_get_property_detail_by_url",
197
+ :header_params => header_params,
198
+ :query_params => query_params,
199
+ :form_params => form_params,
200
+ :body => post_body,
201
+ :auth_names => auth_names,
202
+ :return_type => return_type
203
+ )
204
+
205
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
206
+ if @api_client.config.debugging
207
+ @api_client.config.logger.debug "API called: RedfinApi#redfin_get_property_detail_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
208
+ end
209
+ return data, status_code, headers
210
+ end
211
+
212
+ # List coverage markets
213
+ # List Redfin coverage regions (US).
214
+ # @param [Hash] opts the optional parameters
215
+ # @return [Object]
216
+ def redfin_list_coverage_markets(opts = {})
217
+ data, _status_code, _headers = redfin_list_coverage_markets_with_http_info(opts)
218
+ data
219
+ end
220
+
221
+ # List coverage markets
222
+ # List Redfin coverage regions (US).
223
+ # @param [Hash] opts the optional parameters
224
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
225
+ def redfin_list_coverage_markets_with_http_info(opts = {})
226
+ if @api_client.config.debugging
227
+ @api_client.config.logger.debug 'Calling API: RedfinApi.redfin_list_coverage_markets ...'
228
+ end
229
+ # resource path
230
+ local_var_path = '/v1/redfin/markets'
231
+
232
+ # query parameters
233
+ query_params = opts[:query_params] || {}
234
+
235
+ # header parameters
236
+ header_params = opts[:header_params] || {}
237
+ # HTTP header 'Accept' (if needed)
238
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
239
+
240
+ # form parameters
241
+ form_params = opts[:form_params] || {}
242
+
243
+ # http body (model)
244
+ post_body = opts[:debug_body]
245
+
246
+ # return_type
247
+ return_type = opts[:debug_return_type] || 'Object'
248
+
249
+ # auth_names
250
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
251
+
252
+ new_options = opts.merge(
253
+ :operation => :"RedfinApi.redfin_list_coverage_markets",
254
+ :header_params => header_params,
255
+ :query_params => query_params,
256
+ :form_params => form_params,
257
+ :body => post_body,
258
+ :auth_names => auth_names,
259
+ :return_type => return_type
260
+ )
261
+
262
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
263
+ if @api_client.config.debugging
264
+ @api_client.config.logger.debug "API called: RedfinApi#redfin_list_coverage_markets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
265
+ end
266
+ return data, status_code, headers
267
+ end
268
+
269
+ # Redfin scraper health check
270
+ # Check health of the Redfin scraper service (accepts HEAD for UptimeRobot).
271
+ # @param [Hash] opts the optional parameters
272
+ # @return [Object]
273
+ def redfin_redfin_scraper_health_check(opts = {})
274
+ data, _status_code, _headers = redfin_redfin_scraper_health_check_with_http_info(opts)
275
+ data
276
+ end
277
+
278
+ # Redfin scraper health check
279
+ # Check health of the Redfin scraper service (accepts HEAD for UptimeRobot).
280
+ # @param [Hash] opts the optional parameters
281
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
282
+ def redfin_redfin_scraper_health_check_with_http_info(opts = {})
283
+ if @api_client.config.debugging
284
+ @api_client.config.logger.debug 'Calling API: RedfinApi.redfin_redfin_scraper_health_check ...'
285
+ end
286
+ # resource path
287
+ local_var_path = '/v1/redfin/health'
288
+
289
+ # query parameters
290
+ query_params = opts[:query_params] || {}
291
+
292
+ # header parameters
293
+ header_params = opts[:header_params] || {}
294
+ # HTTP header 'Accept' (if needed)
295
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
296
+
297
+ # form parameters
298
+ form_params = opts[:form_params] || {}
299
+
300
+ # http body (model)
301
+ post_body = opts[:debug_body]
302
+
303
+ # return_type
304
+ return_type = opts[:debug_return_type] || 'Object'
305
+
306
+ # auth_names
307
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
308
+
309
+ new_options = opts.merge(
310
+ :operation => :"RedfinApi.redfin_redfin_scraper_health_check",
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 => return_type
317
+ )
318
+
319
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
320
+ if @api_client.config.debugging
321
+ @api_client.config.logger.debug "API called: RedfinApi#redfin_redfin_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
322
+ end
323
+ return data, status_code, headers
324
+ end
325
+
326
+ # Redfin scraper health check
327
+ # Check health of the Redfin scraper service (accepts HEAD for UptimeRobot).
328
+ # @param [Hash] opts the optional parameters
329
+ # @return [Object]
330
+ def redfin_redfin_scraper_health_check_head(opts = {})
331
+ data, _status_code, _headers = redfin_redfin_scraper_health_check_head_with_http_info(opts)
332
+ data
333
+ end
334
+
335
+ # Redfin scraper health check
336
+ # Check health of the Redfin scraper service (accepts HEAD for UptimeRobot).
337
+ # @param [Hash] opts the optional parameters
338
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
339
+ def redfin_redfin_scraper_health_check_head_with_http_info(opts = {})
340
+ if @api_client.config.debugging
341
+ @api_client.config.logger.debug 'Calling API: RedfinApi.redfin_redfin_scraper_health_check_head ...'
342
+ end
343
+ # resource path
344
+ local_var_path = '/v1/redfin/health'
345
+
346
+ # query parameters
347
+ query_params = opts[:query_params] || {}
348
+
349
+ # header parameters
350
+ header_params = opts[:header_params] || {}
351
+ # HTTP header 'Accept' (if needed)
352
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
353
+
354
+ # form parameters
355
+ form_params = opts[:form_params] || {}
356
+
357
+ # http body (model)
358
+ post_body = opts[:debug_body]
359
+
360
+ # return_type
361
+ return_type = opts[:debug_return_type] || 'Object'
362
+
363
+ # auth_names
364
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
365
+
366
+ new_options = opts.merge(
367
+ :operation => :"RedfinApi.redfin_redfin_scraper_health_check_head",
368
+ :header_params => header_params,
369
+ :query_params => query_params,
370
+ :form_params => form_params,
371
+ :body => post_body,
372
+ :auth_names => auth_names,
373
+ :return_type => return_type
374
+ )
375
+
376
+ data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
377
+ if @api_client.config.debugging
378
+ @api_client.config.logger.debug "API called: RedfinApi#redfin_redfin_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
379
+ end
380
+ return data, status_code, headers
381
+ end
382
+
383
+ # Region/address suggestions
384
+ # Resolve a search term to Redfin regions/addresses.
385
+ # @param query [String] Partial location — city, ZIP, address, neighborhood
386
+ # @param [Hash] opts the optional parameters
387
+ # @return [Object]
388
+ def redfin_region_address_suggestions(query, opts = {})
389
+ data, _status_code, _headers = redfin_region_address_suggestions_with_http_info(query, opts)
390
+ data
391
+ end
392
+
393
+ # Region/address suggestions
394
+ # Resolve a search term to Redfin regions/addresses.
395
+ # @param query [String] Partial location — city, ZIP, address, neighborhood
396
+ # @param [Hash] opts the optional parameters
397
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
398
+ def redfin_region_address_suggestions_with_http_info(query, opts = {})
399
+ if @api_client.config.debugging
400
+ @api_client.config.logger.debug 'Calling API: RedfinApi.redfin_region_address_suggestions ...'
401
+ end
402
+ # verify the required parameter 'query' is set
403
+ if @api_client.config.client_side_validation && query.nil?
404
+ fail ArgumentError, "Missing the required parameter 'query' when calling RedfinApi.redfin_region_address_suggestions"
405
+ end
406
+ # resource path
407
+ local_var_path = '/v1/redfin/autocomplete'
408
+
409
+ # query parameters
410
+ query_params = opts[:query_params] || {}
411
+ query_params[:'query'] = query
412
+
413
+ # header parameters
414
+ header_params = opts[:header_params] || {}
415
+ # HTTP header 'Accept' (if needed)
416
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
417
+
418
+ # form parameters
419
+ form_params = opts[:form_params] || {}
420
+
421
+ # http body (model)
422
+ post_body = opts[:debug_body]
423
+
424
+ # return_type
425
+ return_type = opts[:debug_return_type] || 'Object'
426
+
427
+ # auth_names
428
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
429
+
430
+ new_options = opts.merge(
431
+ :operation => :"RedfinApi.redfin_region_address_suggestions",
432
+ :header_params => header_params,
433
+ :query_params => query_params,
434
+ :form_params => form_params,
435
+ :body => post_body,
436
+ :auth_names => auth_names,
437
+ :return_type => return_type
438
+ )
439
+
440
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
441
+ if @api_client.config.debugging
442
+ @api_client.config.logger.debug "API called: RedfinApi#redfin_region_address_suggestions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
443
+ end
444
+ return data, status_code, headers
445
+ end
446
+
447
+ # Search properties
448
+ # Search Redfin for for-sale / for-rent / recently-sold properties.
449
+ # @param location [String] City/state, ZIP, address or neighborhood
450
+ # @param [Hash] opts the optional parameters
451
+ # @option opts [Integer] :page (default to 1)
452
+ # @option opts [String] :sort relevant|newest|price_high_to_low|price_low_to_high|square_feet|lot_size|price_per_sqft|beds|baths
453
+ # @option opts [Integer] :price_min
454
+ # @option opts [Integer] :price_max
455
+ # @option opts [Integer] :beds_min
456
+ # @option opts [Float] :baths_min
457
+ # @option opts [String] :home_type house|condo|townhouse|multi_family|land|mobile|coop|other
458
+ # @option opts [Integer] :sqft_min
459
+ # @option opts [Integer] :sqft_max
460
+ # @option opts [Integer] :lot_min
461
+ # @option opts [Integer] :lot_max
462
+ # @option opts [Integer] :year_built_min
463
+ # @option opts [Integer] :year_built_max
464
+ # @option opts [Integer] :max_days_on_market
465
+ # @option opts [Float] :north Map bounds for tiling past the cap
466
+ # @option opts [Float] :south
467
+ # @option opts [Float] :east
468
+ # @option opts [Float] :west
469
+ # @return [Object]
470
+ def redfin_search_properties(location, opts = {})
471
+ data, _status_code, _headers = redfin_search_properties_with_http_info(location, opts)
472
+ data
473
+ end
474
+
475
+ # Search properties
476
+ # Search Redfin for for-sale / for-rent / recently-sold properties.
477
+ # @param location [String] City/state, ZIP, address or neighborhood
478
+ # @param [Hash] opts the optional parameters
479
+ # @option opts [Integer] :page (default to 1)
480
+ # @option opts [String] :sort relevant|newest|price_high_to_low|price_low_to_high|square_feet|lot_size|price_per_sqft|beds|baths
481
+ # @option opts [Integer] :price_min
482
+ # @option opts [Integer] :price_max
483
+ # @option opts [Integer] :beds_min
484
+ # @option opts [Float] :baths_min
485
+ # @option opts [String] :home_type house|condo|townhouse|multi_family|land|mobile|coop|other
486
+ # @option opts [Integer] :sqft_min
487
+ # @option opts [Integer] :sqft_max
488
+ # @option opts [Integer] :lot_min
489
+ # @option opts [Integer] :lot_max
490
+ # @option opts [Integer] :year_built_min
491
+ # @option opts [Integer] :year_built_max
492
+ # @option opts [Integer] :max_days_on_market
493
+ # @option opts [Float] :north Map bounds for tiling past the cap
494
+ # @option opts [Float] :south
495
+ # @option opts [Float] :east
496
+ # @option opts [Float] :west
497
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
498
+ def redfin_search_properties_with_http_info(location, opts = {})
499
+ if @api_client.config.debugging
500
+ @api_client.config.logger.debug 'Calling API: RedfinApi.redfin_search_properties ...'
501
+ end
502
+ # verify the required parameter 'location' is set
503
+ if @api_client.config.client_side_validation && location.nil?
504
+ fail ArgumentError, "Missing the required parameter 'location' when calling RedfinApi.redfin_search_properties"
505
+ end
506
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 20
507
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling RedfinApi.redfin_search_properties, must be smaller than or equal to 20.'
508
+ end
509
+
510
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
511
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling RedfinApi.redfin_search_properties, must be greater than or equal to 1.'
512
+ end
513
+
514
+ if @api_client.config.client_side_validation && !opts[:'price_min'].nil? && opts[:'price_min'] < 0
515
+ fail ArgumentError, 'invalid value for "opts[:"price_min"]" when calling RedfinApi.redfin_search_properties, must be greater than or equal to 0.'
516
+ end
517
+
518
+ if @api_client.config.client_side_validation && !opts[:'price_max'].nil? && opts[:'price_max'] < 0
519
+ fail ArgumentError, 'invalid value for "opts[:"price_max"]" when calling RedfinApi.redfin_search_properties, must be greater than or equal to 0.'
520
+ end
521
+
522
+ if @api_client.config.client_side_validation && !opts[:'beds_min'].nil? && opts[:'beds_min'] > 10
523
+ fail ArgumentError, 'invalid value for "opts[:"beds_min"]" when calling RedfinApi.redfin_search_properties, must be smaller than or equal to 10.'
524
+ end
525
+
526
+ if @api_client.config.client_side_validation && !opts[:'beds_min'].nil? && opts[:'beds_min'] < 0
527
+ fail ArgumentError, 'invalid value for "opts[:"beds_min"]" when calling RedfinApi.redfin_search_properties, must be greater than or equal to 0.'
528
+ end
529
+
530
+ if @api_client.config.client_side_validation && !opts[:'baths_min'].nil? && opts[:'baths_min'] > 10
531
+ fail ArgumentError, 'invalid value for "opts[:"baths_min"]" when calling RedfinApi.redfin_search_properties, must be smaller than or equal to 10.'
532
+ end
533
+
534
+ if @api_client.config.client_side_validation && !opts[:'baths_min'].nil? && opts[:'baths_min'] < 0
535
+ fail ArgumentError, 'invalid value for "opts[:"baths_min"]" when calling RedfinApi.redfin_search_properties, must be greater than or equal to 0.'
536
+ end
537
+
538
+ if @api_client.config.client_side_validation && !opts[:'sqft_min'].nil? && opts[:'sqft_min'] < 0
539
+ fail ArgumentError, 'invalid value for "opts[:"sqft_min"]" when calling RedfinApi.redfin_search_properties, must be greater than or equal to 0.'
540
+ end
541
+
542
+ if @api_client.config.client_side_validation && !opts[:'sqft_max'].nil? && opts[:'sqft_max'] < 0
543
+ fail ArgumentError, 'invalid value for "opts[:"sqft_max"]" when calling RedfinApi.redfin_search_properties, must be greater than or equal to 0.'
544
+ end
545
+
546
+ if @api_client.config.client_side_validation && !opts[:'lot_min'].nil? && opts[:'lot_min'] < 0
547
+ fail ArgumentError, 'invalid value for "opts[:"lot_min"]" when calling RedfinApi.redfin_search_properties, must be greater than or equal to 0.'
548
+ end
549
+
550
+ if @api_client.config.client_side_validation && !opts[:'lot_max'].nil? && opts[:'lot_max'] < 0
551
+ fail ArgumentError, 'invalid value for "opts[:"lot_max"]" when calling RedfinApi.redfin_search_properties, must be greater than or equal to 0.'
552
+ end
553
+
554
+ if @api_client.config.client_side_validation && !opts[:'year_built_min'].nil? && opts[:'year_built_min'] < 1800
555
+ fail ArgumentError, 'invalid value for "opts[:"year_built_min"]" when calling RedfinApi.redfin_search_properties, must be greater than or equal to 1800.'
556
+ end
557
+
558
+ if @api_client.config.client_side_validation && !opts[:'year_built_max'].nil? && opts[:'year_built_max'] < 1800
559
+ fail ArgumentError, 'invalid value for "opts[:"year_built_max"]" when calling RedfinApi.redfin_search_properties, must be greater than or equal to 1800.'
560
+ end
561
+
562
+ if @api_client.config.client_side_validation && !opts[:'max_days_on_market'].nil? && opts[:'max_days_on_market'] < 0
563
+ fail ArgumentError, 'invalid value for "opts[:"max_days_on_market"]" when calling RedfinApi.redfin_search_properties, must be greater than or equal to 0.'
564
+ end
565
+
566
+ # resource path
567
+ local_var_path = '/v1/redfin/search'
568
+
569
+ # query parameters
570
+ query_params = opts[:query_params] || {}
571
+ query_params[:'location'] = location
572
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
573
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
574
+ query_params[:'price_min'] = opts[:'price_min'] if !opts[:'price_min'].nil?
575
+ query_params[:'price_max'] = opts[:'price_max'] if !opts[:'price_max'].nil?
576
+ query_params[:'beds_min'] = opts[:'beds_min'] if !opts[:'beds_min'].nil?
577
+ query_params[:'baths_min'] = opts[:'baths_min'] if !opts[:'baths_min'].nil?
578
+ query_params[:'home_type'] = opts[:'home_type'] if !opts[:'home_type'].nil?
579
+ query_params[:'sqft_min'] = opts[:'sqft_min'] if !opts[:'sqft_min'].nil?
580
+ query_params[:'sqft_max'] = opts[:'sqft_max'] if !opts[:'sqft_max'].nil?
581
+ query_params[:'lot_min'] = opts[:'lot_min'] if !opts[:'lot_min'].nil?
582
+ query_params[:'lot_max'] = opts[:'lot_max'] if !opts[:'lot_max'].nil?
583
+ query_params[:'year_built_min'] = opts[:'year_built_min'] if !opts[:'year_built_min'].nil?
584
+ query_params[:'year_built_max'] = opts[:'year_built_max'] if !opts[:'year_built_max'].nil?
585
+ query_params[:'max_days_on_market'] = opts[:'max_days_on_market'] if !opts[:'max_days_on_market'].nil?
586
+ query_params[:'north'] = opts[:'north'] if !opts[:'north'].nil?
587
+ query_params[:'south'] = opts[:'south'] if !opts[:'south'].nil?
588
+ query_params[:'east'] = opts[:'east'] if !opts[:'east'].nil?
589
+ query_params[:'west'] = opts[:'west'] if !opts[:'west'].nil?
590
+
591
+ # header parameters
592
+ header_params = opts[:header_params] || {}
593
+ # HTTP header 'Accept' (if needed)
594
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
595
+
596
+ # form parameters
597
+ form_params = opts[:form_params] || {}
598
+
599
+ # http body (model)
600
+ post_body = opts[:debug_body]
601
+
602
+ # return_type
603
+ return_type = opts[:debug_return_type] || 'Object'
604
+
605
+ # auth_names
606
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
607
+
608
+ new_options = opts.merge(
609
+ :operation => :"RedfinApi.redfin_search_properties",
610
+ :header_params => header_params,
611
+ :query_params => query_params,
612
+ :form_params => form_params,
613
+ :body => post_body,
614
+ :auth_names => auth_names,
615
+ :return_type => return_type
616
+ )
617
+
618
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
619
+ if @api_client.config.debugging
620
+ @api_client.config.logger.debug "API called: RedfinApi#redfin_search_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
621
+ end
622
+ return data, status_code, headers
623
+ end
624
+ end
625
+ end