Class: Deepgram::Base

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

Direct Known Subclasses

Listen::Client, Read::Client, Speak::Client

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



5
6
7
8
9
# File 'lib/deepgram/base.rb', line 5

def initialize(options = {})
  @connection = Faraday.new(url: ENV.fetch('DEEPGRAM_URL', 'https://api.deepgram.com/v1'))
  @connection.headers['Authorization'] = "Token #{ENV.fetch('DEEPGRAM_API_KEY')}"
  @options = options
end