Class: Twilio::REST::Video::V1::RoomInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Video::V1::RoomInstance
- Defined in:
- lib/twilio-ruby/rest/video/v1/room.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Room resource.
-
#audio_only ⇒ Boolean
When set to true, indicates that the participants in the room will only publish audio.
-
#context ⇒ RoomContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#duration ⇒ String
The duration of the room in seconds.
-
#empty_room_timeout ⇒ String
Specifies how long (in minutes) a room will remain active after last participant leaves.
-
#enable_turn ⇒ Boolean
Deprecated, now always considered to be true.
-
#end_time ⇒ Time
The UTC end time of the room in [ISO 8601](en.wikipedia.org/wiki/ISO_8601#UTC) format.
-
#fetch ⇒ RoomInstance
Fetch the RoomInstance.
-
#initialize(version, payload, sid: nil) ⇒ RoomInstance
constructor
Initialize the RoomInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#large_room ⇒ Boolean
Indicates if this is a large room.
-
#links ⇒ Hash
The URLs of related resources.
-
#max_concurrent_published_tracks ⇒ String
The maximum number of published audio, video, and data tracks all participants combined are allowed to publish in the room at the same time.
-
#max_participant_duration ⇒ String
The maximum number of seconds a Participant can be connected to the room.
-
#max_participants ⇒ String
The maximum number of concurrent Participants allowed in the room.
-
#media_region ⇒ String
The region for the media server in Group Rooms.
-
#participants ⇒ participants
Access the participants.
-
#record_participants_on_connect ⇒ Boolean
Whether to start recording when Participants connect.
-
#recording_rules ⇒ recording_rules
Access the recording_rules.
-
#recordings ⇒ recordings
Access the recordings.
-
#sid ⇒ String
The unique string that we created to identify the Room resource.
- #status ⇒ RoomStatus
-
#status_callback ⇒ String
The URL we call using the ‘status_callback_method` to send status information to your application on every room event.
-
#status_callback_method ⇒ String
The HTTP method we use to call ‘status_callback`.
-
#to_s ⇒ Object
Provide a user friendly representation.
- #type ⇒ RoomType
-
#unique_name ⇒ String
An application-defined string that uniquely identifies the resource.
-
#unused_room_timeout ⇒ String
Specifies how long (in minutes) a room will remain active if no one joins.
-
#update(status: nil) ⇒ RoomInstance
Update the RoomInstance.
-
#url ⇒ String
The absolute URL of the resource.
-
#video_codecs ⇒ Array<VideoCodec>
An array of the video codecs that are supported when publishing a track in the room.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ RoomInstance
Initialize the RoomInstance
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 372 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'status' => payload['status'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'account_sid' => payload['account_sid'], 'enable_turn' => payload['enable_turn'], 'unique_name' => payload['unique_name'], 'status_callback' => payload['status_callback'], 'status_callback_method' => payload['status_callback_method'], 'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']), 'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i, 'type' => payload['type'], 'max_participants' => payload['max_participants'] == nil ? payload['max_participants'] : payload['max_participants'].to_i, 'max_participant_duration' => payload['max_participant_duration'] == nil ? payload['max_participant_duration'] : payload['max_participant_duration'].to_i, 'max_concurrent_published_tracks' => payload['max_concurrent_published_tracks'] == nil ? payload['max_concurrent_published_tracks'] : payload['max_concurrent_published_tracks'].to_i, 'record_participants_on_connect' => payload['record_participants_on_connect'], 'video_codecs' => payload['video_codecs'], 'media_region' => payload['media_region'], 'audio_only' => payload['audio_only'], 'empty_room_timeout' => payload['empty_room_timeout'] == nil ? payload['empty_room_timeout'] : payload['empty_room_timeout'].to_i, 'unused_room_timeout' => payload['unused_room_timeout'] == nil ? payload['unused_room_timeout'] : payload['unused_room_timeout'].to_i, 'large_room' => payload['large_room'], 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
445 446 447 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 445 def account_sid @properties['account_sid'] end |
#audio_only ⇒ Boolean
529 530 531 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 529 def audio_only @properties['audio_only'] 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
412 413 414 415 416 417 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 412 def context unless @instance_context @instance_context = RoomContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
433 434 435 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 433 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
439 440 441 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 439 def date_updated @properties['date_updated'] end |
#duration ⇒ String
481 482 483 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 481 def duration @properties['duration'] end |
#empty_room_timeout ⇒ String
535 536 537 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 535 def empty_room_timeout @properties['empty_room_timeout'] end |
#enable_turn ⇒ Boolean
451 452 453 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 451 def enable_turn @properties['enable_turn'] end |
#end_time ⇒ Time
475 476 477 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 475 def end_time @properties['end_time'] end |
#fetch ⇒ RoomInstance
Fetch the RoomInstance
566 567 568 569 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 566 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
614 615 616 617 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 614 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RoomInstance #{values}>" end |
#large_room ⇒ Boolean
547 548 549 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 547 def large_room @properties['large_room'] end |
#links ⇒ Hash
559 560 561 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 559 def links @properties['links'] end |
#max_concurrent_published_tracks ⇒ String
505 506 507 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 505 def max_concurrent_published_tracks @properties['max_concurrent_published_tracks'] end |
#max_participant_duration ⇒ String
499 500 501 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 499 def max_participant_duration @properties['max_participant_duration'] end |
#max_participants ⇒ String
493 494 495 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 493 def max_participants @properties['max_participants'] end |
#media_region ⇒ String
523 524 525 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 523 def media_region @properties['media_region'] end |
#participants ⇒ participants
Access the participants
594 595 596 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 594 def participants context.participants end |
#record_participants_on_connect ⇒ Boolean
511 512 513 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 511 def record_participants_on_connect @properties['record_participants_on_connect'] end |
#recording_rules ⇒ recording_rules
Access the recording_rules
587 588 589 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 587 def recording_rules context.recording_rules end |
#recordings ⇒ recordings
Access the recordings
601 602 603 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 601 def recordings context.recordings end |
#sid ⇒ String
421 422 423 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 421 def sid @properties['sid'] end |
#status ⇒ RoomStatus
427 428 429 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 427 def status @properties['status'] end |
#status_callback ⇒ String
463 464 465 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 463 def status_callback @properties['status_callback'] end |
#status_callback_method ⇒ String
469 470 471 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 469 def status_callback_method @properties['status_callback_method'] end |
#to_s ⇒ Object
Provide a user friendly representation
607 608 609 610 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 607 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RoomInstance #{values}>" end |
#type ⇒ RoomType
487 488 489 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 487 def type @properties['type'] end |
#unique_name ⇒ String
457 458 459 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 457 def unique_name @properties['unique_name'] end |
#unused_room_timeout ⇒ String
541 542 543 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 541 def unused_room_timeout @properties['unused_room_timeout'] end |
#update(status: nil) ⇒ RoomInstance
Update the RoomInstance
575 576 577 578 579 580 581 582 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 575 def update( status: nil ) context.update( status: status, ) end |
#url ⇒ String
553 554 555 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 553 def url @properties['url'] end |
#video_codecs ⇒ Array<VideoCodec>
517 518 519 |
# File 'lib/twilio-ruby/rest/video/v1/room.rb', line 517 def video_codecs @properties['video_codecs'] end |