Class: Twilio::REST::Video::V1::RoomContext::RoomRecordingInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Video::V1::RoomContext::RoomRecordingInstance
- Defined in:
- lib/twilio-ruby/rest/video/v1/room/room_recording.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the RoomRecording resource.
- #codec ⇒ Codec
- #container_format ⇒ Format
-
#context ⇒ RoomRecordingContext
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.
-
#delete ⇒ Boolean
Delete the RoomRecordingInstance.
-
#duration ⇒ String
The duration of the recording rounded to the nearest second.
-
#fetch ⇒ RoomRecordingInstance
Fetch the RoomRecordingInstance.
-
#grouping_sids ⇒ Hash
A list of SIDs related to the Recording.
-
#initialize(version, payload, room_sid: nil, sid: nil) ⇒ RoomRecordingInstance
constructor
Initialize the RoomRecordingInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ Hash
The URLs of related resources.
-
#media_external_location ⇒ String
The URL of the media file associated with the recording when stored externally.
-
#offset ⇒ String
The time in milliseconds elapsed between an arbitrary point in time, common to all group rooms, and the moment when the source room of this track started.
-
#room_sid ⇒ String
The SID of the Room resource the recording is associated with.
-
#sid ⇒ String
The unique string that we created to identify the RoomRecording resource.
-
#size ⇒ String
The size of the recorded track in bytes.
-
#source_sid ⇒ String
The SID of the recording source.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#track_name ⇒ String
The name that was given to the source track of the recording.
- #type ⇒ Type
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, room_sid: nil, sid: nil) ⇒ RoomRecordingInstance
Initialize the RoomRecordingInstance
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 244 def initialize(version, payload , room_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'status' => payload['status'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'sid' => payload['sid'], 'source_sid' => payload['source_sid'], 'size' => payload['size'], 'url' => payload['url'], 'type' => payload['type'], 'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i, 'container_format' => payload['container_format'], 'codec' => payload['codec'], 'grouping_sids' => payload['grouping_sids'], 'track_name' => payload['track_name'], 'offset' => payload['offset'], 'media_external_location' => payload['media_external_location'], 'room_sid' => payload['room_sid'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'room_sid' => room_sid || @properties['room_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the RoomRecording resource.
286 287 288 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 286 def account_sid @properties['account_sid'] end |
#codec ⇒ Codec
346 347 348 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 346 def codec @properties['codec'] end |
#container_format ⇒ Format
340 341 342 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 340 def container_format @properties['container_format'] end |
#context ⇒ RoomRecordingContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
277 278 279 280 281 282 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 277 def context unless @instance_context @instance_context = RoomRecordingContext.new(@version , @params['room_sid'], @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
298 299 300 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 298 def date_created @properties['date_created'] end |
#delete ⇒ Boolean
Delete the RoomRecordingInstance
389 390 391 392 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 389 def delete context.delete end |
#duration ⇒ String
Returns The duration of the recording rounded to the nearest second. Sub-second duration tracks have a ‘duration` of 1 second.
334 335 336 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 334 def duration @properties['duration'] end |
#fetch ⇒ RoomRecordingInstance
Fetch the RoomRecordingInstance
397 398 399 400 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 397 def fetch context.fetch end |
#grouping_sids ⇒ Hash
Returns A list of SIDs related to the Recording. Includes the ‘room_sid` and `participant_sid`.
352 353 354 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 352 def grouping_sids @properties['grouping_sids'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
411 412 413 414 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 411 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RoomRecordingInstance #{values}>" end |
#links ⇒ Hash
Returns The URLs of related resources.
382 383 384 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 382 def links @properties['links'] end |
#media_external_location ⇒ String
Returns The URL of the media file associated with the recording when stored externally. See [External S3 Recordings](/docs/video/api/external-s3-recordings) for more details.
370 371 372 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 370 def media_external_location @properties['media_external_location'] end |
#offset ⇒ String
Returns The time in milliseconds elapsed between an arbitrary point in time, common to all group rooms, and the moment when the source room of this track started. This information provides a synchronization mechanism for recordings belonging to the same room.
364 365 366 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 364 def offset @properties['offset'] end |
#room_sid ⇒ String
Returns The SID of the Room resource the recording is associated with.
376 377 378 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 376 def room_sid @properties['room_sid'] end |
#sid ⇒ String
Returns The unique string that we created to identify the RoomRecording resource.
304 305 306 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 304 def sid @properties['sid'] end |
#size ⇒ String
Returns The size of the recorded track in bytes.
316 317 318 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 316 def size @properties['size'] end |
#source_sid ⇒ String
Returns The SID of the recording source. For a Room Recording, this value is a ‘track_sid`.
310 311 312 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 310 def source_sid @properties['source_sid'] end |
#status ⇒ Status
292 293 294 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 292 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
404 405 406 407 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 404 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RoomRecordingInstance #{values}>" end |
#track_name ⇒ String
Returns The name that was given to the source track of the recording. If no name is given, the ‘source_sid` is used.
358 359 360 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 358 def track_name @properties['track_name'] end |
#type ⇒ Type
328 329 330 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 328 def type @properties['type'] end |
#url ⇒ String
Returns The absolute URL of the resource.
322 323 324 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 322 def url @properties['url'] end |