Class: YandexSearch

Inherits:
SerpApiSearch show all
Defined in:
lib/search/yandex_search.rb

Overview

Yandex Search Result for Ruby powered by SerpApi

Search API Usage

“‘ruby parameter =

text: "query",
api_key: "Your SERP API Key"

search = YandexSearch.new(parameter) search.params = “yandex.com”

html_results = search.get_html hash_results = search.get_hash json_results = search.get_json

“‘

doc: serpapi.com/yandex-search-api

Constant Summary

Constants inherited from SerpApiSearch

SerpApiSearch::BACKEND, SerpApiSearch::VERSION

Instance Attribute Summary

Attributes inherited from SerpApiSearch

#params

Instance Method Summary collapse

Methods inherited from SerpApiSearch

#api_key, api_key=, #construct_url, #engine, #get_account, #get_hash, #get_hash_with_images, #get_html, #get_json, #get_json_with_images, #get_search_archive, serp_api_key=

Constructor Details

#initialize(params = {}) ⇒ YandexSearch

Returns a new instance of YandexSearch.



26
27
28
29
# File 'lib/search/yandex_search.rb', line 26

def initialize(params = {})
  super(params, YANDEX_ENGINE)
  check_params([:text, :engine])
end

Instance Method Details

#get_locationObject

Raises:



31
32
33
# File 'lib/search/yandex_search.rb', line 31

def get_location
  raise SerpApiException.new('location is not supported by ' + YAHOO_ENGINE)
end