Class: Twilio::REST::Video::V1::RoomContext::TranscriptionsPageMetadata

Inherits:
PageMetadata
  • Object
show all
Defined in:
lib/twilio-ruby/rest/video/v1/room/transcriptions.rb

Constant Summary

Constants inherited from PageMetadata

PageMetadata::META_KEYS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from PageMetadata

#get_key, #next_page, #next_page_url, #previous_page, #previous_page_url, #process_response

Constructor Details

#initialize(version, response, solution, limit) ⇒ TranscriptionsPageMetadata

Returns a new instance of TranscriptionsPageMetadata.



432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 432

def initialize(version, response, solution, limit)
    super(version, response)
    @transcriptions_page = []
    @limit = limit
    key = get_key(response.body)
    records = 0
    while( limit != :unset && records < limit )
        @transcriptions_page << TranscriptionsListResponse.new(version, @payload, key, limit - records)
        @payload = self.next_page
        break unless @payload
        records += @payload.body[key].size
    end
    # Path Solution
    @solution = solution
end

Instance Attribute Details

#transcriptions_pageObject (readonly)

Returns the value of attribute transcriptions_page.



430
431
432
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 430

def transcriptions_page
  @transcriptions_page
end

Instance Method Details

#eachObject



448
449
450
451
452
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 448

def each
    @transcriptions_page.each do |record|
      yield record
    end
end

#to_sObject



454
455
456
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 454

def to_s
  '<Twilio::REST::Video::V1PageMetadata>';
end