class Twilio::REST::Insights::V1::RoomContext
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Public Class Methods
new(version, room_sid)
click to toggle source
Initialize the RoomContext
@param [Version] version Version
that contains the resource @param [String] room_sid The SID of the Room resource. @return [RoomContext] RoomContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/insights/v1/room.rb 201 def initialize(version, room_sid) 202 super(version) 203 204 # Path Solution 205 @solution = {room_sid: room_sid, } 206 @uri = "/Video/Rooms/#{@solution[:room_sid]}" 207 208 # Dependents 209 @participants = nil 210 end
Public Instance Methods
fetch()
click to toggle source
Fetch the RoomInstance
@return [RoomInstance] Fetched RoomInstance
# File lib/twilio-ruby/rest/insights/v1/room.rb 215 def fetch 216 payload = @version.fetch('GET', @uri) 217 218 RoomInstance.new(@version, payload, room_sid: @solution[:room_sid], ) 219 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/insights/v1/room.rb 248 def inspect 249 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 250 "#<Twilio.Insights.V1.RoomContext #{context}>" 251 end
participants(participant_sid=:unset)
click to toggle source
Access the participants @return [ParticipantList] @return [ParticipantContext] if participant_sid was passed.
# File lib/twilio-ruby/rest/insights/v1/room.rb 225 def participants(participant_sid=:unset) 226 raise ArgumentError, 'participant_sid cannot be nil' if participant_sid.nil? 227 228 if participant_sid != :unset 229 return ParticipantContext.new(@version, @solution[:room_sid], participant_sid, ) 230 end 231 232 unless @participants 233 @participants = ParticipantList.new(@version, room_sid: @solution[:room_sid], ) 234 end 235 236 @participants 237 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/insights/v1/room.rb 241 def to_s 242 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 243 "#<Twilio.Insights.V1.RoomContext #{context}>" 244 end