Module: DPLibrary::Connection
- Included in:
- Request
- Defined in:
- lib/DPLibrary/connection.rb
Instance Method Summary collapse
Instance Method Details
#connection ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/DPLibrary/connection.rb', line 6 def connection @connection = begin Faraday.new(:url => DPLibrary::Configuration::BASE_URL, :params => { :api_key => DPLibrary.api_key } ) do |c| c.request :url_encoded c.request :json c.response :json c.adapter Faraday.default_adapter end end end |