Class: AppleStoreSearch

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

Overview

Apple Store Search Result for Ruby powered by SerpApi

Search API Usage

“‘ruby parameter =

term: "laptop",
api_key: "Your SERP API Key"

search = AppleStoreSearch.new(parameter)

html_results = search.get_html hash_results = search.get_hash json_results = search.get_json

“‘

doc: serpapi.com/bing-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 = {}) ⇒ AppleStoreSearch

Returns a new instance of AppleStoreSearch.



25
26
27
28
# File 'lib/search/apple_store_search.rb', line 25

def initialize(params = {})
  super(params, APPLE_STORE_ENGINE)
  check_params([:term, :engine])
end

Instance Method Details

#get_locationObject

Raises:



30
31
32
# File 'lib/search/apple_store_search.rb', line 30

def get_location
  raise SerpApiException.new('location is not supported by ' + APPLE_STORE_ENGINE)
end