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