lib/twilio-ruby/rest/media/v1.rb in twilio-ruby-5.65.0 vs lib/twilio-ruby/rest/media/v1.rb in twilio-ruby-5.65.1

- old
+ new

@@ -14,10 +14,11 @@ # Initialize the V1 version of Media def initialize(domain) super @version = 'v1' @media_processor = nil + @media_recording = nil @player_streamer = nil end ## # @param [String] sid The SID of the MediaProcessor resource to fetch. @@ -29,9 +30,24 @@ end if sid == :unset @media_processor ||= MediaProcessorList.new self else MediaProcessorContext.new(self, sid) + end + end + + ## + # @param [String] sid The SID of the MediaRecording resource to fetch. + # @return [Twilio::REST::Media::V1::MediaRecordingContext] if sid was passed. + # @return [Twilio::REST::Media::V1::MediaRecordingList] + def media_recording(sid=:unset) + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + end + if sid == :unset + @media_recording ||= MediaRecordingList.new self + else + MediaRecordingContext.new(self, sid) end end ## # @param [String] sid The SID of the PlayerStreamer resource to fetch. \ No newline at end of file