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
209 210 211 212 213 214 215 216 217 218 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 209 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Recordings/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the RecordingInstance
222 223 224 225 226 227 228 229 230 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 222 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
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 235 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
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 254 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
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 273 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
305 306 307 308 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 305 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.RecordingContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
298 299 300 301 |
# File 'lib/twilio-ruby/rest/video/v1/recording.rb', line 298 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.RecordingContext #{context}>" end |