Method: NexosisApi::Client#initialize
- Defined in:
- lib/nexosis_api/client.rb
permalink #initialize(options = {}) ⇒ Client
Returns a new instance of Client.
32 33 34 35 36 37 38 |
# File 'lib/nexosis_api/client.rb', line 32 def initialize( = {}) raise ArgumentError, 'api_key was not defined' unless [:api_key].nil? == false @api_key = [:api_key] self.class.base_uri [:base_uri] unless [:base_uri].nil? @headers = {"api-key" => @api_key, "content-type" => "application/json"} @options = {:headers => @headers, :format => :json} end |