Module: YandexLocator::API
- Included in:
- Client
- Defined in:
- lib/yandex_locator/api.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
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, = {}) request :post, url, end |