Module: Twilio
- Includes:
- HTTParty
- Defined in:
- lib/twilio.rb,
lib/twilio/sms.rb,
lib/twilio/call.rb,
lib/twilio/verb.rb,
lib/twilio/account.rb,
lib/twilio/version.rb,
lib/twilio/recording.rb,
lib/twilio/conference.rb,
lib/twilio/notification.rb,
lib/twilio/twilio_object.rb,
lib/twilio/outgoing_caller_id.rb,
lib/twilio/incoming_phone_number.rb,
lib/twilio/available_phone_numbers.rb
Defined Under Namespace
Classes: Account, AvailablePhoneNumbers, Call, Conference, IncomingPhoneNumber, Notification, OutgoingCallerId, Recording, Sms, TwilioObject, Verb
Constant Summary collapse
- TWILIO_URL =
"https://api.twilio.com/2010-04-01/Accounts"
- SSL_CA_PATH =
"/etc/ssl/certs"
- VERSION =
"3.1.1"
Class Method Summary collapse
-
.connect(account_sid, auth_token) ⇒ Object
The connect method caches your Twilio account id and authentication token Example: Twilio.connect(‘AC309475e5fede1b49e100272a8640f438’, ‘3a2630a909aadbf60266234756fb15a0’).
Class Method Details
.connect(account_sid, auth_token) ⇒ Object
The connect method caches your Twilio account id and authentication token Example:
Twilio.connect('AC309475e5fede1b49e100272a8640f438', '3a2630a909aadbf60266234756fb15a0')
47 48 49 50 51 |
# File 'lib/twilio.rb', line 47 def self.connect(account_sid, auth_token) self.base_uri "#{TWILIO_URL}/#{account_sid}" self.basic_auth account_sid, auth_token self.[:ssl_ca_path] ||= SSL_CA_PATH unless self.[:ssl_ca_file] end |