Class: Bomberman::Connection

Inherits:
Faraday::Connection
  • Object
show all
Defined in:
lib/bomberman/connection.rb

Instance Method Summary collapse

Constructor Details

#initializeConnection

Returns a new instance of Connection.



5
6
7
8
9
10
# File 'lib/bomberman/connection.rb', line 5

def initialize
  super('https://' + Bomberman.url)
  self.headers['Content-Type'] = 'application/json; charset=utf-8'
  self.headers['Authorization'] = "Token token=#{Bomberman.api_key}"
  self
end