Class: YandexSearchResults
- Inherits:
-
SerpApiClient
- Object
- SerpApiClient
- YandexSearchResults
- Defined in:
- lib/yandex_search_results.rb
Overview
Yandex Search Result for Ruby powered by SerpApi
Search API Usage
“‘ruby parameter =
text: "query",
api_key: "Your SERP API Key"
client = YandexSearchResults.new(parameter) client.params = “yandex.com”
html_results = client.get_html hash_results = client.get_hash json_results = client.get_json
“‘
Constant Summary
Constants inherited from SerpApiClient
SerpApiClient::BACKEND, SerpApiClient::VERSION
Instance Attribute Summary
Attributes inherited from SerpApiClient
Instance Method Summary collapse
- #get_location ⇒ Object
-
#initialize(params = {}) ⇒ YandexSearchResults
constructor
A new instance of YandexSearchResults.
Methods inherited from SerpApiClient
#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 = {}) ⇒ YandexSearchResults
Returns a new instance of YandexSearchResults.
26 27 28 29 |
# File 'lib/yandex_search_results.rb', line 26 def initialize(params = {}) super(params, YANDEX_ENGINE) check_params([:text, :engine]) end |
Instance Method Details
#get_location ⇒ Object
31 32 33 |
# File 'lib/yandex_search_results.rb', line 31 def get_location raise 'location is not supported by ' + YAHOO_ENGINE end |