add GetTweetReplies method
This commit is contained in:
parent
e053917d34
commit
f86a0ea59d
6 changed files with 232 additions and 7 deletions
29
replies_test.go
Normal file
29
replies_test.go
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
package twitterscraper_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
twitterscraper "github.com/imperatrona/twitter-scraper"
|
||||
)
|
||||
|
||||
func TestGetReplies(t *testing.T) {
|
||||
if skipAuthTest {
|
||||
t.Skip("Skipping test due to environment variable")
|
||||
}
|
||||
|
||||
tweetId := "1697304622749086011"
|
||||
|
||||
tweets, cursors, err := testScraper.GetTweetReplies(tweetId, "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if len(tweets) < 2 {
|
||||
t.Fatal("Less than 2 tweets returned")
|
||||
}
|
||||
|
||||
if len(cursors) < 1 {
|
||||
t.Fatal("No cursors returned")
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue