Class: Twilio::REST::Video::V1::RecordingInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Video::V1::RecordingInstance
- Defined in:
- lib/twilio-ruby/rest/video/v1/recording.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#codec ⇒ recording.Codec
The codec used to encode the track.
-
#container_format ⇒ recording.Format
The file format for the recording.
-
#context ⇒ RecordingContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The ISO 8601 date and time in GMT when the resource was created.
-
#delete ⇒ Boolean
Delete the RecordingInstance.
-
#duration ⇒ String
The duration of the recording in seconds.
-
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance.
-
#grouping_sids ⇒ Hash
A list of SIDs related to the recording.
-
#initialize(version, payload, sid: nil) ⇒ RecordingInstance
constructor
Initialize the RecordingInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
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 number of milliseconds between a point in time that is common to all rooms in a group and when the source room of the recording started.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#size ⇒ String
The size of the recorded track, in bytes.
-
#source_sid ⇒ String
The SID of the recording source.
-
#status ⇒ recording.Status
The status of the recording.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#track_name ⇒ String
The name that was given to the source track of the recording.
-
#type ⇒ recording.Type
The recording’s media type.
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ RecordingInstance
Initialize the RecordingInstance
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 256 def initialize(version, payload, 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'].to_i, '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'].to_i, 'media_external_location' => payload['media_external_location'], 'links' => payload['links'], } # Context @instance_context = nil @params = {'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
297 298 299 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 297 def account_sid @properties['account_sid'] end |
#codec ⇒ recording.Codec
Returns The codec used to encode the track.
357 358 359 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 357 def codec @properties['codec'] end |
#container_format ⇒ recording.Format
Returns The file format for the recording.
351 352 353 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 351 def container_format @properties['container_format'] end |
#context ⇒ RecordingContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
288 289 290 291 292 293 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 288 def context unless @instance_context @instance_context = RecordingContext.new(@version, @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was created.
309 310 311 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 309 def date_created @properties['date_created'] end |
#delete ⇒ Boolean
Delete the RecordingInstance
401 402 403 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 401 def delete context.delete end |
#duration ⇒ String
Returns The duration of the recording in seconds.
345 346 347 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 345 def duration @properties['duration'] end |
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance
394 395 396 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 394 def fetch context.fetch end |
#grouping_sids ⇒ Hash
Returns A list of SIDs related to the recording.
363 364 365 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 363 def grouping_sids @properties['grouping_sids'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
414 415 416 417 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 414 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RecordingInstance #{values}>" end |
#links ⇒ String
Returns The URLs of related resources.
387 388 389 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 387 def links @properties['links'] end |
#media_external_location ⇒ String
Returns The URL of the media file associated with the recording when stored externally.
381 382 383 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 381 def media_external_location @properties['media_external_location'] end |
#offset ⇒ String
Returns The number of milliseconds between a point in time that is common to all rooms in a group and when the source room of the recording started.
375 376 377 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 375 def offset @properties['offset'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
315 316 317 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 315 def sid @properties['sid'] end |
#size ⇒ String
Returns The size of the recorded track, in bytes.
327 328 329 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 327 def size @properties['size'] end |
#source_sid ⇒ String
Returns The SID of the recording source.
321 322 323 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 321 def source_sid @properties['source_sid'] end |
#status ⇒ recording.Status
Returns The status of the recording.
303 304 305 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 303 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
407 408 409 410 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 407 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RecordingInstance #{values}>" end |
#track_name ⇒ String
Returns The name that was given to the source track of the recording.
369 370 371 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 369 def track_name @properties['track_name'] end |
#type ⇒ recording.Type
Returns The recording’s media type.
339 340 341 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 339 def type @properties['type'] end |
#url ⇒ String
Returns The absolute URL of the resource.
333 334 335 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 333 def url @properties['url'] end |