Module: YandexLocator::API

Included in:
Client
Defined in:
lib/yandex_locator/api.rb

Instance Method Summary collapse

Instance Method Details

#callObject



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

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

#connection(url:) ⇒ Object



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

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

#post(url, options = {}) ⇒ Object



5
6
7
# File 'lib/yandex_locator/api.rb', line 5

def post(url, options = {})
  request :post, url, options
end