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.



164
165
166
167
168
169
170
171
172
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 164

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



176
177
178
179
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 176

def delete

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

#fetchRoomRecordingInstance

Fetch the RoomRecordingInstance

Returns:



184
185
186
187
188
189
190
191
192
193
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 184

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



205
206
207
208
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 205

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

#to_sObject

Provide a user friendly representation



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

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