Class: EbaySearchResults

Inherits:
SerpApiClient show all
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

“‘

doc: serpapi.com/ebay-search-api

Constant Summary

Constants inherited from SerpApiClient

SerpApiClient::BACKEND, SerpApiClient::VERSION

Instance Attribute Summary

Attributes inherited from SerpApiClient

#params

Instance Method Summary collapse

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_locationObject



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

def get_location
  raise 'location is not supported by ' + EBAY_ENGINE
end