feat: allow to use specific open account

This commit is contained in:
Thalles 2023-10-08 22:01:10 -03:00
parent c8ad9a0410
commit ad4df95c0d

View file

@ -357,6 +357,13 @@ func (s *Scraper) LoginOpenAccount() (OpenAccount, error) {
return OpenAccount{}, fmt.Errorf("auth error: %v", "OpenAccount")
}
func (s *Scraper) WithOpenAccount(openAccount OpenAccount) {
s.oAuthToken = openAccount.OAuthToken
s.oAuthSecret = openAccount.OAuthTokenSecret
s.isLogged = true
s.isOpenAccount = true
}
// Logout is reset session
func (s *Scraper) Logout() error {
req, err := http.NewRequest("POST", logoutURL, nil)