Total refactoring
Used guest frontend API BREAKING CHANGE: remove tweet.HTML property Loading more information Minor fixes and changes
This commit is contained in:
parent
1c582e142e
commit
edad8f6393
15 changed files with 628 additions and 497 deletions
24
api_test.go
Normal file
24
api_test.go
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
package twitterscraper
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetGuestToken(t *testing.T) {
|
||||
if err := GetGuestToken(); err != nil {
|
||||
t.Errorf("getGuestToken() error = %v", err)
|
||||
}
|
||||
if guestToken == "" {
|
||||
t.Error("Expected non-empty guestToken")
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetUserIDByScreenName(t *testing.T) {
|
||||
userID, err := GetUserIDByScreenName("Twitter")
|
||||
if err != nil {
|
||||
t.Errorf("getUserByScreenName() error = %v", err)
|
||||
}
|
||||
if userID == "" {
|
||||
t.Error("Expected non-empty user ID")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue