Class: Datahen::Client::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/answersengine.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.env_auth_tokenObject



7
8
9
# File 'lib/answersengine.rb', line 7

def self.env_auth_token
  ENV['DATAHEN_TOKEN'].nil? ? ENV['ANSWERSENGINE_TOKEN'] : ENV['DATAHEN_TOKEN']
end

Instance Method Details

#env_api_urlObject



11
12
13
14
# File 'lib/answersengine.rb', line 11

def env_api_url
  return ENV['DATAHEN_API_URL'] unless ENV['DATAHEN_API_URL'].nil?
  ENV['ANSWERSENGINE_API_URL'].nil? ? 'https://app.datahen.com/api/v1' : ENV['ANSWERSENGINE_API_URL']
end