lib/twilio/recording.rb in twilio-1.4.0 vs lib/twilio/recording.rb in twilio-2.3.0
- old
+ new
@@ -1,21 +1,24 @@
module Twilio
# Recordings are generated when you use the Record Verb. Those recordings are
# hosted on Twilio's REST API for you to access.
+ # Example:
+ # Twilio.connect('my_twilio_sid', 'my_auth_token')
+ # Twilio::Recording.list
class Recording < TwilioObject
def list(optional = {})
- self.connection.class.get("/Recordings", :query => optional)
+ Twilio.get("/Recordings", :query => optional)
end
def get(recording_sid)
- self.connection.class.get("/Recordings/#{recording_sid}")
+ Twilio.get("/Recordings/#{recording_sid}")
end
def delete(recording_sid)
- self.connection.class.delete("/Recordings/#{recording_sid}")
+ Twilio.delete("/Recordings/#{recording_sid}")
end
def transcriptions(recording_sid, transcription_sid = nil)
- self.connection.class.get("/Recordings/#{recording_sid}/Transcriptions#{ '/' + transcription_sid if transcription_sid }")
+ Twilio.get("/Recordings/#{recording_sid}/Transcriptions#{ '/' + transcription_sid if transcription_sid }")
end
end
end
\ No newline at end of file