Class: Twilio::REST::Video::V1::RoomContext::ParticipantContext::PublishedTrackContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Video::V1::RoomContext::ParticipantContext::PublishedTrackContext
- Defined in:
- lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb
Instance Method Summary collapse
-
#fetch ⇒ PublishedTrackInstance
Fetch the PublishedTrackInstance.
-
#initialize(version, room_sid, participant_sid, sid) ⇒ PublishedTrackContext
constructor
Initialize the PublishedTrackContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, room_sid, participant_sid, sid) ⇒ PublishedTrackContext
Initialize the PublishedTrackContext
141 142 143 144 145 146 147 148 149 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 141 def initialize(version, room_sid, participant_sid, sid) super(version) # Path Solution @solution = { room_sid: room_sid, participant_sid: participant_sid, sid: sid, } @uri = "/Rooms/#{@solution[:room_sid]}/Participants/#{@solution[:participant_sid]}/PublishedTracks/#{@solution[:sid]}" end |
Instance Method Details
#fetch ⇒ PublishedTrackInstance
Fetch the PublishedTrackInstance
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 153 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) PublishedTrackInstance.new( @version, payload, room_sid: @solution[:room_sid], participant_sid: @solution[:participant_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
181 182 183 184 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 181 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.PublishedTrackContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
174 175 176 177 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 174 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.PublishedTrackContext #{context}>" end |