module VoiceBase::V1::Response

Public Class Methods

extended(response) click to toggle source
# File lib/voicebase/v1/response.rb, line 4
def self.extended(response)
end

Public Instance Methods

success?() click to toggle source
# File lib/voicebase/v1/response.rb, line 7
def success?
  ok? && request_status == "SUCCESS"
end
transcript_ready?() click to toggle source
# File lib/voicebase/v1/response.rb, line 12
def transcript_ready?

  # this was added because with the V1 API, a value in the returned JSON indicates both a
  # successful HTTP request, but also a ready transcript. With V2, there's no JSON value
  # to indicate status. Instead, the HTTP status code indicates request status, and
  # the state becoming "finished" indicates the transcript it ready.

  success?
end