Class: Bitflyer::HTTP::Connection

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

Instance Method Summary collapse

Constructor Details

#initialize(key, secret) ⇒ Connection

Returns a new instance of Connection.



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

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