Class: ScrapeBadger::YahooApi
- Inherits:
-
Object
- Object
- ScrapeBadger::YahooApi
- Defined in:
- lib/scrapebadger/api/yahoo_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ YahooApi
constructor
A new instance of YahooApi.
-
#yahoo_image_search(query, opts = {}) ⇒ Object
Image search Yahoo Images — thumbnail, full-size and source URL per result.
-
#yahoo_image_search_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Image search Yahoo Images — thumbnail, full-size and source URL per result.
-
#yahoo_list_supported_markets(opts = {}) ⇒ Object
List supported markets Supported Yahoo market codes.
-
#yahoo_list_supported_markets_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
List supported markets Supported Yahoo market codes.
-
#yahoo_news_search(query, opts = {}) ⇒ Object
News search Yahoo News — headline, source, published time and snippet per article.
-
#yahoo_news_search_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
News search Yahoo News — headline, source, published time and snippet per article.
-
#yahoo_search_suggestions(query, opts = {}) ⇒ Object
Search suggestions Yahoo search-box query suggestions.
-
#yahoo_search_suggestions_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search suggestions Yahoo search-box query suggestions.
-
#yahoo_video_search(query, opts = {}) ⇒ Object
Video search Yahoo Videos — title, thumbnail, duration, publisher and source per result.
-
#yahoo_video_search_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Video search Yahoo Videos — title, thumbnail, duration, publisher and source per result.
-
#yahoo_web_search(query, opts = {}) ⇒ Object
Web search Yahoo web SERP — organic results, ads, related searches and total count.
-
#yahoo_web_search_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Web search Yahoo web SERP — organic results, ads, related searches and total count.
-
#yahoo_yahoo_scraper_health_check(opts = {}) ⇒ Object
Yahoo scraper health check Check health of the Yahoo scraper service (accepts HEAD for UptimeRobot).
-
#yahoo_yahoo_scraper_health_check_head(opts = {}) ⇒ Object
Yahoo scraper health check Check health of the Yahoo scraper service (accepts HEAD for UptimeRobot).
-
#yahoo_yahoo_scraper_health_check_head_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Yahoo scraper health check Check health of the Yahoo scraper service (accepts HEAD for UptimeRobot).
-
#yahoo_yahoo_scraper_health_check_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Yahoo scraper health check Check health of the Yahoo scraper service (accepts HEAD for UptimeRobot).
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#yahoo_image_search(query, opts = {}) ⇒ Object
Image search Yahoo Images — thumbnail, full-size and source URL per result.
29 30 31 32 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 29 def yahoo_image_search(query, opts = {}) data, _status_code, _headers = yahoo_image_search_with_http_info(query, opts) data end |
#yahoo_image_search_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Image search Yahoo Images — thumbnail, full-size and source URL per result.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 41 def yahoo_image_search_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: YahooApi.yahoo_image_search ...' end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling YahooApi.yahoo_image_search" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 100 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling YahooApi.yahoo_image_search, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling YahooApi.yahoo_image_search, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/yahoo/images' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = query query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"YahooApi.yahoo_image_search", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: YahooApi#yahoo_image_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#yahoo_list_supported_markets(opts = {}) ⇒ Object
List supported markets Supported Yahoo market codes. Free — costs no credits.
104 105 106 107 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 104 def yahoo_list_supported_markets(opts = {}) data, _status_code, _headers = yahoo_list_supported_markets_with_http_info(opts) data end |
#yahoo_list_supported_markets_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
List supported markets Supported Yahoo market codes. Free — costs no credits.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 113 def yahoo_list_supported_markets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: YahooApi.yahoo_list_supported_markets ...' end # resource path local_var_path = '/v1/yahoo/markets' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"YahooApi.yahoo_list_supported_markets", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: YahooApi#yahoo_list_supported_markets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#yahoo_news_search(query, opts = {}) ⇒ Object
News search Yahoo News — headline, source, published time and snippet per article.
163 164 165 166 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 163 def yahoo_news_search(query, opts = {}) data, _status_code, _headers = yahoo_news_search_with_http_info(query, opts) data end |
#yahoo_news_search_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
News search Yahoo News — headline, source, published time and snippet per article.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 174 def yahoo_news_search_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: YahooApi.yahoo_news_search ...' end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling YahooApi.yahoo_news_search" end # resource path local_var_path = '/v1/yahoo/news' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = query query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"YahooApi.yahoo_news_search", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: YahooApi#yahoo_news_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#yahoo_search_suggestions(query, opts = {}) ⇒ Object
Search suggestions Yahoo search-box query suggestions.
230 231 232 233 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 230 def yahoo_search_suggestions(query, opts = {}) data, _status_code, _headers = yahoo_search_suggestions_with_http_info(query, opts) data end |
#yahoo_search_suggestions_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search suggestions Yahoo search-box query suggestions.
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 241 def yahoo_search_suggestions_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: YahooApi.yahoo_search_suggestions ...' end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling YahooApi.yahoo_search_suggestions" end # resource path local_var_path = '/v1/yahoo/autocomplete' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = query query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"YahooApi.yahoo_search_suggestions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: YahooApi#yahoo_search_suggestions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#yahoo_video_search(query, opts = {}) ⇒ Object
Video search Yahoo Videos — title, thumbnail, duration, publisher and source per result.
298 299 300 301 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 298 def yahoo_video_search(query, opts = {}) data, _status_code, _headers = yahoo_video_search_with_http_info(query, opts) data end |
#yahoo_video_search_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Video search Yahoo Videos — title, thumbnail, duration, publisher and source per result.
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 310 def yahoo_video_search_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: YahooApi.yahoo_video_search ...' end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling YahooApi.yahoo_video_search" end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 100 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling YahooApi.yahoo_video_search, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling YahooApi.yahoo_video_search, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/yahoo/videos' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = query query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"YahooApi.yahoo_video_search", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: YahooApi#yahoo_video_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#yahoo_web_search(query, opts = {}) ⇒ Object
Web search Yahoo web SERP — organic results, ads, related searches and total count.
377 378 379 380 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 377 def yahoo_web_search(query, opts = {}) data, _status_code, _headers = yahoo_web_search_with_http_info(query, opts) data end |
#yahoo_web_search_with_http_info(query, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Web search Yahoo web SERP — organic results, ads, related searches and total count.
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 390 def yahoo_web_search_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: YahooApi.yahoo_web_search ...' end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling YahooApi.yahoo_web_search" end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling YahooApi.yahoo_web_search, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/yahoo/search' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = query query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'safe_search'] = opts[:'safe_search'] if !opts[:'safe_search'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"YahooApi.yahoo_web_search", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: YahooApi#yahoo_web_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#yahoo_yahoo_scraper_health_check(opts = {}) ⇒ Object
Yahoo scraper health check Check health of the Yahoo scraper service (accepts HEAD for UptimeRobot).
450 451 452 453 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 450 def yahoo_yahoo_scraper_health_check(opts = {}) data, _status_code, _headers = yahoo_yahoo_scraper_health_check_with_http_info(opts) data end |
#yahoo_yahoo_scraper_health_check_head(opts = {}) ⇒ Object
Yahoo scraper health check Check health of the Yahoo scraper service (accepts HEAD for UptimeRobot).
507 508 509 510 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 507 def yahoo_yahoo_scraper_health_check_head(opts = {}) data, _status_code, _headers = yahoo_yahoo_scraper_health_check_head_with_http_info(opts) data end |
#yahoo_yahoo_scraper_health_check_head_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Yahoo scraper health check Check health of the Yahoo scraper service (accepts HEAD for UptimeRobot).
516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 516 def yahoo_yahoo_scraper_health_check_head_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: YahooApi.yahoo_yahoo_scraper_health_check_head ...' end # resource path local_var_path = '/v1/yahoo/health' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"YahooApi.yahoo_yahoo_scraper_health_check_head", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: YahooApi#yahoo_yahoo_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#yahoo_yahoo_scraper_health_check_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Yahoo scraper health check Check health of the Yahoo scraper service (accepts HEAD for UptimeRobot).
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 |
# File 'lib/scrapebadger/api/yahoo_api.rb', line 459 def yahoo_yahoo_scraper_health_check_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: YahooApi.yahoo_yahoo_scraper_health_check ...' end # resource path local_var_path = '/v1/yahoo/health' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"YahooApi.yahoo_yahoo_scraper_health_check", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: YahooApi#yahoo_yahoo_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |