-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathattendance_groups_test.go
74 lines (65 loc) · 1.77 KB
/
attendance_groups_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
package godingtalk
import (
"fmt"
"testing"
)
func TestOapiAttendanceGetsimplegroupsRequest(t *testing.T) {
resp, err := client.OapiAttendanceGetsimplegroupsRequest(0, 10)
if err != nil {
t.Fatal(err)
}
fmt.Println(resp)
}
func TestOapiAttendanceGroupMinimalismListRequest(t *testing.T) {
resp, err := client.OapiAttendanceGroupMinimalismListRequest("2749481918775803", 1)
if err != nil {
t.Fatal(err)
}
fmt.Println(resp)
}
func TestOapiAttendanceGroupSearchRequest(t *testing.T) {
resp, err := client.OapiAttendanceGroupSearchRequest("2749481918775803", "IT")
if err != nil {
t.Fatal(err)
}
fmt.Println(resp)
}
func TestOapiAttendanceGroupQueryRequest(t *testing.T) {
resp, err := client.OapiAttendanceGroupQueryRequest("2749481918775803", 358535036)
if err != nil {
t.Fatal(err)
}
fmt.Println(resp)
}
func TestOapiAttendanceGetusergroupRequest(t *testing.T) {
resp, err := client.OapiAttendanceGetusergroupRequest("2749481918775803")
if err != nil {
t.Fatal(err)
}
for _, v := range resp.Result.Classes {
for _, v2 := range v.Sections {
fmt.Println(v.Name, v.ClassID, v2.Times[0].CheckTime, v2.Times[1].CheckTime)
}
}
}
func TestOapiAttendanceGroupMemberListbyidsRequest(t *testing.T) {
resp, err := client.OapiAttendanceGroupMemberListbyidsRequest(
"2749481918775803",
[]string{"2749481918775803","04553731381000121",
"6927611729781291","02155716671265668",
"2617504507699370"}, 0, 358535036)
if err != nil {
t.Fatal(err)
}
fmt.Println(resp.Result)
}
func TestOapiAttendanceGroupMemberUpdateRequest(t *testing.T) {
// 没有权限。。
}
func TestOapiAttendanceGroupMemberListRequest(t *testing.T) {
resp, err := client.OapiAttendanceGroupMemberListRequest("2749481918775803", 0, 358535036)
if err != nil {
t.Fatal(err)
}
fmt.Println(resp)
}