class Twilio::REST::Video::V1::RoomContext::ParticipantContext::PublishedTrackContext

Public Class Methods

new(version, room_sid, participant_sid, sid) click to toggle source

Initialize the PublishedTrackContext @param [Version] version Version that contains the resource @param [String] room_sid The SID of the Room resource where the Track resource

to fetch is published.

@param [String] participant_sid The SID of the Participant resource with the

published track to fetch.

@param [String] sid The SID of the RoomParticipantPublishedTrack resource to

fetch.

@return [PublishedTrackContext] PublishedTrackContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb
164 def initialize(version, room_sid, participant_sid, sid)
165   super(version)
166 
167   # Path Solution
168   @solution = {room_sid: room_sid, participant_sid: participant_sid, sid: sid, }
169   @uri = "/Rooms/#{@solution[:room_sid]}/Participants/#{@solution[:participant_sid]}/PublishedTracks/#{@solution[:sid]}"
170 end

Public Instance Methods

fetch() click to toggle source

Fetch the PublishedTrackInstance @return [PublishedTrackInstance] Fetched PublishedTrackInstance

    # File lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb
175 def fetch
176   payload = @version.fetch('GET', @uri)
177 
178   PublishedTrackInstance.new(
179       @version,
180       payload,
181       room_sid: @solution[:room_sid],
182       participant_sid: @solution[:participant_sid],
183       sid: @solution[:sid],
184   )
185 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb
196 def inspect
197   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
198   "#<Twilio.Video.V1.PublishedTrackContext #{context}>"
199 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb
189 def to_s
190   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
191   "#<Twilio.Video.V1.PublishedTrackContext #{context}>"
192 end