Method: Kennel::Api#initialize
- Defined in:
- lib/kennel/api.rb
#initialize(app_key = nil, api_key = nil) ⇒ Api
Returns a new instance of Api.
20 21 22 23 24 25 |
# File 'lib/kennel/api.rb', line 20 def initialize(app_key = nil, api_key = nil) @app_key = app_key || ENV.fetch("DATADOG_APP_KEY") @api_key = api_key || ENV.fetch("DATADOG_API_KEY") url = Utils.path_to_url("") @client = Faraday.new(url: url) { |c| c.adapter :net_http_persistent } end |