Module: Twilio

Includes:
HTTParty
Defined in:
lib/twilio/sms.rb,
lib/twilio/call.rb,
lib/twilio/verb.rb,
lib/twilio/account.rb,
lib/twilio/recording.rb,
lib/twilio/conference.rb,
lib/twilio/connection.rb,
lib/twilio/notification.rb,
lib/twilio/twilio_object.rb,
lib/twilio/local_phone_number.rb,
lib/twilio/outgoing_caller_id.rb,
lib/twilio/incoming_phone_number.rb,
lib/twilio/toll_free_phone_number.rb

Defined Under Namespace

Classes: Account, Call, Conference, Connection, IncomingPhoneNumber, LocalPhoneNumber, Notification, OutgoingCallerId, Recording, Sms, TollFreePhoneNumber, TwilioObject, Verb

Constant Summary collapse

TWILIO_URL =
"https://api.twilio.com/2010-04-01/Accounts"

Class Method Summary collapse

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')

8
9
10
11
# File 'lib/twilio/connection.rb', line 8

def self.connect(, auth_token)
  self.base_uri "#{TWILIO_URL}/#{}"
  self.basic_auth , auth_token
end