class Twilio::REST::Video::V1::RecordingInstance

Public Class Methods

new(version, payload, sid: nil) click to toggle source

Initialize the RecordingInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The SID of the Recording resource to fetch. @return [RecordingInstance] RecordingInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/video/v1/recording.rb
256 def initialize(version, payload, sid: nil)
257   super(version)
258 
259   # Marshaled Properties
260   @properties = {
261       'account_sid' => payload['account_sid'],
262       'status' => payload['status'],
263       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
264       'sid' => payload['sid'],
265       'source_sid' => payload['source_sid'],
266       'size' => payload['size'].to_i,
267       'url' => payload['url'],
268       'type' => payload['type'],
269       'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
270       'container_format' => payload['container_format'],
271       'codec' => payload['codec'],
272       'grouping_sids' => payload['grouping_sids'],
273       'track_name' => payload['track_name'],
274       'offset' => payload['offset'].to_i,
275       'links' => payload['links'],
276   }
277 
278   # Context
279   @instance_context = nil
280   @params = {'sid' => sid || @properties['sid'], }
281 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/video/v1/recording.rb
296 def account_sid
297   @properties['account_sid']
298 end
codec() click to toggle source

@return [recording.Codec] The codec used to encode the track

    # File lib/twilio-ruby/rest/video/v1/recording.rb
356 def codec
357   @properties['codec']
358 end
container_format() click to toggle source

@return [recording.Format] The file format for the recording

    # File lib/twilio-ruby/rest/video/v1/recording.rb
350 def container_format
351   @properties['container_format']
352 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [RecordingContext] RecordingContext for this RecordingInstance

    # File lib/twilio-ruby/rest/video/v1/recording.rb
287 def context
288   unless @instance_context
289     @instance_context = RecordingContext.new(@version, @params['sid'], )
290   end
291   @instance_context
292 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/video/v1/recording.rb
308 def date_created
309   @properties['date_created']
310 end
delete() click to toggle source

Delete the RecordingInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/video/v1/recording.rb
394 def delete
395   context.delete
396 end
duration() click to toggle source

@return [String] The duration of the recording in seconds

    # File lib/twilio-ruby/rest/video/v1/recording.rb
344 def duration
345   @properties['duration']
346 end
fetch() click to toggle source

Fetch the RecordingInstance @return [RecordingInstance] Fetched RecordingInstance

    # File lib/twilio-ruby/rest/video/v1/recording.rb
387 def fetch
388   context.fetch
389 end
grouping_sids() click to toggle source

@return [Hash] A list of SIDs related to the recording

    # File lib/twilio-ruby/rest/video/v1/recording.rb
362 def grouping_sids
363   @properties['grouping_sids']
364 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/video/v1/recording.rb
407 def inspect
408   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
409   "<Twilio.Video.V1.RecordingInstance #{values}>"
410 end
offset() click to toggle source

@return [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

    # File lib/twilio-ruby/rest/video/v1/recording.rb
374 def offset
375   @properties['offset']
376 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/video/v1/recording.rb
314 def sid
315   @properties['sid']
316 end
size() click to toggle source

@return [String] The size of the recorded track, in bytes

    # File lib/twilio-ruby/rest/video/v1/recording.rb
326 def size
327   @properties['size']
328 end
source_sid() click to toggle source

@return [String] The SID of the recording source

    # File lib/twilio-ruby/rest/video/v1/recording.rb
320 def source_sid
321   @properties['source_sid']
322 end
status() click to toggle source

@return [recording.Status] The status of the recording

    # File lib/twilio-ruby/rest/video/v1/recording.rb
302 def status
303   @properties['status']
304 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/video/v1/recording.rb
400 def to_s
401   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
402   "<Twilio.Video.V1.RecordingInstance #{values}>"
403 end
track_name() click to toggle source

@return [String] The name that was given to the source track of the recording

    # File lib/twilio-ruby/rest/video/v1/recording.rb
368 def track_name
369   @properties['track_name']
370 end
type() click to toggle source

@return [recording.Type] The recording's media type

    # File lib/twilio-ruby/rest/video/v1/recording.rb
338 def type
339   @properties['type']
340 end
url() click to toggle source

@return [String] The absolute URL of the resource

    # File lib/twilio-ruby/rest/video/v1/recording.rb
332 def url
333   @properties['url']
334 end