Module: FunTranslations::Connection

Included in:
Request
Defined in:
lib/fun_translations/connection.rb

Overview

This module prepares a connection object

Constant Summary collapse

BASE_URL =
'https://api.funtranslations.com'

Instance Method Summary collapse

Instance Method Details

#connection(client) ⇒ Object

Prepares a new connection object

Parameters:



10
11
12
13
14
15
# File 'lib/fun_translations/connection.rb', line 10

def connection(client)
  Faraday.new(options(client)) do |faraday|
    faraday.adapter Faraday.default_adapter
    faraday.request :url_encoded
  end
end