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 |
# File 'lib/pardot/authentication.rb', line 4 def authenticate resp = post "login", nil, :email => @email, :password => @password, :user_key => @user_key @api_key = resp["api_key"] end |
#authenticated? ⇒ Boolean
9 10 11 |
# File 'lib/pardot/authentication.rb', line 9 def authenticated? @api_key != nil end |
#reauthenticate ⇒ Object
13 14 15 16 |
# File 'lib/pardot/authentication.rb', line 13 def reauthenticate @api_key = nil authenticate end |