-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
33 lines (28 loc) · 665 Bytes
/
main.go
File metadata and controls
33 lines (28 loc) · 665 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"net/http"
"github.com/wheatsliu/reng/pkg/logger"
"github.com/wheatsliu/reng/pkg/twitter"
)
var defaultCookies = map[string]*http.Cookie{}
var defaultAccount = &twitter.Account{
UserName: "xxxxxxx",
Password: "xxxxxxx",
Email: "",
PrivateKey: "xxxxxxx",
Cookies: defaultCookies,
}
func main() {
cli, err := twitter.NewTwitterClient(defaultAccount)
if err != nil {
panic(err)
}
query := &twitter.TimeLineReqVariables{
UserID: "172200213",
}
resp, err := cli.GetUserTweets(query)
if err != nil {
logger.Error("GetUserTweets", logger.Errorv(err))
}
logger.Info("GetUserTweets", logger.Any("resp", resp))
}