-
Notifications
You must be signed in to change notification settings - Fork 15
/
statuses_test.go
89 lines (79 loc) · 1.88 KB
/
statuses_test.go
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package weigo
import (
"testing"
"time"
)
var api *APIClient
type Times struct {
time.Time
}
func init() {
if api == nil {
api = NewAPIClient("3231340587", "702b4bcc6d56961f569943ecee1a76f4", "https://api.weibo.com/oauth2/default.html", "token")
api.SetAccessToken("2.00VBqgvCZS4gWDb3940dd56eFfitSB", 1542004259)
}
}
func Test_GET_statuses_user_timeline(t *testing.T) {
t.SkipNow()
kws := map[string]interface{}{
"mid": "yybyOssa9",
"type": 1,
"isBase62": 1,
}
var result string
err := api.GET_statuses_queryid(kws, &result)
debugCheckError(err)
debugPrintln(result)
// fmt.Println(result)
}
func Test_GET_statuses_home_timeline(t *testing.T) {
t.SkipNow()
kws := map[string]interface{}{
"uid": "2684726573",
}
result := new(Statuses)
err := api.GET_statuses_home_timeline(kws, result)
debugCheckError(err)
// debugPrintln(len(*result.Statuses))
// fmt.Println(result.Statuses)
}
func Test_GET_statuses_repost_timeline(t *testing.T) {
t.SkipNow()
kws := map[string]interface{}{
"id": "3551749023600582",
}
result := new(Reposts)
err := api.GET_statuses_repost_timeline(kws, result)
debugCheckError(err)
debugPrintln(len(*result.Reposts))
}
func Test_POST_statuses_repost(t *testing.T) {
t.SkipNow()
kws := map[string]interface{}{
"id": "3551749023600582",
}
result := new(Status)
err := api.POST_statuses_repost(kws, result)
debugCheckError(err)
debugPrintln(*result)
}
func Test_POST_statuses_update(t *testing.T) {
t.SkipNow()
kws := map[string]interface{}{
"status": "Testing...Testing...",
}
result := new(Status)
err := api.POST_statuses_update(kws, result)
debugCheckError(err)
debugPrintln(*result)
}
func Test_POST_statuses_destory(t *testing.T) {
t.SkipNow()
kws := map[string]interface{}{
"id": "3592749137795387",
}
result := new(Status)
err := api.POST_statuses_destroy(kws, result)
debugCheckError(err)
debugPrintln(*result)
}