Class: AssemblyAI::Client

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key:, environment: Environment::DEFAULT, max_retries: nil, timeout_in_seconds: nil, user_agent: nil) ⇒ Client

Parameters:

  • api_key (String)
  • environment (Environment) (defaults to: Environment::DEFAULT)
  • max_retries (Long) (defaults to: nil)

    The number of times to retry a failed request, defaults to 2.

  • timeout_in_seconds (Long) (defaults to: nil)
  • user_agent (AssemblyAI::UserAgent) (defaults to: nil)


24
25
26
27
28
29
30
31
# File 'lib/assemblyai.rb', line 24

def initialize(api_key:, environment: Environment::DEFAULT, max_retries: nil, timeout_in_seconds: nil, user_agent: nil)
  @request_client = RequestClient.new(environment: environment, max_retries: max_retries,
                                      timeout_in_seconds: timeout_in_seconds, api_key: api_key, user_agent: user_agent)
  @files = FilesClient.new(request_client: @request_client)
  @transcripts = TranscriptsClient.new(request_client: @request_client)
  @realtime = RealtimeClient.new(request_client: @request_client)
  @lemur = LemurClient.new(request_client: @request_client)
end

Instance Attribute Details

#filesObject (readonly)

Returns the value of attribute files.



16
17
18
# File 'lib/assemblyai.rb', line 16

def files
  @files
end

#lemurObject (readonly)

Returns the value of attribute lemur.



16
17
18
# File 'lib/assemblyai.rb', line 16

def lemur
  @lemur
end

#realtimeObject (readonly)

Returns the value of attribute realtime.



16
17
18
# File 'lib/assemblyai.rb', line 16

def realtime
  @realtime
end

#transcriptsObject (readonly)

Returns the value of attribute transcripts.



16
17
18
# File 'lib/assemblyai.rb', line 16

def transcripts
  @transcripts
end