Class: NaverSearch

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

Overview

Naver Search Result for Ruby powered by SerpApi

Search API Usage

“‘ruby parameter =

q: "query",
location: "city,state,country",
api_key: "Your SERP API Key"

search = NaverSearch.new(parameter) search.params = “Portland”

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

Returns a new instance of NaverSearch.



27
28
29
30
# File 'lib/search/naver_search.rb', line 27

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

Instance Method Details

#get_locationObject

Raises:



32
33
34
# File 'lib/search/naver_search.rb', line 32

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