Sha256: aad1ecad69170f173f0037fd0cccc5411a525eacab764e1616c28690e759bc86

Contents?: true

Size: 819 Bytes

Versions: 2

Compression:

Stored size: 819 Bytes

Contents

module Twilio
  class Call < TwilioObject
    def make(caller, called, url, optional = {})
      self.connection.class.post("/Calls", :body => {:Caller => caller, :Called => called, :Url => url}.merge(optional))
    end

    def list(optional = {})
      self.connection.class.get("/Calls", :query => optional)  
    end
        
    def get(call_sid)
      self.connection.class.get("/Calls/#{call_sid}")  
    end
    
    def segments(call_sid, call_segment_sid = nil)
      self.connection.class.get("/Calls/#{call_sid}/Segments#{ '/' + call_segment_sid if call_segment_sid }")
    end
    
    def recordings(call_sid)
      self.connection.class.get("/Calls/#{call_sid}/Recordings")
    end
    
    def notifications(call_sid)
      self.connection.class.get("/Calls/#{call_sid}/Notifications")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webficient-twilio-1.0.0 lib/twilio/call.rb
webficient-twilio-1.2.0 lib/twilio/call.rb