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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +548 -0
- data/Rakefile +10 -0
- data/docs/AccountApi.md +76 -0
- data/docs/AccountInfo.md +28 -0
- data/docs/AmazonApi.md +1244 -0
- data/docs/ApartmentsApi.md +373 -0
- data/docs/BaiduApi.md +447 -0
- data/docs/BillingLogListResponse.md +24 -0
- data/docs/BillingLogResponse.md +32 -0
- data/docs/BingApi.md +610 -0
- data/docs/ChatGPTApi.md +521 -0
- data/docs/DepopApi.md +542 -0
- data/docs/DuckDuckGoApi.md +700 -0
- data/docs/EBayApi.md +1019 -0
- data/docs/FacebookApi.md +1671 -0
- data/docs/FilterRuleCreate.md +28 -0
- data/docs/FilterRuleDeliveryLogListResponse.md +24 -0
- data/docs/FilterRuleDeliveryLogResponse.md +44 -0
- data/docs/FilterRuleListResponse.md +24 -0
- data/docs/FilterRuleResponse.md +40 -0
- data/docs/FilterRuleUpdate.md +30 -0
- data/docs/FilterRuleValidateRequest.md +18 -0
- data/docs/FilterRuleValidateResponse.md +22 -0
- data/docs/GoogleApi.md +3175 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/IdealistaApi.md +822 -0
- data/docs/ImmobiliareApi.md +773 -0
- data/docs/InstagramApi.md +1673 -0
- data/docs/LeboncoinApi.md +884 -0
- data/docs/LinkedInApi.md +925 -0
- data/docs/LoopNetApi.md +529 -0
- data/docs/PortalApiRoutersV1TwitterFilterRulesFilterRulePricingResponse.md +20 -0
- data/docs/RealtorApi.md +474 -0
- data/docs/RedditApi.md +1677 -0
- data/docs/RedfinApi.md +616 -0
- data/docs/StreamMonitorCreate.md +26 -0
- data/docs/StreamMonitorListResponse.md +24 -0
- data/docs/StreamMonitorResponse.md +42 -0
- data/docs/StreamMonitorUpdate.md +28 -0
- data/docs/SubscriptionInfo.md +40 -0
- data/docs/TikTokApi.md +2104 -0
- data/docs/TweetDeliveryLogListResponse.md +24 -0
- data/docs/TweetDeliveryLogResponse.md +44 -0
- data/docs/TwitterApi.md +4091 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/VintedApi.md +766 -0
- data/docs/WalmartApi.md +904 -0
- data/docs/WebApi.md +634 -0
- data/docs/WebhookCreate.md +22 -0
- data/docs/WebhookListItem.md +28 -0
- data/docs/WebhookListResponse.md +20 -0
- data/docs/WebhookResponse.md +26 -0
- data/docs/WebhookTestRequest.md +18 -0
- data/docs/WebhookTestResponse.md +24 -0
- data/docs/YahooApi.md +602 -0
- data/docs/YandexApi.md +450 -0
- data/docs/YouTubeApi.md +2872 -0
- data/docs/ZillowApi.md +622 -0
- data/git_push.sh +57 -0
- data/lib/scrapebadger/api/account_api.rb +79 -0
- data/lib/scrapebadger/api/amazon_api.rb +1165 -0
- data/lib/scrapebadger/api/apartments_api.rb +377 -0
- data/lib/scrapebadger/api/baidu_api.rb +436 -0
- data/lib/scrapebadger/api/bing_api.rb +580 -0
- data/lib/scrapebadger/api/chat_gpt_api.rb +466 -0
- data/lib/scrapebadger/api/depop_api.rb +518 -0
- data/lib/scrapebadger/api/duck_duck_go_api.rb +675 -0
- data/lib/scrapebadger/api/e_bay_api.rb +1029 -0
- data/lib/scrapebadger/api/facebook_api.rb +1492 -0
- data/lib/scrapebadger/api/google_api.rb +3191 -0
- data/lib/scrapebadger/api/idealista_api.rb +864 -0
- data/lib/scrapebadger/api/immobiliare_api.rb +734 -0
- data/lib/scrapebadger/api/instagram_api.rb +1555 -0
- data/lib/scrapebadger/api/leboncoin_api.rb +818 -0
- data/lib/scrapebadger/api/linked_in_api.rb +832 -0
- data/lib/scrapebadger/api/loop_net_api.rb +503 -0
- data/lib/scrapebadger/api/realtor_api.rb +481 -0
- data/lib/scrapebadger/api/reddit_api.rb +1601 -0
- data/lib/scrapebadger/api/redfin_api.rb +625 -0
- data/lib/scrapebadger/api/tik_tok_api.rb +2029 -0
- data/lib/scrapebadger/api/twitter_api.rb +3696 -0
- data/lib/scrapebadger/api/vinted_api.rb +705 -0
- data/lib/scrapebadger/api/walmart_api.rb +876 -0
- data/lib/scrapebadger/api/web_api.rb +547 -0
- data/lib/scrapebadger/api/yahoo_api.rb +560 -0
- data/lib/scrapebadger/api/yandex_api.rb +422 -0
- data/lib/scrapebadger/api/you_tube_api.rb +2520 -0
- data/lib/scrapebadger/api/zillow_api.rb +634 -0
- data/lib/scrapebadger/api_client.rb +394 -0
- data/lib/scrapebadger/api_error.rb +58 -0
- data/lib/scrapebadger/configuration.rb +308 -0
- data/lib/scrapebadger/models/account_info.rb +288 -0
- data/lib/scrapebadger/models/billing_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/billing_log_response.rb +334 -0
- data/lib/scrapebadger/models/filter_rule_create.rb +427 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/filter_rule_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_response.rb +390 -0
- data/lib/scrapebadger/models/filter_rule_update.rb +389 -0
- data/lib/scrapebadger/models/filter_rule_validate_request.rb +250 -0
- data/lib/scrapebadger/models/filter_rule_validate_response.rb +248 -0
- data/lib/scrapebadger/models/http_validation_error.rb +216 -0
- data/lib/scrapebadger/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response.rb +238 -0
- data/lib/scrapebadger/models/stream_monitor_create.rb +373 -0
- data/lib/scrapebadger/models/stream_monitor_list_response.rb +272 -0
- data/lib/scrapebadger/models/stream_monitor_response.rb +406 -0
- data/lib/scrapebadger/models/stream_monitor_update.rb +335 -0
- data/lib/scrapebadger/models/subscription_info.rb +352 -0
- data/lib/scrapebadger/models/tweet_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/tweet_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/validation_error.rb +255 -0
- data/lib/scrapebadger/models/validation_error_loc_inner.rb +104 -0
- data/lib/scrapebadger/models/webhook_create.rb +282 -0
- data/lib/scrapebadger/models/webhook_list_item.rb +302 -0
- data/lib/scrapebadger/models/webhook_list_response.rb +240 -0
- data/lib/scrapebadger/models/webhook_response.rb +286 -0
- data/lib/scrapebadger/models/webhook_test_request.rb +223 -0
- data/lib/scrapebadger/models/webhook_test_response.rb +259 -0
- data/lib/scrapebadger/version.rb +15 -0
- data/lib/scrapebadger.rb +96 -0
- data/scrapebadger.gemspec +39 -0
- data/spec/api/account_api_spec.rb +46 -0
- data/spec/api/amazon_api_spec.rb +258 -0
- data/spec/api/apartments_api_spec.rb +98 -0
- data/spec/api/baidu_api_spec.rb +109 -0
- data/spec/api/bing_api_spec.rb +141 -0
- data/spec/api/chat_gpt_api_spec.rb +123 -0
- data/spec/api/depop_api_spec.rb +132 -0
- data/spec/api/duck_duck_go_api_spec.rb +162 -0
- data/spec/api/e_bay_api_spec.rb +222 -0
- data/spec/api/facebook_api_spec.rb +326 -0
- data/spec/api/google_api_spec.rb +649 -0
- data/spec/api/idealista_api_spec.rb +197 -0
- data/spec/api/immobiliare_api_spec.rb +174 -0
- data/spec/api/instagram_api_spec.rb +309 -0
- data/spec/api/leboncoin_api_spec.rb +184 -0
- data/spec/api/linked_in_api_spec.rb +197 -0
- data/spec/api/loop_net_api_spec.rb +127 -0
- data/spec/api/realtor_api_spec.rb +123 -0
- data/spec/api/reddit_api_spec.rb +331 -0
- data/spec/api/redfin_api_spec.rb +147 -0
- data/spec/api/tik_tok_api_spec.rb +413 -0
- data/spec/api/twitter_api_spec.rb +735 -0
- data/spec/api/vinted_api_spec.rb +169 -0
- data/spec/api/walmart_api_spec.rb +192 -0
- data/spec/api/web_api_spec.rb +136 -0
- data/spec/api/yahoo_api_spec.rb +137 -0
- data/spec/api/yandex_api_spec.rb +111 -0
- data/spec/api/you_tube_api_spec.rb +500 -0
- data/spec/api/zillow_api_spec.rb +150 -0
- data/spec/models/account_info_spec.rb +66 -0
- data/spec/models/billing_log_list_response_spec.rb +54 -0
- data/spec/models/billing_log_response_spec.rb +78 -0
- data/spec/models/filter_rule_create_spec.rb +66 -0
- data/spec/models/filter_rule_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_delivery_log_response_spec.rb +114 -0
- data/spec/models/filter_rule_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_response_spec.rb +102 -0
- data/spec/models/filter_rule_update_spec.rb +72 -0
- data/spec/models/filter_rule_validate_request_spec.rb +36 -0
- data/spec/models/filter_rule_validate_response_spec.rb +48 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response_spec.rb +42 -0
- data/spec/models/stream_monitor_create_spec.rb +60 -0
- data/spec/models/stream_monitor_list_response_spec.rb +54 -0
- data/spec/models/stream_monitor_response_spec.rb +108 -0
- data/spec/models/stream_monitor_update_spec.rb +66 -0
- data/spec/models/subscription_info_spec.rb +102 -0
- data/spec/models/tweet_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/tweet_delivery_log_response_spec.rb +114 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/webhook_create_spec.rb +48 -0
- data/spec/models/webhook_list_item_spec.rb +66 -0
- data/spec/models/webhook_list_response_spec.rb +42 -0
- data/spec/models/webhook_response_spec.rb +60 -0
- data/spec/models/webhook_test_request_spec.rb +36 -0
- data/spec/models/webhook_test_response_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +324 -0
|
@@ -0,0 +1,864 @@
|
|
|
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 IdealistaApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Agency by phone
|
|
23
|
+
# Reverse-lookup the agency behind a contact phone (national number), with its listings.
|
|
24
|
+
# @param phone [String]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
27
|
+
# @option opts [String] :operation sale|rent
|
|
28
|
+
# @option opts [String] :property_type homes|offices|premises|garages|newDevelopments|lands|storageRooms|buildings|bedrooms
|
|
29
|
+
# @option opts [Integer] :page (default to 1)
|
|
30
|
+
# @option opts [Integer] :max_items (default to 30)
|
|
31
|
+
# @option opts [Boolean] :include_listings (default to true)
|
|
32
|
+
# @return [Object]
|
|
33
|
+
def idealista_agency_by_phone(phone, opts = {})
|
|
34
|
+
data, _status_code, _headers = idealista_agency_by_phone_with_http_info(phone, opts)
|
|
35
|
+
data
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Agency by phone
|
|
39
|
+
# Reverse-lookup the agency behind a contact phone (national number), with its listings.
|
|
40
|
+
# @param phone [String]
|
|
41
|
+
# @param [Hash] opts the optional parameters
|
|
42
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
43
|
+
# @option opts [String] :operation sale|rent
|
|
44
|
+
# @option opts [String] :property_type homes|offices|premises|garages|newDevelopments|lands|storageRooms|buildings|bedrooms
|
|
45
|
+
# @option opts [Integer] :page (default to 1)
|
|
46
|
+
# @option opts [Integer] :max_items (default to 30)
|
|
47
|
+
# @option opts [Boolean] :include_listings (default to true)
|
|
48
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
49
|
+
def idealista_agency_by_phone_with_http_info(phone, opts = {})
|
|
50
|
+
if @api_client.config.debugging
|
|
51
|
+
@api_client.config.logger.debug 'Calling API: IdealistaApi.idealista_agency_by_phone ...'
|
|
52
|
+
end
|
|
53
|
+
# verify the required parameter 'phone' is set
|
|
54
|
+
if @api_client.config.client_side_validation && phone.nil?
|
|
55
|
+
fail ArgumentError, "Missing the required parameter 'phone' when calling IdealistaApi.idealista_agency_by_phone"
|
|
56
|
+
end
|
|
57
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
58
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling IdealistaApi.idealista_agency_by_phone, must be greater than or equal to 1.'
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] > 50
|
|
62
|
+
fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling IdealistaApi.idealista_agency_by_phone, must be smaller than or equal to 50.'
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1
|
|
66
|
+
fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling IdealistaApi.idealista_agency_by_phone, must be greater than or equal to 1.'
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# resource path
|
|
70
|
+
local_var_path = '/v1/idealista/agency/by-phone/{phone}'.sub('{' + 'phone' + '}', CGI.escape(phone.to_s))
|
|
71
|
+
|
|
72
|
+
# query parameters
|
|
73
|
+
query_params = opts[:query_params] || {}
|
|
74
|
+
query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
|
|
75
|
+
query_params[:'operation'] = opts[:'operation'] if !opts[:'operation'].nil?
|
|
76
|
+
query_params[:'property_type'] = opts[:'property_type'] if !opts[:'property_type'].nil?
|
|
77
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
78
|
+
query_params[:'max_items'] = opts[:'max_items'] if !opts[:'max_items'].nil?
|
|
79
|
+
query_params[:'include_listings'] = opts[:'include_listings'] if !opts[:'include_listings'].nil?
|
|
80
|
+
|
|
81
|
+
# header parameters
|
|
82
|
+
header_params = opts[:header_params] || {}
|
|
83
|
+
# HTTP header 'Accept' (if needed)
|
|
84
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
85
|
+
|
|
86
|
+
# form parameters
|
|
87
|
+
form_params = opts[:form_params] || {}
|
|
88
|
+
|
|
89
|
+
# http body (model)
|
|
90
|
+
post_body = opts[:debug_body]
|
|
91
|
+
|
|
92
|
+
# return_type
|
|
93
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
94
|
+
|
|
95
|
+
# auth_names
|
|
96
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
97
|
+
|
|
98
|
+
new_options = opts.merge(
|
|
99
|
+
:operation => :"IdealistaApi.idealista_agency_by_phone",
|
|
100
|
+
:header_params => header_params,
|
|
101
|
+
:query_params => query_params,
|
|
102
|
+
:form_params => form_params,
|
|
103
|
+
:body => post_body,
|
|
104
|
+
:auth_names => auth_names,
|
|
105
|
+
:return_type => return_type
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
109
|
+
if @api_client.config.debugging
|
|
110
|
+
@api_client.config.logger.debug "API called: IdealistaApi#idealista_agency_by_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
111
|
+
end
|
|
112
|
+
return data, status_code, headers
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Agency profile + listings
|
|
116
|
+
# An agency's microsite profile plus a page of its listings (by URL-slug shortName).
|
|
117
|
+
# @param short_name [String]
|
|
118
|
+
# @param [Hash] opts the optional parameters
|
|
119
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
120
|
+
# @option opts [String] :operation sale|rent
|
|
121
|
+
# @option opts [String] :property_type homes|offices|premises|garages|newDevelopments|lands|storageRooms|buildings|bedrooms
|
|
122
|
+
# @option opts [Integer] :page (default to 1)
|
|
123
|
+
# @option opts [Integer] :max_items (default to 30)
|
|
124
|
+
# @option opts [Boolean] :include_listings (default to true)
|
|
125
|
+
# @return [Object]
|
|
126
|
+
def idealista_agency_profile_listings(short_name, opts = {})
|
|
127
|
+
data, _status_code, _headers = idealista_agency_profile_listings_with_http_info(short_name, opts)
|
|
128
|
+
data
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Agency profile + listings
|
|
132
|
+
# An agency's microsite profile plus a page of its listings (by URL-slug shortName).
|
|
133
|
+
# @param short_name [String]
|
|
134
|
+
# @param [Hash] opts the optional parameters
|
|
135
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
136
|
+
# @option opts [String] :operation sale|rent
|
|
137
|
+
# @option opts [String] :property_type homes|offices|premises|garages|newDevelopments|lands|storageRooms|buildings|bedrooms
|
|
138
|
+
# @option opts [Integer] :page (default to 1)
|
|
139
|
+
# @option opts [Integer] :max_items (default to 30)
|
|
140
|
+
# @option opts [Boolean] :include_listings (default to true)
|
|
141
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
142
|
+
def idealista_agency_profile_listings_with_http_info(short_name, opts = {})
|
|
143
|
+
if @api_client.config.debugging
|
|
144
|
+
@api_client.config.logger.debug 'Calling API: IdealistaApi.idealista_agency_profile_listings ...'
|
|
145
|
+
end
|
|
146
|
+
# verify the required parameter 'short_name' is set
|
|
147
|
+
if @api_client.config.client_side_validation && short_name.nil?
|
|
148
|
+
fail ArgumentError, "Missing the required parameter 'short_name' when calling IdealistaApi.idealista_agency_profile_listings"
|
|
149
|
+
end
|
|
150
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
151
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling IdealistaApi.idealista_agency_profile_listings, must be greater than or equal to 1.'
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] > 50
|
|
155
|
+
fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling IdealistaApi.idealista_agency_profile_listings, must be smaller than or equal to 50.'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1
|
|
159
|
+
fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling IdealistaApi.idealista_agency_profile_listings, must be greater than or equal to 1.'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# resource path
|
|
163
|
+
local_var_path = '/v1/idealista/agency/{short_name}'.sub('{' + 'short_name' + '}', CGI.escape(short_name.to_s))
|
|
164
|
+
|
|
165
|
+
# query parameters
|
|
166
|
+
query_params = opts[:query_params] || {}
|
|
167
|
+
query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
|
|
168
|
+
query_params[:'operation'] = opts[:'operation'] if !opts[:'operation'].nil?
|
|
169
|
+
query_params[:'property_type'] = opts[:'property_type'] if !opts[:'property_type'].nil?
|
|
170
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
171
|
+
query_params[:'max_items'] = opts[:'max_items'] if !opts[:'max_items'].nil?
|
|
172
|
+
query_params[:'include_listings'] = opts[:'include_listings'] if !opts[:'include_listings'].nil?
|
|
173
|
+
|
|
174
|
+
# header parameters
|
|
175
|
+
header_params = opts[:header_params] || {}
|
|
176
|
+
# HTTP header 'Accept' (if needed)
|
|
177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
178
|
+
|
|
179
|
+
# form parameters
|
|
180
|
+
form_params = opts[:form_params] || {}
|
|
181
|
+
|
|
182
|
+
# http body (model)
|
|
183
|
+
post_body = opts[:debug_body]
|
|
184
|
+
|
|
185
|
+
# return_type
|
|
186
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
187
|
+
|
|
188
|
+
# auth_names
|
|
189
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
190
|
+
|
|
191
|
+
new_options = opts.merge(
|
|
192
|
+
:operation => :"IdealistaApi.idealista_agency_profile_listings",
|
|
193
|
+
:header_params => header_params,
|
|
194
|
+
:query_params => query_params,
|
|
195
|
+
:form_params => form_params,
|
|
196
|
+
:body => post_body,
|
|
197
|
+
:auth_names => auth_names,
|
|
198
|
+
:return_type => return_type
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
202
|
+
if @api_client.config.debugging
|
|
203
|
+
@api_client.config.logger.debug "API called: IdealistaApi#idealista_agency_profile_listings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
204
|
+
end
|
|
205
|
+
return data, status_code, headers
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Get listing engagement stats
|
|
209
|
+
# Engagement counters for a listing: views, email contacts, sent-to-friend, favourites.
|
|
210
|
+
# @param property_code [String]
|
|
211
|
+
# @param [Hash] opts the optional parameters
|
|
212
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
213
|
+
# @option opts [String] :locale Language for stat labels (default to 'en')
|
|
214
|
+
# @return [Object]
|
|
215
|
+
def idealista_get_listing_engagement_stats(property_code, opts = {})
|
|
216
|
+
data, _status_code, _headers = idealista_get_listing_engagement_stats_with_http_info(property_code, opts)
|
|
217
|
+
data
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Get listing engagement stats
|
|
221
|
+
# Engagement counters for a listing: views, email contacts, sent-to-friend, favourites.
|
|
222
|
+
# @param property_code [String]
|
|
223
|
+
# @param [Hash] opts the optional parameters
|
|
224
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
225
|
+
# @option opts [String] :locale Language for stat labels (default to 'en')
|
|
226
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
227
|
+
def idealista_get_listing_engagement_stats_with_http_info(property_code, opts = {})
|
|
228
|
+
if @api_client.config.debugging
|
|
229
|
+
@api_client.config.logger.debug 'Calling API: IdealistaApi.idealista_get_listing_engagement_stats ...'
|
|
230
|
+
end
|
|
231
|
+
# verify the required parameter 'property_code' is set
|
|
232
|
+
if @api_client.config.client_side_validation && property_code.nil?
|
|
233
|
+
fail ArgumentError, "Missing the required parameter 'property_code' when calling IdealistaApi.idealista_get_listing_engagement_stats"
|
|
234
|
+
end
|
|
235
|
+
# resource path
|
|
236
|
+
local_var_path = '/v1/idealista/properties/{property_code}/stats'.sub('{' + 'property_code' + '}', CGI.escape(property_code.to_s))
|
|
237
|
+
|
|
238
|
+
# query parameters
|
|
239
|
+
query_params = opts[:query_params] || {}
|
|
240
|
+
query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
|
|
241
|
+
query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
|
|
242
|
+
|
|
243
|
+
# header parameters
|
|
244
|
+
header_params = opts[:header_params] || {}
|
|
245
|
+
# HTTP header 'Accept' (if needed)
|
|
246
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
247
|
+
|
|
248
|
+
# form parameters
|
|
249
|
+
form_params = opts[:form_params] || {}
|
|
250
|
+
|
|
251
|
+
# http body (model)
|
|
252
|
+
post_body = opts[:debug_body]
|
|
253
|
+
|
|
254
|
+
# return_type
|
|
255
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
256
|
+
|
|
257
|
+
# auth_names
|
|
258
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
259
|
+
|
|
260
|
+
new_options = opts.merge(
|
|
261
|
+
:operation => :"IdealistaApi.idealista_get_listing_engagement_stats",
|
|
262
|
+
:header_params => header_params,
|
|
263
|
+
:query_params => query_params,
|
|
264
|
+
:form_params => form_params,
|
|
265
|
+
:body => post_body,
|
|
266
|
+
:auth_names => auth_names,
|
|
267
|
+
:return_type => return_type
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
271
|
+
if @api_client.config.debugging
|
|
272
|
+
@api_client.config.logger.debug "API called: IdealistaApi#idealista_get_listing_engagement_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
273
|
+
end
|
|
274
|
+
return data, status_code, headers
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Get property detail
|
|
278
|
+
# Get a single Idealista listing's full detail (energy cert, characteristics, media).
|
|
279
|
+
# @param property_code [String]
|
|
280
|
+
# @param [Hash] opts the optional parameters
|
|
281
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
282
|
+
# @option opts [String] :locale Response language (en, es, it, pt) (default to 'en')
|
|
283
|
+
# @return [Object]
|
|
284
|
+
def idealista_get_property_detail(property_code, opts = {})
|
|
285
|
+
data, _status_code, _headers = idealista_get_property_detail_with_http_info(property_code, opts)
|
|
286
|
+
data
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
# Get property detail
|
|
290
|
+
# Get a single Idealista listing's full detail (energy cert, characteristics, media).
|
|
291
|
+
# @param property_code [String]
|
|
292
|
+
# @param [Hash] opts the optional parameters
|
|
293
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
294
|
+
# @option opts [String] :locale Response language (en, es, it, pt) (default to 'en')
|
|
295
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
296
|
+
def idealista_get_property_detail_with_http_info(property_code, opts = {})
|
|
297
|
+
if @api_client.config.debugging
|
|
298
|
+
@api_client.config.logger.debug 'Calling API: IdealistaApi.idealista_get_property_detail ...'
|
|
299
|
+
end
|
|
300
|
+
# verify the required parameter 'property_code' is set
|
|
301
|
+
if @api_client.config.client_side_validation && property_code.nil?
|
|
302
|
+
fail ArgumentError, "Missing the required parameter 'property_code' when calling IdealistaApi.idealista_get_property_detail"
|
|
303
|
+
end
|
|
304
|
+
# resource path
|
|
305
|
+
local_var_path = '/v1/idealista/properties/{property_code}'.sub('{' + 'property_code' + '}', CGI.escape(property_code.to_s))
|
|
306
|
+
|
|
307
|
+
# query parameters
|
|
308
|
+
query_params = opts[:query_params] || {}
|
|
309
|
+
query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
|
|
310
|
+
query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
|
|
311
|
+
|
|
312
|
+
# header parameters
|
|
313
|
+
header_params = opts[:header_params] || {}
|
|
314
|
+
# HTTP header 'Accept' (if needed)
|
|
315
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
316
|
+
|
|
317
|
+
# form parameters
|
|
318
|
+
form_params = opts[:form_params] || {}
|
|
319
|
+
|
|
320
|
+
# http body (model)
|
|
321
|
+
post_body = opts[:debug_body]
|
|
322
|
+
|
|
323
|
+
# return_type
|
|
324
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
325
|
+
|
|
326
|
+
# auth_names
|
|
327
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
328
|
+
|
|
329
|
+
new_options = opts.merge(
|
|
330
|
+
:operation => :"IdealistaApi.idealista_get_property_detail",
|
|
331
|
+
:header_params => header_params,
|
|
332
|
+
:query_params => query_params,
|
|
333
|
+
:form_params => form_params,
|
|
334
|
+
:body => post_body,
|
|
335
|
+
:auth_names => auth_names,
|
|
336
|
+
:return_type => return_type
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
340
|
+
if @api_client.config.debugging
|
|
341
|
+
@api_client.config.logger.debug "API called: IdealistaApi#idealista_get_property_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
342
|
+
end
|
|
343
|
+
return data, status_code, headers
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# Idealista scraper health check
|
|
347
|
+
# Check health of the Idealista scraper service (accepts HEAD for UptimeRobot).
|
|
348
|
+
# @param [Hash] opts the optional parameters
|
|
349
|
+
# @return [Object]
|
|
350
|
+
def idealista_idealista_scraper_health_check(opts = {})
|
|
351
|
+
data, _status_code, _headers = idealista_idealista_scraper_health_check_with_http_info(opts)
|
|
352
|
+
data
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# Idealista scraper health check
|
|
356
|
+
# Check health of the Idealista scraper service (accepts HEAD for UptimeRobot).
|
|
357
|
+
# @param [Hash] opts the optional parameters
|
|
358
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
359
|
+
def idealista_idealista_scraper_health_check_with_http_info(opts = {})
|
|
360
|
+
if @api_client.config.debugging
|
|
361
|
+
@api_client.config.logger.debug 'Calling API: IdealistaApi.idealista_idealista_scraper_health_check ...'
|
|
362
|
+
end
|
|
363
|
+
# resource path
|
|
364
|
+
local_var_path = '/v1/idealista/health'
|
|
365
|
+
|
|
366
|
+
# query parameters
|
|
367
|
+
query_params = opts[:query_params] || {}
|
|
368
|
+
|
|
369
|
+
# header parameters
|
|
370
|
+
header_params = opts[:header_params] || {}
|
|
371
|
+
# HTTP header 'Accept' (if needed)
|
|
372
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
373
|
+
|
|
374
|
+
# form parameters
|
|
375
|
+
form_params = opts[:form_params] || {}
|
|
376
|
+
|
|
377
|
+
# http body (model)
|
|
378
|
+
post_body = opts[:debug_body]
|
|
379
|
+
|
|
380
|
+
# return_type
|
|
381
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
382
|
+
|
|
383
|
+
# auth_names
|
|
384
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
385
|
+
|
|
386
|
+
new_options = opts.merge(
|
|
387
|
+
:operation => :"IdealistaApi.idealista_idealista_scraper_health_check",
|
|
388
|
+
:header_params => header_params,
|
|
389
|
+
:query_params => query_params,
|
|
390
|
+
:form_params => form_params,
|
|
391
|
+
:body => post_body,
|
|
392
|
+
:auth_names => auth_names,
|
|
393
|
+
:return_type => return_type
|
|
394
|
+
)
|
|
395
|
+
|
|
396
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
397
|
+
if @api_client.config.debugging
|
|
398
|
+
@api_client.config.logger.debug "API called: IdealistaApi#idealista_idealista_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
399
|
+
end
|
|
400
|
+
return data, status_code, headers
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
# Idealista scraper health check
|
|
404
|
+
# Check health of the Idealista scraper service (accepts HEAD for UptimeRobot).
|
|
405
|
+
# @param [Hash] opts the optional parameters
|
|
406
|
+
# @return [Object]
|
|
407
|
+
def idealista_idealista_scraper_health_check_head(opts = {})
|
|
408
|
+
data, _status_code, _headers = idealista_idealista_scraper_health_check_head_with_http_info(opts)
|
|
409
|
+
data
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
# Idealista scraper health check
|
|
413
|
+
# Check health of the Idealista scraper service (accepts HEAD for UptimeRobot).
|
|
414
|
+
# @param [Hash] opts the optional parameters
|
|
415
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
416
|
+
def idealista_idealista_scraper_health_check_head_with_http_info(opts = {})
|
|
417
|
+
if @api_client.config.debugging
|
|
418
|
+
@api_client.config.logger.debug 'Calling API: IdealistaApi.idealista_idealista_scraper_health_check_head ...'
|
|
419
|
+
end
|
|
420
|
+
# resource path
|
|
421
|
+
local_var_path = '/v1/idealista/health'
|
|
422
|
+
|
|
423
|
+
# query parameters
|
|
424
|
+
query_params = opts[:query_params] || {}
|
|
425
|
+
|
|
426
|
+
# header parameters
|
|
427
|
+
header_params = opts[:header_params] || {}
|
|
428
|
+
# HTTP header 'Accept' (if needed)
|
|
429
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
430
|
+
|
|
431
|
+
# form parameters
|
|
432
|
+
form_params = opts[:form_params] || {}
|
|
433
|
+
|
|
434
|
+
# http body (model)
|
|
435
|
+
post_body = opts[:debug_body]
|
|
436
|
+
|
|
437
|
+
# return_type
|
|
438
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
439
|
+
|
|
440
|
+
# auth_names
|
|
441
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
442
|
+
|
|
443
|
+
new_options = opts.merge(
|
|
444
|
+
:operation => :"IdealistaApi.idealista_idealista_scraper_health_check_head",
|
|
445
|
+
:header_params => header_params,
|
|
446
|
+
:query_params => query_params,
|
|
447
|
+
:form_params => form_params,
|
|
448
|
+
:body => post_body,
|
|
449
|
+
:auth_names => auth_names,
|
|
450
|
+
:return_type => return_type
|
|
451
|
+
)
|
|
452
|
+
|
|
453
|
+
data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
|
|
454
|
+
if @api_client.config.debugging
|
|
455
|
+
@api_client.config.logger.debug "API called: IdealistaApi#idealista_idealista_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
456
|
+
end
|
|
457
|
+
return data, status_code, headers
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# List markets
|
|
461
|
+
# List supported Idealista markets (ES, IT, PT).
|
|
462
|
+
# @param [Hash] opts the optional parameters
|
|
463
|
+
# @return [Object]
|
|
464
|
+
def idealista_list_markets(opts = {})
|
|
465
|
+
data, _status_code, _headers = idealista_list_markets_with_http_info(opts)
|
|
466
|
+
data
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
# List markets
|
|
470
|
+
# List supported Idealista markets (ES, IT, PT).
|
|
471
|
+
# @param [Hash] opts the optional parameters
|
|
472
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
473
|
+
def idealista_list_markets_with_http_info(opts = {})
|
|
474
|
+
if @api_client.config.debugging
|
|
475
|
+
@api_client.config.logger.debug 'Calling API: IdealistaApi.idealista_list_markets ...'
|
|
476
|
+
end
|
|
477
|
+
# resource path
|
|
478
|
+
local_var_path = '/v1/idealista/markets'
|
|
479
|
+
|
|
480
|
+
# query parameters
|
|
481
|
+
query_params = opts[:query_params] || {}
|
|
482
|
+
|
|
483
|
+
# header parameters
|
|
484
|
+
header_params = opts[:header_params] || {}
|
|
485
|
+
# HTTP header 'Accept' (if needed)
|
|
486
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
487
|
+
|
|
488
|
+
# form parameters
|
|
489
|
+
form_params = opts[:form_params] || {}
|
|
490
|
+
|
|
491
|
+
# http body (model)
|
|
492
|
+
post_body = opts[:debug_body]
|
|
493
|
+
|
|
494
|
+
# return_type
|
|
495
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
496
|
+
|
|
497
|
+
# auth_names
|
|
498
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
499
|
+
|
|
500
|
+
new_options = opts.merge(
|
|
501
|
+
:operation => :"IdealistaApi.idealista_list_markets",
|
|
502
|
+
:header_params => header_params,
|
|
503
|
+
:query_params => query_params,
|
|
504
|
+
:form_params => form_params,
|
|
505
|
+
:body => post_body,
|
|
506
|
+
:auth_names => auth_names,
|
|
507
|
+
:return_type => return_type
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
511
|
+
if @api_client.config.debugging
|
|
512
|
+
@api_client.config.logger.debug "API called: IdealistaApi#idealista_list_markets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
513
|
+
end
|
|
514
|
+
return data, status_code, headers
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
# Resolve locations
|
|
518
|
+
# Resolve a free-text query into Idealista location codes for a search.
|
|
519
|
+
# @param query [String] Free-text location, e.g. 'sagrada familia'
|
|
520
|
+
# @param [Hash] opts the optional parameters
|
|
521
|
+
# @option opts [String] :operation sale|rent (default to 'sale')
|
|
522
|
+
# @option opts [String] :property_type homes|offices|premises|garages|newDevelopments|lands|storageRooms|buildings|bedrooms (default to 'homes')
|
|
523
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
524
|
+
# @option opts [String] :locale Response language (en, es, it, pt)
|
|
525
|
+
# @return [Object]
|
|
526
|
+
def idealista_resolve_locations(query, opts = {})
|
|
527
|
+
data, _status_code, _headers = idealista_resolve_locations_with_http_info(query, opts)
|
|
528
|
+
data
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
# Resolve locations
|
|
532
|
+
# Resolve a free-text query into Idealista location codes for a search.
|
|
533
|
+
# @param query [String] Free-text location, e.g. 'sagrada familia'
|
|
534
|
+
# @param [Hash] opts the optional parameters
|
|
535
|
+
# @option opts [String] :operation sale|rent (default to 'sale')
|
|
536
|
+
# @option opts [String] :property_type homes|offices|premises|garages|newDevelopments|lands|storageRooms|buildings|bedrooms (default to 'homes')
|
|
537
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
538
|
+
# @option opts [String] :locale Response language (en, es, it, pt)
|
|
539
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
540
|
+
def idealista_resolve_locations_with_http_info(query, opts = {})
|
|
541
|
+
if @api_client.config.debugging
|
|
542
|
+
@api_client.config.logger.debug 'Calling API: IdealistaApi.idealista_resolve_locations ...'
|
|
543
|
+
end
|
|
544
|
+
# verify the required parameter 'query' is set
|
|
545
|
+
if @api_client.config.client_side_validation && query.nil?
|
|
546
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling IdealistaApi.idealista_resolve_locations"
|
|
547
|
+
end
|
|
548
|
+
# resource path
|
|
549
|
+
local_var_path = '/v1/idealista/suggest'
|
|
550
|
+
|
|
551
|
+
# query parameters
|
|
552
|
+
query_params = opts[:query_params] || {}
|
|
553
|
+
query_params[:'query'] = query
|
|
554
|
+
query_params[:'operation'] = opts[:'operation'] if !opts[:'operation'].nil?
|
|
555
|
+
query_params[:'property_type'] = opts[:'property_type'] if !opts[:'property_type'].nil?
|
|
556
|
+
query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
|
|
557
|
+
query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
|
|
558
|
+
|
|
559
|
+
# header parameters
|
|
560
|
+
header_params = opts[:header_params] || {}
|
|
561
|
+
# HTTP header 'Accept' (if needed)
|
|
562
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
563
|
+
|
|
564
|
+
# form parameters
|
|
565
|
+
form_params = opts[:form_params] || {}
|
|
566
|
+
|
|
567
|
+
# http body (model)
|
|
568
|
+
post_body = opts[:debug_body]
|
|
569
|
+
|
|
570
|
+
# return_type
|
|
571
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
572
|
+
|
|
573
|
+
# auth_names
|
|
574
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
575
|
+
|
|
576
|
+
new_options = opts.merge(
|
|
577
|
+
:operation => :"IdealistaApi.idealista_resolve_locations",
|
|
578
|
+
:header_params => header_params,
|
|
579
|
+
:query_params => query_params,
|
|
580
|
+
:form_params => form_params,
|
|
581
|
+
:body => post_body,
|
|
582
|
+
:auth_names => auth_names,
|
|
583
|
+
:return_type => return_type
|
|
584
|
+
)
|
|
585
|
+
|
|
586
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
587
|
+
if @api_client.config.debugging
|
|
588
|
+
@api_client.config.logger.debug "API called: IdealistaApi#idealista_resolve_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
589
|
+
end
|
|
590
|
+
return data, status_code, headers
|
|
591
|
+
end
|
|
592
|
+
|
|
593
|
+
# Search all (beats result cap)
|
|
594
|
+
# Full inventory for a location, beating Idealista's ~1800 per-search cap via price-range tiling (deduped). Billed per page fetched.
|
|
595
|
+
# @param location [String] Idealista location code (from /suggest)
|
|
596
|
+
# @param [Hash] opts the optional parameters
|
|
597
|
+
# @option opts [String] :operation sale|rent (default to 'sale')
|
|
598
|
+
# @option opts [String] :property_type homes|offices|premises|garages|newDevelopments|lands|storageRooms|buildings|bedrooms (default to 'homes')
|
|
599
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
600
|
+
# @option opts [Integer] :max_results (default to 500)
|
|
601
|
+
# @option opts [Float] :min_price
|
|
602
|
+
# @option opts [Float] :max_price
|
|
603
|
+
# @option opts [Float] :min_size
|
|
604
|
+
# @option opts [Float] :max_size
|
|
605
|
+
# @option opts [Integer] :min_rooms
|
|
606
|
+
# @option opts [Integer] :max_rooms
|
|
607
|
+
# @option opts [String] :locale Response language (en, es, it, pt)
|
|
608
|
+
# @return [Object]
|
|
609
|
+
def idealista_search_all_beats_result_cap(location, opts = {})
|
|
610
|
+
data, _status_code, _headers = idealista_search_all_beats_result_cap_with_http_info(location, opts)
|
|
611
|
+
data
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
# Search all (beats result cap)
|
|
615
|
+
# Full inventory for a location, beating Idealista's ~1800 per-search cap via price-range tiling (deduped). Billed per page fetched.
|
|
616
|
+
# @param location [String] Idealista location code (from /suggest)
|
|
617
|
+
# @param [Hash] opts the optional parameters
|
|
618
|
+
# @option opts [String] :operation sale|rent (default to 'sale')
|
|
619
|
+
# @option opts [String] :property_type homes|offices|premises|garages|newDevelopments|lands|storageRooms|buildings|bedrooms (default to 'homes')
|
|
620
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
621
|
+
# @option opts [Integer] :max_results (default to 500)
|
|
622
|
+
# @option opts [Float] :min_price
|
|
623
|
+
# @option opts [Float] :max_price
|
|
624
|
+
# @option opts [Float] :min_size
|
|
625
|
+
# @option opts [Float] :max_size
|
|
626
|
+
# @option opts [Integer] :min_rooms
|
|
627
|
+
# @option opts [Integer] :max_rooms
|
|
628
|
+
# @option opts [String] :locale Response language (en, es, it, pt)
|
|
629
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
630
|
+
def idealista_search_all_beats_result_cap_with_http_info(location, opts = {})
|
|
631
|
+
if @api_client.config.debugging
|
|
632
|
+
@api_client.config.logger.debug 'Calling API: IdealistaApi.idealista_search_all_beats_result_cap ...'
|
|
633
|
+
end
|
|
634
|
+
# verify the required parameter 'location' is set
|
|
635
|
+
if @api_client.config.client_side_validation && location.nil?
|
|
636
|
+
fail ArgumentError, "Missing the required parameter 'location' when calling IdealistaApi.idealista_search_all_beats_result_cap"
|
|
637
|
+
end
|
|
638
|
+
if @api_client.config.client_side_validation && !opts[:'max_results'].nil? && opts[:'max_results'] > 3000
|
|
639
|
+
fail ArgumentError, 'invalid value for "opts[:"max_results"]" when calling IdealistaApi.idealista_search_all_beats_result_cap, must be smaller than or equal to 3000.'
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
if @api_client.config.client_side_validation && !opts[:'max_results'].nil? && opts[:'max_results'] < 1
|
|
643
|
+
fail ArgumentError, 'invalid value for "opts[:"max_results"]" when calling IdealistaApi.idealista_search_all_beats_result_cap, must be greater than or equal to 1.'
|
|
644
|
+
end
|
|
645
|
+
|
|
646
|
+
if @api_client.config.client_side_validation && !opts[:'min_price'].nil? && opts[:'min_price'] < 0
|
|
647
|
+
fail ArgumentError, 'invalid value for "opts[:"min_price"]" when calling IdealistaApi.idealista_search_all_beats_result_cap, must be greater than or equal to 0.'
|
|
648
|
+
end
|
|
649
|
+
|
|
650
|
+
if @api_client.config.client_side_validation && !opts[:'max_price'].nil? && opts[:'max_price'] < 0
|
|
651
|
+
fail ArgumentError, 'invalid value for "opts[:"max_price"]" when calling IdealistaApi.idealista_search_all_beats_result_cap, must be greater than or equal to 0.'
|
|
652
|
+
end
|
|
653
|
+
|
|
654
|
+
if @api_client.config.client_side_validation && !opts[:'min_size'].nil? && opts[:'min_size'] < 0
|
|
655
|
+
fail ArgumentError, 'invalid value for "opts[:"min_size"]" when calling IdealistaApi.idealista_search_all_beats_result_cap, must be greater than or equal to 0.'
|
|
656
|
+
end
|
|
657
|
+
|
|
658
|
+
if @api_client.config.client_side_validation && !opts[:'max_size'].nil? && opts[:'max_size'] < 0
|
|
659
|
+
fail ArgumentError, 'invalid value for "opts[:"max_size"]" when calling IdealistaApi.idealista_search_all_beats_result_cap, must be greater than or equal to 0.'
|
|
660
|
+
end
|
|
661
|
+
|
|
662
|
+
if @api_client.config.client_side_validation && !opts[:'min_rooms'].nil? && opts[:'min_rooms'] < 0
|
|
663
|
+
fail ArgumentError, 'invalid value for "opts[:"min_rooms"]" when calling IdealistaApi.idealista_search_all_beats_result_cap, must be greater than or equal to 0.'
|
|
664
|
+
end
|
|
665
|
+
|
|
666
|
+
if @api_client.config.client_side_validation && !opts[:'max_rooms'].nil? && opts[:'max_rooms'] < 0
|
|
667
|
+
fail ArgumentError, 'invalid value for "opts[:"max_rooms"]" when calling IdealistaApi.idealista_search_all_beats_result_cap, must be greater than or equal to 0.'
|
|
668
|
+
end
|
|
669
|
+
|
|
670
|
+
# resource path
|
|
671
|
+
local_var_path = '/v1/idealista/search/all'
|
|
672
|
+
|
|
673
|
+
# query parameters
|
|
674
|
+
query_params = opts[:query_params] || {}
|
|
675
|
+
query_params[:'location'] = location
|
|
676
|
+
query_params[:'operation'] = opts[:'operation'] if !opts[:'operation'].nil?
|
|
677
|
+
query_params[:'property_type'] = opts[:'property_type'] if !opts[:'property_type'].nil?
|
|
678
|
+
query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
|
|
679
|
+
query_params[:'max_results'] = opts[:'max_results'] if !opts[:'max_results'].nil?
|
|
680
|
+
query_params[:'min_price'] = opts[:'min_price'] if !opts[:'min_price'].nil?
|
|
681
|
+
query_params[:'max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
|
|
682
|
+
query_params[:'min_size'] = opts[:'min_size'] if !opts[:'min_size'].nil?
|
|
683
|
+
query_params[:'max_size'] = opts[:'max_size'] if !opts[:'max_size'].nil?
|
|
684
|
+
query_params[:'min_rooms'] = opts[:'min_rooms'] if !opts[:'min_rooms'].nil?
|
|
685
|
+
query_params[:'max_rooms'] = opts[:'max_rooms'] if !opts[:'max_rooms'].nil?
|
|
686
|
+
query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
|
|
687
|
+
|
|
688
|
+
# header parameters
|
|
689
|
+
header_params = opts[:header_params] || {}
|
|
690
|
+
# HTTP header 'Accept' (if needed)
|
|
691
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
692
|
+
|
|
693
|
+
# form parameters
|
|
694
|
+
form_params = opts[:form_params] || {}
|
|
695
|
+
|
|
696
|
+
# http body (model)
|
|
697
|
+
post_body = opts[:debug_body]
|
|
698
|
+
|
|
699
|
+
# return_type
|
|
700
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
701
|
+
|
|
702
|
+
# auth_names
|
|
703
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
704
|
+
|
|
705
|
+
new_options = opts.merge(
|
|
706
|
+
:operation => :"IdealistaApi.idealista_search_all_beats_result_cap",
|
|
707
|
+
:header_params => header_params,
|
|
708
|
+
:query_params => query_params,
|
|
709
|
+
:form_params => form_params,
|
|
710
|
+
:body => post_body,
|
|
711
|
+
:auth_names => auth_names,
|
|
712
|
+
:return_type => return_type
|
|
713
|
+
)
|
|
714
|
+
|
|
715
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
716
|
+
if @api_client.config.debugging
|
|
717
|
+
@api_client.config.logger.debug "API called: IdealistaApi#idealista_search_all_beats_result_cap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
718
|
+
end
|
|
719
|
+
return data, status_code, headers
|
|
720
|
+
end
|
|
721
|
+
|
|
722
|
+
# Search listings
|
|
723
|
+
# Search Idealista real-estate listings by location code.
|
|
724
|
+
# @param location [String] Idealista location code (from /suggest)
|
|
725
|
+
# @param [Hash] opts the optional parameters
|
|
726
|
+
# @option opts [String] :operation sale|rent (default to 'sale')
|
|
727
|
+
# @option opts [String] :property_type homes|offices|premises|garages|newDevelopments|lands|storageRooms|buildings|bedrooms (default to 'homes')
|
|
728
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
729
|
+
# @option opts [Integer] :page (default to 1)
|
|
730
|
+
# @option opts [Integer] :max_items (default to 30)
|
|
731
|
+
# @option opts [String] :sort_by distance|size|rooms|floor|ratioeurm2|price|street|photos|modificationDate|publicationDate|weigh|priceDown|preservationTypeAndPrice|privateAds
|
|
732
|
+
# @option opts [String] :sort_order asc|desc (default to 'desc')
|
|
733
|
+
# @option opts [Float] :min_price
|
|
734
|
+
# @option opts [Float] :max_price
|
|
735
|
+
# @option opts [Float] :min_size
|
|
736
|
+
# @option opts [Float] :max_size
|
|
737
|
+
# @option opts [Integer] :min_rooms
|
|
738
|
+
# @option opts [Integer] :max_rooms
|
|
739
|
+
# @option opts [String] :locale Response language (en, es, it, pt)
|
|
740
|
+
# @return [Object]
|
|
741
|
+
def idealista_search_listings(location, opts = {})
|
|
742
|
+
data, _status_code, _headers = idealista_search_listings_with_http_info(location, opts)
|
|
743
|
+
data
|
|
744
|
+
end
|
|
745
|
+
|
|
746
|
+
# Search listings
|
|
747
|
+
# Search Idealista real-estate listings by location code.
|
|
748
|
+
# @param location [String] Idealista location code (from /suggest)
|
|
749
|
+
# @param [Hash] opts the optional parameters
|
|
750
|
+
# @option opts [String] :operation sale|rent (default to 'sale')
|
|
751
|
+
# @option opts [String] :property_type homes|offices|premises|garages|newDevelopments|lands|storageRooms|buildings|bedrooms (default to 'homes')
|
|
752
|
+
# @option opts [String] :market es|it|pt (default to 'es')
|
|
753
|
+
# @option opts [Integer] :page (default to 1)
|
|
754
|
+
# @option opts [Integer] :max_items (default to 30)
|
|
755
|
+
# @option opts [String] :sort_by distance|size|rooms|floor|ratioeurm2|price|street|photos|modificationDate|publicationDate|weigh|priceDown|preservationTypeAndPrice|privateAds
|
|
756
|
+
# @option opts [String] :sort_order asc|desc (default to 'desc')
|
|
757
|
+
# @option opts [Float] :min_price
|
|
758
|
+
# @option opts [Float] :max_price
|
|
759
|
+
# @option opts [Float] :min_size
|
|
760
|
+
# @option opts [Float] :max_size
|
|
761
|
+
# @option opts [Integer] :min_rooms
|
|
762
|
+
# @option opts [Integer] :max_rooms
|
|
763
|
+
# @option opts [String] :locale Response language (en, es, it, pt)
|
|
764
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
765
|
+
def idealista_search_listings_with_http_info(location, opts = {})
|
|
766
|
+
if @api_client.config.debugging
|
|
767
|
+
@api_client.config.logger.debug 'Calling API: IdealistaApi.idealista_search_listings ...'
|
|
768
|
+
end
|
|
769
|
+
# verify the required parameter 'location' is set
|
|
770
|
+
if @api_client.config.client_side_validation && location.nil?
|
|
771
|
+
fail ArgumentError, "Missing the required parameter 'location' when calling IdealistaApi.idealista_search_listings"
|
|
772
|
+
end
|
|
773
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
774
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling IdealistaApi.idealista_search_listings, must be greater than or equal to 1.'
|
|
775
|
+
end
|
|
776
|
+
|
|
777
|
+
if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] > 50
|
|
778
|
+
fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling IdealistaApi.idealista_search_listings, must be smaller than or equal to 50.'
|
|
779
|
+
end
|
|
780
|
+
|
|
781
|
+
if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1
|
|
782
|
+
fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling IdealistaApi.idealista_search_listings, must be greater than or equal to 1.'
|
|
783
|
+
end
|
|
784
|
+
|
|
785
|
+
if @api_client.config.client_side_validation && !opts[:'min_price'].nil? && opts[:'min_price'] < 0
|
|
786
|
+
fail ArgumentError, 'invalid value for "opts[:"min_price"]" when calling IdealistaApi.idealista_search_listings, must be greater than or equal to 0.'
|
|
787
|
+
end
|
|
788
|
+
|
|
789
|
+
if @api_client.config.client_side_validation && !opts[:'max_price'].nil? && opts[:'max_price'] < 0
|
|
790
|
+
fail ArgumentError, 'invalid value for "opts[:"max_price"]" when calling IdealistaApi.idealista_search_listings, must be greater than or equal to 0.'
|
|
791
|
+
end
|
|
792
|
+
|
|
793
|
+
if @api_client.config.client_side_validation && !opts[:'min_size'].nil? && opts[:'min_size'] < 0
|
|
794
|
+
fail ArgumentError, 'invalid value for "opts[:"min_size"]" when calling IdealistaApi.idealista_search_listings, must be greater than or equal to 0.'
|
|
795
|
+
end
|
|
796
|
+
|
|
797
|
+
if @api_client.config.client_side_validation && !opts[:'max_size'].nil? && opts[:'max_size'] < 0
|
|
798
|
+
fail ArgumentError, 'invalid value for "opts[:"max_size"]" when calling IdealistaApi.idealista_search_listings, must be greater than or equal to 0.'
|
|
799
|
+
end
|
|
800
|
+
|
|
801
|
+
if @api_client.config.client_side_validation && !opts[:'min_rooms'].nil? && opts[:'min_rooms'] < 0
|
|
802
|
+
fail ArgumentError, 'invalid value for "opts[:"min_rooms"]" when calling IdealistaApi.idealista_search_listings, must be greater than or equal to 0.'
|
|
803
|
+
end
|
|
804
|
+
|
|
805
|
+
if @api_client.config.client_side_validation && !opts[:'max_rooms'].nil? && opts[:'max_rooms'] < 0
|
|
806
|
+
fail ArgumentError, 'invalid value for "opts[:"max_rooms"]" when calling IdealistaApi.idealista_search_listings, must be greater than or equal to 0.'
|
|
807
|
+
end
|
|
808
|
+
|
|
809
|
+
# resource path
|
|
810
|
+
local_var_path = '/v1/idealista/search'
|
|
811
|
+
|
|
812
|
+
# query parameters
|
|
813
|
+
query_params = opts[:query_params] || {}
|
|
814
|
+
query_params[:'location'] = location
|
|
815
|
+
query_params[:'operation'] = opts[:'operation'] if !opts[:'operation'].nil?
|
|
816
|
+
query_params[:'property_type'] = opts[:'property_type'] if !opts[:'property_type'].nil?
|
|
817
|
+
query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
|
|
818
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
819
|
+
query_params[:'max_items'] = opts[:'max_items'] if !opts[:'max_items'].nil?
|
|
820
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
821
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
822
|
+
query_params[:'min_price'] = opts[:'min_price'] if !opts[:'min_price'].nil?
|
|
823
|
+
query_params[:'max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
|
|
824
|
+
query_params[:'min_size'] = opts[:'min_size'] if !opts[:'min_size'].nil?
|
|
825
|
+
query_params[:'max_size'] = opts[:'max_size'] if !opts[:'max_size'].nil?
|
|
826
|
+
query_params[:'min_rooms'] = opts[:'min_rooms'] if !opts[:'min_rooms'].nil?
|
|
827
|
+
query_params[:'max_rooms'] = opts[:'max_rooms'] if !opts[:'max_rooms'].nil?
|
|
828
|
+
query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
|
|
829
|
+
|
|
830
|
+
# header parameters
|
|
831
|
+
header_params = opts[:header_params] || {}
|
|
832
|
+
# HTTP header 'Accept' (if needed)
|
|
833
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
834
|
+
|
|
835
|
+
# form parameters
|
|
836
|
+
form_params = opts[:form_params] || {}
|
|
837
|
+
|
|
838
|
+
# http body (model)
|
|
839
|
+
post_body = opts[:debug_body]
|
|
840
|
+
|
|
841
|
+
# return_type
|
|
842
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
843
|
+
|
|
844
|
+
# auth_names
|
|
845
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
846
|
+
|
|
847
|
+
new_options = opts.merge(
|
|
848
|
+
:operation => :"IdealistaApi.idealista_search_listings",
|
|
849
|
+
:header_params => header_params,
|
|
850
|
+
:query_params => query_params,
|
|
851
|
+
:form_params => form_params,
|
|
852
|
+
:body => post_body,
|
|
853
|
+
:auth_names => auth_names,
|
|
854
|
+
:return_type => return_type
|
|
855
|
+
)
|
|
856
|
+
|
|
857
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
858
|
+
if @api_client.config.debugging
|
|
859
|
+
@api_client.config.logger.debug "API called: IdealistaApi#idealista_search_listings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
860
|
+
end
|
|
861
|
+
return data, status_code, headers
|
|
862
|
+
end
|
|
863
|
+
end
|
|
864
|
+
end
|