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

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/video/v1/room/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.



159
160
161
162
163
164
165
166
167
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 159

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



171
172
173
174
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 171

def delete

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

#fetchRoomRecordingInstance

Fetch the RoomRecordingInstance

Returns:



179
180
181
182
183
184
185
186
187
188
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 179

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



200
201
202
203
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 200

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

#to_sObject

Provide a user friendly representation



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

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