added scheduling & media upload

This commit is contained in:
Valentine 2024-03-09 03:55:39 +03:00
parent f5c1694211
commit 3c23a975da
7 changed files with 431 additions and 7 deletions

View file

@ -5,6 +5,8 @@ import (
"fmt"
"testing"
"time"
twitterscraper "github.com/imperatrona/twitter-scraper"
)
func TestFetchScheduledTweets(t *testing.T) {
@ -27,7 +29,12 @@ func TestCreateScheduledTweets(t *testing.T) {
t.Skip("Skipping test due to environment variable")
}
var err error
id, err = testScraper.CreateScheduledTweet("new tweet", time.Now().Add(time.Hour*24*31))
id, err = testScraper.CreateScheduledTweet(twitterscraper.TweetSchedule{
Text: "new tweet",
Date: time.Now().Add(time.Hour * 24 * 31),
Medias: nil,
})
if err != nil {
t.Error(err)
}