Class: WalmartSearch
- Inherits:
-
SerpApiSearch
- Object
- SerpApiSearch
- WalmartSearch
- Defined in:
- lib/search/walmart_search.rb
Overview
Walmart Search Result for Ruby powered by SerpApi
Search API Usage
“‘ruby parameter =
query: "search keywords",
api_key: "Serp API Key"
search = WalmartSearch.new(parameter)
html_results = search.get_html hash_results = search.get_hash json_results = search.get_json
“‘ doc: serpapi.com/youtube-search-api
Constant Summary
Constants inherited from SerpApiSearch
SerpApiSearch::BACKEND, SerpApiSearch::VERSION
Instance Attribute Summary
Attributes inherited from SerpApiSearch
Instance Method Summary collapse
- #get_location ⇒ Object
-
#initialize(params = {}) ⇒ WalmartSearch
constructor
A new instance of WalmartSearch.
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 = {}) ⇒ WalmartSearch
Returns a new instance of WalmartSearch.
24 25 26 27 |
# File 'lib/search/walmart_search.rb', line 24 def initialize(params = {}) super(params, WALMART_ENGINE) check_params([:query, :engine]) end |
Instance Method Details
#get_location ⇒ Object
29 30 31 |
# File 'lib/search/walmart_search.rb', line 29 def get_location raise SerpApiException.new('location is not supported by Walmart') end |