Class: CoinRail::HTTP::Connection

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/coinrail/http.rb

Instance Method Summary collapse

Constructor Details

#initialize(key, secret) ⇒ Connection

Returns a new instance of Connection.



16
17
18
19
20
21
22
23
# File 'lib/coinrail/http.rb', line 16

def initialize(key, secret)
  @connection = Faraday::Connection.new(:url => 'https://api.coinrail.co.kr') do |f|
    f.request :json
    f.response :json
    f.use Authentication, key, secret
    f.adapter Faraday.default_adapter
  end
end