Class: Twilio::REST::Insights::V1::RoomInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Insights::V1::RoomInstance
- Defined in:
- lib/twilio-ruby/rest/insights/v1/room.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
Account SID associated with this room.
-
#codecs ⇒ Array[room.Codec]
Codecs used by participants in the room.
-
#concurrent_participants ⇒ String
Actual number of concurrent participants.
-
#context ⇒ RoomContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#create_time ⇒ Time
Creation time of the room.
-
#created_method ⇒ room.CreatedMethod
How the room was created.
-
#duration_sec ⇒ String
Total room duration from create time to end time.
-
#edge_location ⇒ room.EdgeLocation
Edge location of Twilio media servers for the room.
-
#end_reason ⇒ room.EndReason
Reason the room ended.
-
#end_time ⇒ Time
End time for the room.
-
#fetch ⇒ RoomInstance
Fetch the RoomInstance.
-
#initialize(version, payload, room_sid: nil) ⇒ RoomInstance
constructor
Initialize the RoomInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
Room subresources.
-
#max_concurrent_participants ⇒ String
Maximum number of participants allowed in the room at the same time allowed by the application settings.
-
#max_participants ⇒ String
Max number of total participants allowed by the application settings.
-
#media_region ⇒ room.TwilioRealm
Region of Twilio media servers for the room.
-
#participants ⇒ participants
Access the participants.
-
#processing_state ⇒ room.ProcessingState
Video Log Analyzer resource state.
-
#recording_enabled ⇒ Boolean
Boolean indicating if recording is enabled for the room.
-
#room_name ⇒ String
Room friendly name.
-
#room_sid ⇒ String
Unique identifier for the room.
-
#room_status ⇒ room.RoomStatus
Status of the room.
-
#room_type ⇒ room.RoomType
Type of room.
-
#status_callback ⇒ String
Webhook provided for status callbacks.
-
#status_callback_method ⇒ String
HTTP method provided for status callback URL.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#total_participant_duration_sec ⇒ String
Combined amount of participant time in the room.
-
#total_recording_duration_sec ⇒ String
Combined amount of recorded seconds for participants in the room.
-
#unique_participant_identities ⇒ String
Unique number of participant identities.
-
#unique_participants ⇒ String
Number of participants.
-
#url ⇒ String
URL for the room resource.
Constructor Details
#initialize(version, payload, room_sid: nil) ⇒ RoomInstance
Initialize the RoomInstance
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 263 def initialize(version, payload, room_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'room_sid' => payload['room_sid'], 'room_name' => payload['room_name'], 'create_time' => Twilio.deserialize_iso8601_datetime(payload['create_time']), 'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']), 'room_type' => payload['room_type'], 'room_status' => payload['room_status'], 'status_callback' => payload['status_callback'], 'status_callback_method' => payload['status_callback_method'], 'created_method' => payload['created_method'], 'end_reason' => payload['end_reason'], 'max_participants' => payload['max_participants'] == nil ? payload['max_participants'] : payload['max_participants'].to_i, 'unique_participants' => payload['unique_participants'] == nil ? payload['unique_participants'] : payload['unique_participants'].to_i, 'unique_participant_identities' => payload['unique_participant_identities'] == nil ? payload['unique_participant_identities'] : payload['unique_participant_identities'].to_i, 'concurrent_participants' => payload['concurrent_participants'] == nil ? payload['concurrent_participants'] : payload['concurrent_participants'].to_i, 'max_concurrent_participants' => payload['max_concurrent_participants'] == nil ? payload['max_concurrent_participants'] : payload['max_concurrent_participants'].to_i, 'codecs' => payload['codecs'], 'media_region' => payload['media_region'], 'duration_sec' => payload['duration_sec'].to_i, 'total_participant_duration_sec' => payload['total_participant_duration_sec'].to_i, 'total_recording_duration_sec' => payload['total_recording_duration_sec'].to_i, 'processing_state' => payload['processing_state'], 'recording_enabled' => payload['recording_enabled'], 'edge_location' => payload['edge_location'], 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = {'room_sid' => room_sid || @properties['room_sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Account SID associated with this room.
314 315 316 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 314 def account_sid @properties['account_sid'] end |
#codecs ⇒ Array[room.Codec]
Returns Codecs used by participants in the room.
410 411 412 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 410 def codecs @properties['codecs'] end |
#concurrent_participants ⇒ String
Returns Actual number of concurrent participants.
398 399 400 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 398 def concurrent_participants @properties['concurrent_participants'] end |
#context ⇒ RoomContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
305 306 307 308 309 310 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 305 def context unless @instance_context @instance_context = RoomContext.new(@version, @params['room_sid'], ) end @instance_context end |
#create_time ⇒ Time
Returns Creation time of the room.
332 333 334 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 332 def create_time @properties['create_time'] end |
#created_method ⇒ room.CreatedMethod
Returns How the room was created.
368 369 370 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 368 def created_method @properties['created_method'] end |
#duration_sec ⇒ String
Returns Total room duration from create time to end time.
422 423 424 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 422 def duration_sec @properties['duration_sec'] end |
#edge_location ⇒ room.EdgeLocation
Returns Edge location of Twilio media servers for the room.
452 453 454 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 452 def edge_location @properties['edge_location'] end |
#end_reason ⇒ room.EndReason
Returns Reason the room ended.
374 375 376 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 374 def end_reason @properties['end_reason'] end |
#end_time ⇒ Time
Returns End time for the room.
338 339 340 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 338 def end_time @properties['end_time'] end |
#fetch ⇒ RoomInstance
Fetch the RoomInstance
471 472 473 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 471 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
491 492 493 494 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 491 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V1.RoomInstance #{values}>" end |
#links ⇒ String
Returns Room subresources.
464 465 466 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 464 def links @properties['links'] end |
#max_concurrent_participants ⇒ String
Returns Maximum number of participants allowed in the room at the same time allowed by the application settings.
404 405 406 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 404 def max_concurrent_participants @properties['max_concurrent_participants'] end |
#max_participants ⇒ String
Returns Max number of total participants allowed by the application settings.
380 381 382 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 380 def max_participants @properties['max_participants'] end |
#media_region ⇒ room.TwilioRealm
Returns Region of Twilio media servers for the room.
416 417 418 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 416 def media_region @properties['media_region'] end |
#participants ⇒ participants
Access the participants
478 479 480 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 478 def participants context.participants end |
#processing_state ⇒ room.ProcessingState
Returns Video Log Analyzer resource state. Will be either ‘in-progress` or `complete`.
440 441 442 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 440 def processing_state @properties['processing_state'] end |
#recording_enabled ⇒ Boolean
Returns Boolean indicating if recording is enabled for the room.
446 447 448 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 446 def recording_enabled @properties['recording_enabled'] end |
#room_name ⇒ String
Returns room friendly name.
326 327 328 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 326 def room_name @properties['room_name'] end |
#room_sid ⇒ String
Returns Unique identifier for the room.
320 321 322 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 320 def room_sid @properties['room_sid'] end |
#room_status ⇒ room.RoomStatus
Returns Status of the room.
350 351 352 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 350 def room_status @properties['room_status'] end |
#room_type ⇒ room.RoomType
Returns Type of room.
344 345 346 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 344 def room_type @properties['room_type'] end |
#status_callback ⇒ String
Returns Webhook provided for status callbacks.
356 357 358 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 356 def status_callback @properties['status_callback'] end |
#status_callback_method ⇒ String
Returns HTTP method provided for status callback URL.
362 363 364 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 362 def status_callback_method @properties['status_callback_method'] end |
#to_s ⇒ Object
Provide a user friendly representation
484 485 486 487 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 484 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V1.RoomInstance #{values}>" end |
#total_participant_duration_sec ⇒ String
Returns Combined amount of participant time in the room.
428 429 430 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 428 def total_participant_duration_sec @properties['total_participant_duration_sec'] end |
#total_recording_duration_sec ⇒ String
Returns Combined amount of recorded seconds for participants in the room.
434 435 436 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 434 def total_recording_duration_sec @properties['total_recording_duration_sec'] end |
#unique_participant_identities ⇒ String
Returns Unique number of participant identities.
392 393 394 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 392 def unique_participant_identities @properties['unique_participant_identities'] end |
#unique_participants ⇒ String
Returns Number of participants. May include duplicate identities for participants who left and rejoined.
386 387 388 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 386 def unique_participants @properties['unique_participants'] end |
#url ⇒ String
Returns URL for the room resource.
458 459 460 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 458 def url @properties['url'] end |