Module: YandexLocator::API

Defined in:
lib/yandex_locator/api.rb

Class Method Summary collapse

Class Method Details

.callObject



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

def call
  connection(url: YandexLocator.configuration.url_prefix)
end

.connection(url:) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/yandex_locator/api.rb', line 12

def connection(url: )
  Faraday.new(url) do |builder|
    builder.request  :url_encoded
    builder.response :logger
    builder.adapter  Faraday.default_adapter
  end
end