Class: YandexSearch

Inherits:
SearchDataAPISearch show all
Defined in:
lib/searchdata_sdk/yandex_search.rb

Overview

Yandex Search Result powered by SearchData API Check code samples at examples/yandex_demo.ro Docs: app.searchdata.io/documentation/yandex

Constant Summary

Constants inherited from SearchDataAPISearch

SearchDataAPISearch::LOCATIONS_API, SearchDataAPISearch::MAIN_API, SearchDataAPISearch::MAIN_API_PATH

Instance Attribute Summary

Attributes inherited from SearchDataAPISearch

#params

Instance Method Summary collapse

Methods inherited from SearchDataAPISearch

#api_key, api_key=, #check_params, #construct_url, #get_hash, #get_json, #get_results, searchdata_api_key=

Constructor Details

#initialize(params = {}) ⇒ YandexSearch

Returns a new instance of YandexSearch.



9
10
11
12
# File 'lib/searchdata_sdk/yandex_search.rb', line 9

def initialize(params = {})
  super(params, YANDEX_ENGINE)
  check_params(%i[text engine])
end

Instance Method Details

#get_locationObject



14
15
16
# File 'lib/searchdata_sdk/yandex_search.rb', line 14

def get_location
  raise "`location` is not supported by #{YANDEX_ENGINE}"
end