Class: Twilio::REST::Video::V1::RoomContext::RoomRecordingContext

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/video/v1/room/recording.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, room_sid, sid) ⇒ RoomRecordingContext

Initialize the RoomRecordingContext

Parameters:

  • version (Version)

    Version that contains the resource

  • room_sid (String)

    The SID of the Room resource with the recording to fetch.

  • sid (String)

    The SID of the RoomRecording resource to fetch.


191
192
193
194
195
196
197
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 191

def initialize(version, room_sid, sid)
  super(version)

  # Path Solution
  @solution = {room_sid: room_sid, sid: sid, }
  @uri = "/Rooms/#{@solution[:room_sid]}/Recordings/#{@solution[:sid]}"
end

Instance Method Details

#deleteBoolean

Delete the RoomRecordingInstance

Returns:

  • (Boolean)

    true if delete succeeds, false otherwise


211
212
213
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 211

def delete
   @version.delete('DELETE', @uri)
end

#fetchRoomRecordingInstance

Fetch the RoomRecordingInstance

Returns:


202
203
204
205
206
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 202

def fetch
  payload = @version.fetch('GET', @uri)

  RoomRecordingInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid], )
end

#inspectObject

Provide a detailed, user friendly representation


224
225
226
227
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 224

def inspect
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
  "#<Twilio.Video.V1.RoomRecordingContext #{context}>"
end

#to_sObject

Provide a user friendly representation


217
218
219
220
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 217

def to_s
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
  "#<Twilio.Video.V1.RoomRecordingContext #{context}>"
end