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 Recording resource.
- #codec ⇒ Codec
- #container_format ⇒ Format
-
#context ⇒ RecordingContext
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 format.
-
#delete ⇒ Boolean
Delete the RecordingInstance.
-
#duration ⇒ String
The duration of the recording in seconds rounded to the nearest second.
-
#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 ⇒ 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.
-
#sid ⇒ String
The unique string that we created to identify the Recording resource.
-
#size ⇒ String
The size of the recorded track, in bytes.
-
#source_sid ⇒ String
The SID of the recording source.
- #status ⇒ Status
-
#status_callback ⇒ String
The URL called using the
status_callback_methodto send status information on every recording event. -
#status_callback_method ⇒ String
The HTTP method used to call
status_callback. -
#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, sid: nil) ⇒ RecordingInstance
Initialize the RecordingInstance
259 260 261 262 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 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 259 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'], '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'], 'status_callback' => payload['status_callback'], 'status_callback_method' => payload['status_callback_method'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
302 303 304 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 302 def account_sid @properties['account_sid'] end |
#codec ⇒ Codec
362 363 364 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 362 def codec @properties['codec'] end |
#container_format ⇒ Format
356 357 358 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 356 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
293 294 295 296 297 298 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 293 def context unless @instance_context @instance_context = RecordingContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
314 315 316 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 314 def date_created @properties['date_created'] end |
#delete ⇒ Boolean
Delete the RecordingInstance
411 412 413 414 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 411 def delete context.delete end |
#duration ⇒ String
350 351 352 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 350 def duration @properties['duration'] end |
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance
419 420 421 422 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 419 def fetch context.fetch end |
#grouping_sids ⇒ Hash
368 369 370 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 368 def grouping_sids @properties['grouping_sids'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
433 434 435 436 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 433 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RecordingInstance #{values}>" end |
#links ⇒ Hash
404 405 406 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 404 def links @properties['links'] end |
#media_external_location ⇒ String
386 387 388 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 386 def media_external_location @properties['media_external_location'] end |
#offset ⇒ String
380 381 382 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 380 def offset @properties['offset'] end |
#sid ⇒ String
320 321 322 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 320 def sid @properties['sid'] end |
#size ⇒ String
332 333 334 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 332 def size @properties['size'] end |
#source_sid ⇒ String
326 327 328 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 326 def source_sid @properties['source_sid'] end |
#status ⇒ Status
308 309 310 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 308 def status @properties['status'] end |
#status_callback ⇒ String
392 393 394 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 392 def status_callback @properties['status_callback'] end |
#status_callback_method ⇒ String
398 399 400 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 398 def status_callback_method @properties['status_callback_method'] end |
#to_s ⇒ Object
Provide a user friendly representation
426 427 428 429 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 426 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RecordingInstance #{values}>" end |
#track_name ⇒ String
374 375 376 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 374 def track_name @properties['track_name'] end |
#type ⇒ Type
344 345 346 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 344 def type @properties['type'] end |
#url ⇒ String
338 339 340 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 338 def url @properties['url'] end |