Method: JSB#initialize
- Defined in:
- lib/jsb.rb
#initialize(api_key) ⇒ JSB
initialize with api_key.
Arguments:
api_key: (String) is a code generate by application hosted on JSB server.
15 16 17 18 19 20 21 22 |
# File 'lib/jsb.rb', line 15 def initialize(api_key) @api_key = api_key @headers = { :"JSB-Api-Key" => api_key } @statistics = JSB::Statistics.new(self) @apps = JSB::Apps.new(self) @api = RestClient::Resource.new(API_URL, :content_type => "application/json", :headers => @headers) end |