Class: Zype::ApiClient

Inherits:
Client
  • Object
show all
Defined in:
lib/zype/client/api_client.rb

Constant Summary

Constants inherited from Client

Client::ERROR_TYPES

Instance Attribute Summary

Attributes inherited from Client

#headers

Instance Method Summary collapse

Methods inherited from Client

#delete, #execute, #get, #post, #put

Constructor Details

#initialize(auth_method = 'api_key') ⇒ ApiClient

Returns a new instance of ApiClient.



3
4
5
6
# File 'lib/zype/client/api_client.rb', line 3

def initialize(auth_method = 'api_key')
  @headers = { 'Content-Type' => 'application/json' }.merge(authentication(auth_method))
  self.class.base_uri Zype.configuration.host
end