Module: PintrestApi::Authentication
- Included in:
- Pin
- Defined in:
- lib/pintrest_api/authentication.rb
Overview
Pintrest Boards this is used to fetch boards and related pins
Constant Summary collapse
- EMAIL_INPUT_CSS =
'.loginUsername input'- PASSWORD_INPUT_CSS =
'.loginPassword input'- LOGIN_PAGE_BUTTON_CSS =
'.formFooter .formFooterButtons'- PINTREST_LOGIN_URL =
'https://www.pinterest.com/login/'
Instance Attribute Summary collapse
-
#is_logged_in ⇒ Object
Returns the value of attribute is_logged_in.
Instance Method Summary collapse
Instance Attribute Details
#is_logged_in ⇒ Object
Returns the value of attribute is_logged_in.
4 5 6 |
# File 'lib/pintrest_api/authentication.rb', line 4 def is_logged_in @is_logged_in end |
Instance Method Details
#login(authentication) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/pintrest_api/authentication.rb', line 11 def login(authentication) visit PINTREST_LOGIN_URL @session.find(EMAIL_INPUT_CSS).set authentication[:email] @session.find(PASSWORD_INPUT_CSS).set authentication[:password] click LOGIN_PAGE_BUTTON_CSS sleep 5 puts 'Finished logging in' end |