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
Instance Method Summary collapse
-
#account_sid ⇒ String
Account SID associated with this room.
-
#codecs ⇒ Array<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 ⇒ CreatedMethod
-
#duration_sec ⇒ String
Total room duration from create time to end time.
- #edge_location ⇒ EdgeLocation
- #end_reason ⇒ EndReason
-
#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 ⇒ Hash
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 ⇒ TwilioRealm
-
#participants ⇒ participants
Access the participants.
- #processing_state ⇒ ProcessingState
-
#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 ⇒ RoomStatus
- #room_type ⇒ RoomType
-
#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
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 300 301 302 303 304 305 306 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 270 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'], 'total_participant_duration_sec' => payload['total_participant_duration_sec'], 'total_recording_duration_sec' => payload['total_recording_duration_sec'], '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.
321 322 323 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 321 def account_sid @properties['account_sid'] end |
#codecs ⇒ Array<Codec>
Returns Codecs used by participants in the room. Can be ‘VP8`, `H264`, or `VP9`.
417 418 419 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 417 def codecs @properties['codecs'] end |
#concurrent_participants ⇒ String
Returns Actual number of concurrent participants.
405 406 407 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 405 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
312 313 314 315 316 317 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 312 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.
339 340 341 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 339 def create_time @properties['create_time'] end |
#created_method ⇒ CreatedMethod
375 376 377 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 375 def created_method @properties['created_method'] end |
#duration_sec ⇒ String
Returns Total room duration from create time to end time.
429 430 431 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 429 def duration_sec @properties['duration_sec'] end |
#edge_location ⇒ EdgeLocation
459 460 461 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 459 def edge_location @properties['edge_location'] end |
#end_reason ⇒ EndReason
381 382 383 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 381 def end_reason @properties['end_reason'] end |
#end_time ⇒ Time
Returns End time for the room.
345 346 347 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 345 def end_time @properties['end_time'] end |
#fetch ⇒ RoomInstance
Fetch the RoomInstance
478 479 480 481 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 478 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
499 500 501 502 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 499 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V1.RoomInstance #{values}>" end |
#links ⇒ Hash
Returns Room subresources.
471 472 473 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 471 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.
411 412 413 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 411 def max_concurrent_participants @properties['max_concurrent_participants'] end |
#max_participants ⇒ String
Returns Max number of total participants allowed by the application settings.
387 388 389 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 387 def max_participants @properties['max_participants'] end |
#media_region ⇒ TwilioRealm
423 424 425 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 423 def media_region @properties['media_region'] end |
#participants ⇒ participants
Access the participants
486 487 488 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 486 def participants context.participants end |
#processing_state ⇒ ProcessingState
447 448 449 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 447 def processing_state @properties['processing_state'] end |
#recording_enabled ⇒ Boolean
Returns Boolean indicating if recording is enabled for the room.
453 454 455 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 453 def recording_enabled @properties['recording_enabled'] end |
#room_name ⇒ String
Returns Room friendly name.
333 334 335 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 333 def room_name @properties['room_name'] end |
#room_sid ⇒ String
Returns Unique identifier for the room.
327 328 329 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 327 def room_sid @properties['room_sid'] end |
#room_status ⇒ RoomStatus
357 358 359 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 357 def room_status @properties['room_status'] end |
#room_type ⇒ RoomType
351 352 353 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 351 def room_type @properties['room_type'] end |
#status_callback ⇒ String
Returns Webhook provided for status callbacks.
363 364 365 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 363 def status_callback @properties['status_callback'] end |
#status_callback_method ⇒ String
Returns HTTP method provided for status callback URL.
369 370 371 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 369 def status_callback_method @properties['status_callback_method'] end |
#to_s ⇒ Object
Provide a user friendly representation
492 493 494 495 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 492 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.
435 436 437 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 435 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.
441 442 443 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 441 def total_recording_duration_sec @properties['total_recording_duration_sec'] end |
#unique_participant_identities ⇒ String
Returns Unique number of participant identities.
399 400 401 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 399 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.
393 394 395 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 393 def unique_participants @properties['unique_participants'] end |
#url ⇒ String
Returns URL for the room resource.
465 466 467 |
# File 'lib/twilio-ruby/rest/insights/v1/room.rb', line 465 def url @properties['url'] end |