Class: YandexLocator::Client

Inherits:
Object
  • Object
show all
Includes:
API
Defined in:
lib/yandex_locator/client.rb

Instance Method Summary collapse

Methods included from API

#call, #connection, #post

Constructor Details

#initialize(api_key: nil, version: nil) ⇒ Client

Returns a new instance of Client.



7
8
9
10
# File 'lib/yandex_locator/client.rb', line 7

def initialize(api_key: nil, version: nil)
  YandexLocator.configuration.api_key = api_key if api_key
  YandexLocator.configuration.version = version if version
end

Instance Method Details

#lookup(options = {}) ⇒ Object



12
13
14
# File 'lib/yandex_locator/client.rb', line 12

def lookup(options = {})
  post 'geolocation', options
end