Fix build errors
This commit is contained in:
parent
d81fae0013
commit
529c181397
@ -136,7 +136,7 @@ func create_dummy_tweet() scraper.Tweet {
|
||||
|
||||
return scraper.Tweet{
|
||||
ID: tweet_id,
|
||||
UserID: scraper.UserID("-1"),
|
||||
UserID: -1,
|
||||
Text: "text",
|
||||
PostedAt: time.Now().Truncate(1e9), // Round to nearest second
|
||||
NumLikes: 1,
|
||||
|
@ -77,7 +77,7 @@ func (api API) GetMoreTweets(user_id UserID, response *TweetResponse, max_tweets
|
||||
|
||||
func (api API) GetTweet(id TweetID, cursor string) (TweetResponse, error) {
|
||||
client := &http.Client{Timeout: 10 * time.Second}
|
||||
req, err := http.NewRequest("GET", fmt.Sprintf("%s%d.json", API_CONVERSATION_BASE_PATH, id), nil)
|
||||
req, err := http.NewRequest("GET", fmt.Sprintf("%s%s.json", API_CONVERSATION_BASE_PATH, id), nil)
|
||||
if err != nil {
|
||||
return TweetResponse{}, err
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ func TestParseSingleRetweet(t *testing.T) {
|
||||
if retweet.TweetID != "1404269989646028804" {
|
||||
t.Errorf("Expected %q, got %q", "1404269989646028804", retweet.TweetID)
|
||||
}
|
||||
expected_id = 44067298
|
||||
expected_id := 44067298
|
||||
if retweet.RetweetedByID != scraper.UserID(expected_id) {
|
||||
t.Errorf("Expected %d, got %d", expected_id, retweet.RetweetedByID)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user