Class: AssemblyAI::AsyncClient

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) ⇒ AsyncClient

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)


43
44
45
46
47
48
49
50
# File 'lib/assemblyai.rb', line 43

def initialize(api_key:, environment: Environment::DEFAULT, max_retries: nil, timeout_in_seconds: nil, user_agent: nil)
  @async_request_client = AsyncRequestClient.new(environment: environment, max_retries: max_retries,
                                                 timeout_in_seconds: timeout_in_seconds, api_key: api_key, user_agent: user_agent)
  @files = AsyncFilesClient.new(request_client: @async_request_client)
  @transcripts = AsyncTranscriptsClient.new(request_client: @async_request_client)
  @realtime = AsyncRealtimeClient.new(request_client: @async_request_client)
  @lemur = AsyncLemurClient.new(request_client: @async_request_client)
end

Instance Attribute Details

#filesObject (readonly)

Returns the value of attribute files.



35
36
37
# File 'lib/assemblyai.rb', line 35

def files
  @files
end

#lemurObject (readonly)

Returns the value of attribute lemur.



35
36
37
# File 'lib/assemblyai.rb', line 35

def lemur
  @lemur
end

#realtimeObject (readonly)

Returns the value of attribute realtime.



35
36
37
# File 'lib/assemblyai.rb', line 35

def realtime
  @realtime
end

#transcriptsObject (readonly)

Returns the value of attribute transcripts.



35
36
37
# File 'lib/assemblyai.rb', line 35

def transcripts
  @transcripts
end