Sha256: 5929f2f9b1b76343ffb2ca439d6760aa91c7f7f64299e71891622ce7a4d47980
Contents?: true
Size: 602 Bytes
Versions: 2
Compression:
Stored size: 602 Bytes
Contents
module Twilio #The Connection class caches the Twilio API base path and authentication credentials. #It is passed into the constructor of other TwilioObject's, avoiding the need to #explicitly set credentials with each API call. # # Example: # c = Twilio::Connection.new('my_twilio_sid', 'my_auth_token') class Connection include HTTParty TWILIO_URL = "https://api.twilio.com/2008-08-01/Accounts" def initialize(account_sid, auth_token) self.class.base_uri "#{TWILIO_URL}/#{account_sid}" self.class.basic_auth account_sid, auth_token end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
webficient-twilio-1.0.0 | lib/twilio/connection.rb |
webficient-twilio-1.2.0 | lib/twilio/connection.rb |