Class: EbaySearch

Inherits:
SerpApiSearch show all
Defined in:
lib/search/ebay_search.rb

Overview

Ebay Search Result for Ruby powered by SerpApi

Search API Usage

“‘ruby parameter =

_nkw: "query",
api_key: "Your SERP API Key"

search = EbaySearch.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 SerpApiSearch

SerpApiSearch::BACKEND, SerpApiSearch::VERSION

Instance Attribute Summary

Attributes inherited from SerpApiSearch

#params

Instance Method Summary collapse

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 = {}) ⇒ EbaySearch

Returns a new instance of EbaySearch.



26
27
28
29
# File 'lib/search/ebay_search.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/search/ebay_search.rb', line 31

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