Module: Pardot::Authentication
- Included in:
- Client
- Defined in:
- lib/pardot/authentication.rb
Instance Method Summary collapse
Instance Method Details
#authenticate ⇒ Object
4 5 6 7 8 |
# File 'lib/pardot/authentication.rb', line 4 def authenticate resp = post "login", nil, nil, nil, :email => @email, :password => @password, :user_key => @user_key update_version(resp["version"]) if resp && resp["version"] @api_key = resp && resp["api_key"] end |
#authenticated? ⇒ Boolean
10 11 12 |
# File 'lib/pardot/authentication.rb', line 10 def authenticated? @api_key != nil end |
#reauthenticate ⇒ Object
14 15 16 17 |
# File 'lib/pardot/authentication.rb', line 14 def reauthenticate @api_key = nil authenticate end |