Class: Twilio::REST::Video::V1::RecordingContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Video::V1::RecordingContext
- Defined in:
- lib/twilio-ruby/rest/video/v1/recording.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the RecordingInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the RecordingInstanceMetadata.
-
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance.
-
#fetch_with_metadata ⇒ RecordingInstance
Fetch the RecordingInstanceMetadata.
-
#initialize(version, sid) ⇒ RecordingContext
constructor
Initialize the RecordingContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ RecordingContext
Initialize the RecordingContext
217 218 219 220 221 222 223 224 225 226 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 217 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Recordings/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the RecordingInstance
230 231 232 233 234 235 236 237 238 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 230 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#delete_with_metadata ⇒ Boolean
Delete the RecordingInstanceMetadata
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 243 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) recording_instance = RecordingInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) RecordingInstanceMetadata.new(@version, recording_instance, response.headers, response.status_code) end |
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 262 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) RecordingInstance.new( @version, payload, sid: @solution[:sid], ) end |
#fetch_with_metadata ⇒ RecordingInstance
Fetch the RecordingInstanceMetadata
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 281 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) recording_instance = RecordingInstance.new( @version, response.body, sid: @solution[:sid], ) RecordingInstanceMetadata.new( @version, recording_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
313 314 315 316 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 313 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.RecordingContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
306 307 308 309 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 306 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.RecordingContext #{context}>" end |