Class: AssemblyAI::Transcripts::PollingOptions

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

Overview

Configuration options for polling requests.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(interval: 3000, timeout: -1)) ⇒ Transcripts::PollingOptions

Parameters:

  • interval (Integer) (defaults to: 3000)

    The amount of time to wait between polling requests, in milliseconds. Defaults to 3000.

  • timeout (Integer) (defaults to: -1))

    The maximum amount of time to wait for the transcript to be ready, in milliseconds. Defaults to -1, which means poll forever.



12
13
14
15
16
17
# File 'lib/assemblyai/transcripts/types/polling_options.rb', line 12

def initialize(interval: 3000, timeout: -1)
  # @type [Integer] The amount of time to wait between polling requests, in milliseconds.
  @interval = interval
  # @type [Integer] The maximum amount of time to wait for the transcript to be ready, in milliseconds.
  @timeout = timeout
end

Instance Attribute Details

#intervalObject (readonly)

Returns the value of attribute interval.



7
8
9
# File 'lib/assemblyai/transcripts/types/polling_options.rb', line 7

def interval
  @interval
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



7
8
9
# File 'lib/assemblyai/transcripts/types/polling_options.rb', line 7

def timeout
  @timeout
end