Class: Zype::AnalyticsClient

Inherits:
Client
  • Object
show all
Defined in:
lib/zype/client/analytics_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, #post, #put

Constructor Details

#initialize(auth_method = 'api_key') ⇒ AnalyticsClient

Returns a new instance of AnalyticsClient.



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

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

Instance Method Details

#get(path:, params:) ⇒ Object



8
9
10
11
# File 'lib/zype/client/analytics_client.rb', line 8

def get(path:, params:)
  params.merge!(api_key: Zype.configuration.api_key)
  super(path: path, params: params)
end