Class: YahooSearchResults
- Inherits:
-
SerpApiClient
- Object
- SerpApiClient
- YahooSearchResults
- Defined in:
- lib/yahoo_search_results.rb
Overview
Yahoo Search Result for Ruby powered by SerpApi
Search API Usage
“‘ruby parameter =
p: "query",
api_key: "Your SERP API Key"
search = YahooSearchResults.new(parameter) search.params = “fr”
html_results = search.get_html hash_results = search.get_hash json_results = search.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 = {}) ⇒ YahooSearchResults
constructor
A new instance of YahooSearchResults.
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 = {}) ⇒ YahooSearchResults
Returns a new instance of YahooSearchResults.
26 27 28 29 |
# File 'lib/yahoo_search_results.rb', line 26 def initialize(params = {}) super(params, YAHOO_ENGINE) check_params([:p, :engine]) end |
Instance Method Details
#get_location ⇒ Object
31 32 33 |
# File 'lib/yahoo_search_results.rb', line 31 def get_location raise 'location is not supported by ' + YAHOO_ENGINE end |