Module: Eztexting

Includes:
HTTParty
Defined in:
lib/eztexting.rb,
lib/eztexting/sms.rb,
lib/eztexting/base.rb,
lib/eztexting/voice.rb,
lib/eztexting/lookup.rb,
lib/eztexting/credits.rb,
lib/eztexting/keywords.rb,
lib/eztexting/availablity.rb

Defined Under Namespace

Classes: Availability, Base, Credits, Keywords, Lookup, Sms, Voice

Class Method Summary collapse

Class Method Details

.connect!(username, password) ⇒ Object

Sets up the connection that the other classes use to be able communicate with the api



15
16
17
18
19
20
21
22
23
# File 'lib/eztexting.rb', line 15

def self.connect!(username,password)
  # HTTParty Method to store base url
  self.base_uri "https://app.eztexting.com/api"
  
  # Catch the username and password for use in all calls
  @username = username
  @password  = password 
  puts "credentials cached"
end

.credentialsObject



25
26
27
# File 'lib/eztexting.rb', line 25

def self.credentials
  {:user => @username, :pass => @password}
end