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,422 @@
|
|
|
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 YandexApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Image search
|
|
23
|
+
# Search Yandex Images by text — thumbnail, full-res URL, dimensions, source page.
|
|
24
|
+
# @param query [String] Image search query, e.g. 'coffee machine'
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :domain Yandex market: 'tr' (yandex.com.tr, DEFAULT — the domain that reliably clears anti-bot), 'com', 'ru', 'by', 'kz', 'uz'. 'com'/'ru' have a lower success rate. (default to 'tr')
|
|
27
|
+
# @option opts [Integer] :page (default to 1)
|
|
28
|
+
# @return [Object]
|
|
29
|
+
def yandex_image_search(query, opts = {})
|
|
30
|
+
data, _status_code, _headers = yandex_image_search_with_http_info(query, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Image search
|
|
35
|
+
# Search Yandex Images by text — thumbnail, full-res URL, dimensions, source page.
|
|
36
|
+
# @param query [String] Image search query, e.g. 'coffee machine'
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @option opts [String] :domain Yandex market: 'tr' (yandex.com.tr, DEFAULT — the domain that reliably clears anti-bot), 'com', 'ru', 'by', 'kz', 'uz'. 'com'/'ru' have a lower success rate. (default to 'tr')
|
|
39
|
+
# @option opts [Integer] :page (default to 1)
|
|
40
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
41
|
+
def yandex_image_search_with_http_info(query, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: YandexApi.yandex_image_search ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'query' is set
|
|
46
|
+
if @api_client.config.client_side_validation && query.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling YandexApi.yandex_image_search"
|
|
48
|
+
end
|
|
49
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 25
|
|
50
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling YandexApi.yandex_image_search, must be smaller than or equal to 25.'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
54
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling YandexApi.yandex_image_search, must be greater than or equal to 1.'
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# resource path
|
|
58
|
+
local_var_path = '/v1/yandex/images/search'
|
|
59
|
+
|
|
60
|
+
# query parameters
|
|
61
|
+
query_params = opts[:query_params] || {}
|
|
62
|
+
query_params[:'query'] = query
|
|
63
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
64
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
65
|
+
|
|
66
|
+
# header parameters
|
|
67
|
+
header_params = opts[:header_params] || {}
|
|
68
|
+
# HTTP header 'Accept' (if needed)
|
|
69
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
70
|
+
|
|
71
|
+
# form parameters
|
|
72
|
+
form_params = opts[:form_params] || {}
|
|
73
|
+
|
|
74
|
+
# http body (model)
|
|
75
|
+
post_body = opts[:debug_body]
|
|
76
|
+
|
|
77
|
+
# return_type
|
|
78
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
79
|
+
|
|
80
|
+
# auth_names
|
|
81
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
82
|
+
|
|
83
|
+
new_options = opts.merge(
|
|
84
|
+
:operation => :"YandexApi.yandex_image_search",
|
|
85
|
+
:header_params => header_params,
|
|
86
|
+
:query_params => query_params,
|
|
87
|
+
:form_params => form_params,
|
|
88
|
+
:body => post_body,
|
|
89
|
+
:auth_names => auth_names,
|
|
90
|
+
:return_type => return_type
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
94
|
+
if @api_client.config.debugging
|
|
95
|
+
@api_client.config.logger.debug "API called: YandexApi#yandex_image_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
96
|
+
end
|
|
97
|
+
return data, status_code, headers
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# List supported markets
|
|
101
|
+
# Supported Yandex markets (domains, default region and language).
|
|
102
|
+
# @param [Hash] opts the optional parameters
|
|
103
|
+
# @return [Object]
|
|
104
|
+
def yandex_list_supported_markets(opts = {})
|
|
105
|
+
data, _status_code, _headers = yandex_list_supported_markets_with_http_info(opts)
|
|
106
|
+
data
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# List supported markets
|
|
110
|
+
# Supported Yandex markets (domains, default region and language).
|
|
111
|
+
# @param [Hash] opts the optional parameters
|
|
112
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
113
|
+
def yandex_list_supported_markets_with_http_info(opts = {})
|
|
114
|
+
if @api_client.config.debugging
|
|
115
|
+
@api_client.config.logger.debug 'Calling API: YandexApi.yandex_list_supported_markets ...'
|
|
116
|
+
end
|
|
117
|
+
# resource path
|
|
118
|
+
local_var_path = '/v1/yandex/markets'
|
|
119
|
+
|
|
120
|
+
# query parameters
|
|
121
|
+
query_params = opts[:query_params] || {}
|
|
122
|
+
|
|
123
|
+
# header parameters
|
|
124
|
+
header_params = opts[:header_params] || {}
|
|
125
|
+
# HTTP header 'Accept' (if needed)
|
|
126
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
127
|
+
|
|
128
|
+
# form parameters
|
|
129
|
+
form_params = opts[:form_params] || {}
|
|
130
|
+
|
|
131
|
+
# http body (model)
|
|
132
|
+
post_body = opts[:debug_body]
|
|
133
|
+
|
|
134
|
+
# return_type
|
|
135
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
136
|
+
|
|
137
|
+
# auth_names
|
|
138
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
139
|
+
|
|
140
|
+
new_options = opts.merge(
|
|
141
|
+
:operation => :"YandexApi.yandex_list_supported_markets",
|
|
142
|
+
:header_params => header_params,
|
|
143
|
+
:query_params => query_params,
|
|
144
|
+
:form_params => form_params,
|
|
145
|
+
:body => post_body,
|
|
146
|
+
:auth_names => auth_names,
|
|
147
|
+
:return_type => return_type
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
151
|
+
if @api_client.config.debugging
|
|
152
|
+
@api_client.config.logger.debug "API called: YandexApi#yandex_list_supported_markets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
153
|
+
end
|
|
154
|
+
return data, status_code, headers
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Reverse image search
|
|
158
|
+
# Reverse image search by URL — hosting pages, similar images, tags, other sizes.
|
|
159
|
+
# @param image_url [String] Public URL of the image to reverse-search
|
|
160
|
+
# @param [Hash] opts the optional parameters
|
|
161
|
+
# @option opts [String] :domain Yandex market: 'tr' (yandex.com.tr, DEFAULT — the domain that reliably clears anti-bot), 'com', 'ru', 'by', 'kz', 'uz'. 'com'/'ru' have a lower success rate. (default to 'tr')
|
|
162
|
+
# @return [Object]
|
|
163
|
+
def yandex_reverse_image_search(image_url, opts = {})
|
|
164
|
+
data, _status_code, _headers = yandex_reverse_image_search_with_http_info(image_url, opts)
|
|
165
|
+
data
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Reverse image search
|
|
169
|
+
# Reverse image search by URL — hosting pages, similar images, tags, other sizes.
|
|
170
|
+
# @param image_url [String] Public URL of the image to reverse-search
|
|
171
|
+
# @param [Hash] opts the optional parameters
|
|
172
|
+
# @option opts [String] :domain Yandex market: 'tr' (yandex.com.tr, DEFAULT — the domain that reliably clears anti-bot), 'com', 'ru', 'by', 'kz', 'uz'. 'com'/'ru' have a lower success rate. (default to 'tr')
|
|
173
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
174
|
+
def yandex_reverse_image_search_with_http_info(image_url, opts = {})
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug 'Calling API: YandexApi.yandex_reverse_image_search ...'
|
|
177
|
+
end
|
|
178
|
+
# verify the required parameter 'image_url' is set
|
|
179
|
+
if @api_client.config.client_side_validation && image_url.nil?
|
|
180
|
+
fail ArgumentError, "Missing the required parameter 'image_url' when calling YandexApi.yandex_reverse_image_search"
|
|
181
|
+
end
|
|
182
|
+
# resource path
|
|
183
|
+
local_var_path = '/v1/yandex/images/reverse'
|
|
184
|
+
|
|
185
|
+
# query parameters
|
|
186
|
+
query_params = opts[:query_params] || {}
|
|
187
|
+
query_params[:'image_url'] = image_url
|
|
188
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
189
|
+
|
|
190
|
+
# header parameters
|
|
191
|
+
header_params = opts[:header_params] || {}
|
|
192
|
+
# HTTP header 'Accept' (if needed)
|
|
193
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
194
|
+
|
|
195
|
+
# form parameters
|
|
196
|
+
form_params = opts[:form_params] || {}
|
|
197
|
+
|
|
198
|
+
# http body (model)
|
|
199
|
+
post_body = opts[:debug_body]
|
|
200
|
+
|
|
201
|
+
# return_type
|
|
202
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
203
|
+
|
|
204
|
+
# auth_names
|
|
205
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
206
|
+
|
|
207
|
+
new_options = opts.merge(
|
|
208
|
+
:operation => :"YandexApi.yandex_reverse_image_search",
|
|
209
|
+
:header_params => header_params,
|
|
210
|
+
:query_params => query_params,
|
|
211
|
+
:form_params => form_params,
|
|
212
|
+
:body => post_body,
|
|
213
|
+
:auth_names => auth_names,
|
|
214
|
+
:return_type => return_type
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
218
|
+
if @api_client.config.debugging
|
|
219
|
+
@api_client.config.logger.debug "API called: YandexApi#yandex_reverse_image_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
220
|
+
end
|
|
221
|
+
return data, status_code, headers
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Web search
|
|
225
|
+
# Search Yandex web results — organic results, ads, displayed URLs, snippets.
|
|
226
|
+
# @param query [String] Search query, e.g. 'coffee machine'
|
|
227
|
+
# @param [Hash] opts the optional parameters
|
|
228
|
+
# @option opts [String] :domain Yandex market: 'tr' (yandex.com.tr, DEFAULT — the domain that reliably clears anti-bot), 'com', 'ru', 'by', 'kz', 'uz'. 'com'/'ru' have a lower success rate. (default to 'tr')
|
|
229
|
+
# @option opts [Integer] :page (default to 1)
|
|
230
|
+
# @option opts [Integer] :lr Yandex region id, e.g. 213=Moscow, 84=USA
|
|
231
|
+
# @option opts [String] :lang UI language: ru, en, tr, be, kk, uk
|
|
232
|
+
# @return [Object]
|
|
233
|
+
def yandex_web_search(query, opts = {})
|
|
234
|
+
data, _status_code, _headers = yandex_web_search_with_http_info(query, opts)
|
|
235
|
+
data
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Web search
|
|
239
|
+
# Search Yandex web results — organic results, ads, displayed URLs, snippets.
|
|
240
|
+
# @param query [String] Search query, e.g. 'coffee machine'
|
|
241
|
+
# @param [Hash] opts the optional parameters
|
|
242
|
+
# @option opts [String] :domain Yandex market: 'tr' (yandex.com.tr, DEFAULT — the domain that reliably clears anti-bot), 'com', 'ru', 'by', 'kz', 'uz'. 'com'/'ru' have a lower success rate. (default to 'tr')
|
|
243
|
+
# @option opts [Integer] :page (default to 1)
|
|
244
|
+
# @option opts [Integer] :lr Yandex region id, e.g. 213=Moscow, 84=USA
|
|
245
|
+
# @option opts [String] :lang UI language: ru, en, tr, be, kk, uk
|
|
246
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
247
|
+
def yandex_web_search_with_http_info(query, opts = {})
|
|
248
|
+
if @api_client.config.debugging
|
|
249
|
+
@api_client.config.logger.debug 'Calling API: YandexApi.yandex_web_search ...'
|
|
250
|
+
end
|
|
251
|
+
# verify the required parameter 'query' is set
|
|
252
|
+
if @api_client.config.client_side_validation && query.nil?
|
|
253
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling YandexApi.yandex_web_search"
|
|
254
|
+
end
|
|
255
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 25
|
|
256
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling YandexApi.yandex_web_search, must be smaller than or equal to 25.'
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
260
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling YandexApi.yandex_web_search, must be greater than or equal to 1.'
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# resource path
|
|
264
|
+
local_var_path = '/v1/yandex/search'
|
|
265
|
+
|
|
266
|
+
# query parameters
|
|
267
|
+
query_params = opts[:query_params] || {}
|
|
268
|
+
query_params[:'query'] = query
|
|
269
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
270
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
271
|
+
query_params[:'lr'] = opts[:'lr'] if !opts[:'lr'].nil?
|
|
272
|
+
query_params[:'lang'] = opts[:'lang'] if !opts[:'lang'].nil?
|
|
273
|
+
|
|
274
|
+
# header parameters
|
|
275
|
+
header_params = opts[:header_params] || {}
|
|
276
|
+
# HTTP header 'Accept' (if needed)
|
|
277
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
278
|
+
|
|
279
|
+
# form parameters
|
|
280
|
+
form_params = opts[:form_params] || {}
|
|
281
|
+
|
|
282
|
+
# http body (model)
|
|
283
|
+
post_body = opts[:debug_body]
|
|
284
|
+
|
|
285
|
+
# return_type
|
|
286
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
287
|
+
|
|
288
|
+
# auth_names
|
|
289
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
290
|
+
|
|
291
|
+
new_options = opts.merge(
|
|
292
|
+
:operation => :"YandexApi.yandex_web_search",
|
|
293
|
+
:header_params => header_params,
|
|
294
|
+
:query_params => query_params,
|
|
295
|
+
:form_params => form_params,
|
|
296
|
+
:body => post_body,
|
|
297
|
+
:auth_names => auth_names,
|
|
298
|
+
:return_type => return_type
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
302
|
+
if @api_client.config.debugging
|
|
303
|
+
@api_client.config.logger.debug "API called: YandexApi#yandex_web_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
304
|
+
end
|
|
305
|
+
return data, status_code, headers
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Yandex scraper health check
|
|
309
|
+
# Check health of the Yandex scraper service (accepts HEAD for UptimeRobot).
|
|
310
|
+
# @param [Hash] opts the optional parameters
|
|
311
|
+
# @return [Object]
|
|
312
|
+
def yandex_yandex_scraper_health_check(opts = {})
|
|
313
|
+
data, _status_code, _headers = yandex_yandex_scraper_health_check_with_http_info(opts)
|
|
314
|
+
data
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# Yandex scraper health check
|
|
318
|
+
# Check health of the Yandex scraper service (accepts HEAD for UptimeRobot).
|
|
319
|
+
# @param [Hash] opts the optional parameters
|
|
320
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
321
|
+
def yandex_yandex_scraper_health_check_with_http_info(opts = {})
|
|
322
|
+
if @api_client.config.debugging
|
|
323
|
+
@api_client.config.logger.debug 'Calling API: YandexApi.yandex_yandex_scraper_health_check ...'
|
|
324
|
+
end
|
|
325
|
+
# resource path
|
|
326
|
+
local_var_path = '/v1/yandex/health'
|
|
327
|
+
|
|
328
|
+
# query parameters
|
|
329
|
+
query_params = opts[:query_params] || {}
|
|
330
|
+
|
|
331
|
+
# header parameters
|
|
332
|
+
header_params = opts[:header_params] || {}
|
|
333
|
+
# HTTP header 'Accept' (if needed)
|
|
334
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
335
|
+
|
|
336
|
+
# form parameters
|
|
337
|
+
form_params = opts[:form_params] || {}
|
|
338
|
+
|
|
339
|
+
# http body (model)
|
|
340
|
+
post_body = opts[:debug_body]
|
|
341
|
+
|
|
342
|
+
# return_type
|
|
343
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
344
|
+
|
|
345
|
+
# auth_names
|
|
346
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
347
|
+
|
|
348
|
+
new_options = opts.merge(
|
|
349
|
+
:operation => :"YandexApi.yandex_yandex_scraper_health_check",
|
|
350
|
+
:header_params => header_params,
|
|
351
|
+
:query_params => query_params,
|
|
352
|
+
:form_params => form_params,
|
|
353
|
+
:body => post_body,
|
|
354
|
+
:auth_names => auth_names,
|
|
355
|
+
:return_type => return_type
|
|
356
|
+
)
|
|
357
|
+
|
|
358
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
359
|
+
if @api_client.config.debugging
|
|
360
|
+
@api_client.config.logger.debug "API called: YandexApi#yandex_yandex_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
361
|
+
end
|
|
362
|
+
return data, status_code, headers
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Yandex scraper health check
|
|
366
|
+
# Check health of the Yandex scraper service (accepts HEAD for UptimeRobot).
|
|
367
|
+
# @param [Hash] opts the optional parameters
|
|
368
|
+
# @return [Object]
|
|
369
|
+
def yandex_yandex_scraper_health_check_head(opts = {})
|
|
370
|
+
data, _status_code, _headers = yandex_yandex_scraper_health_check_head_with_http_info(opts)
|
|
371
|
+
data
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
# Yandex scraper health check
|
|
375
|
+
# Check health of the Yandex scraper service (accepts HEAD for UptimeRobot).
|
|
376
|
+
# @param [Hash] opts the optional parameters
|
|
377
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
378
|
+
def yandex_yandex_scraper_health_check_head_with_http_info(opts = {})
|
|
379
|
+
if @api_client.config.debugging
|
|
380
|
+
@api_client.config.logger.debug 'Calling API: YandexApi.yandex_yandex_scraper_health_check_head ...'
|
|
381
|
+
end
|
|
382
|
+
# resource path
|
|
383
|
+
local_var_path = '/v1/yandex/health'
|
|
384
|
+
|
|
385
|
+
# query parameters
|
|
386
|
+
query_params = opts[:query_params] || {}
|
|
387
|
+
|
|
388
|
+
# header parameters
|
|
389
|
+
header_params = opts[:header_params] || {}
|
|
390
|
+
# HTTP header 'Accept' (if needed)
|
|
391
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
392
|
+
|
|
393
|
+
# form parameters
|
|
394
|
+
form_params = opts[:form_params] || {}
|
|
395
|
+
|
|
396
|
+
# http body (model)
|
|
397
|
+
post_body = opts[:debug_body]
|
|
398
|
+
|
|
399
|
+
# return_type
|
|
400
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
401
|
+
|
|
402
|
+
# auth_names
|
|
403
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
404
|
+
|
|
405
|
+
new_options = opts.merge(
|
|
406
|
+
:operation => :"YandexApi.yandex_yandex_scraper_health_check_head",
|
|
407
|
+
:header_params => header_params,
|
|
408
|
+
:query_params => query_params,
|
|
409
|
+
:form_params => form_params,
|
|
410
|
+
:body => post_body,
|
|
411
|
+
:auth_names => auth_names,
|
|
412
|
+
:return_type => return_type
|
|
413
|
+
)
|
|
414
|
+
|
|
415
|
+
data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
|
|
416
|
+
if @api_client.config.debugging
|
|
417
|
+
@api_client.config.logger.debug "API called: YandexApi#yandex_yandex_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
418
|
+
end
|
|
419
|
+
return data, status_code, headers
|
|
420
|
+
end
|
|
421
|
+
end
|
|
422
|
+
end
|