-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp_test.go
80 lines (70 loc) · 1.49 KB
/
app_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
package huawei
import (
"fmt"
"testing"
)
func TestGetAppDetail(t *testing.T) {
client, err := NewHuaweiClientWithEnv()
if err != nil {
t.Log(err)
}
params := &GetAppDetailParams{
AppID: "100582595",
}
app, _, err := client.GetAppDetail(params)
if err != nil {
t.Log(err)
}
fmt.Println(app.Ret.Code)
}
func TestGetAppId(t *testing.T) {
client, err := NewHuaweiClientWithEnv()
if err != nil {
t.Log(err)
}
params := &GetAppIdParams{
PackageName: "com.gengcon.android.jxc",
}
appIdsRes, _, err := client.GetAppId(params)
if err != nil {
t.Log(err)
}
fmt.Println(appIdsRes.AppIds)
}
func TestSubmitWithDownload(t *testing.T) {
client, err := NewHuaweiClientWithEnv()
if err != nil {
t.Log(err)
}
params := &SubmitWithDownloadParams{
DownloadFileName: "com.gengcon.android.bsydy_1.1.0_4.apk",
DownloadURL: "https://oss.niimbot.com/pugna/com.gengcon.android.bsydy_1.1.0_4.apk",
RequestId: client.clientID,
}
query := &AppIdParams{
AppId: "101650277",
}
res, _, err := client.SubmitWithDownload(query, params)
if err != nil {
t.Log(err)
}
fmt.Println(res)
}
func TestUpdateLangDescription(t *testing.T) {
client, err := NewHuaweiClientWithEnv()
if err != nil {
t.Log(err)
}
params := &UpdateLangDescriptionParams{
Lang: "zh-CN",
NewFeatures: "更新一个心的版本",
}
query := &AppIdParams{
AppId: "101650277",
}
res, _, err := client.UpdateLangDescription(query, params)
if err != nil {
t.Log(err)
}
fmt.Println(res)
}