FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
weworkapi_php/api/examples/BatchInviteTest.php at master · EternalSuno/weworkapi_php · GitHub
EternalSuno
/
weworkapi_php
Public
forked from
sbzhu/weworkapi_php
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
weworkapi_php
/
api
/
examples
/
BatchInviteTest.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (31 loc) · 1003 Bytes
Breadcrumbs
weworkapi_php
/
api
/
examples
/
BatchInviteTest.php
Copy path
File metadata and controls
36 lines (31 loc) · 1003 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<?php
/*
* Copyright (C) 2018 All rights reserved.
*
* @File BatchInviteTest.php
* @Brief
* @Author abelzhu, abelzhu@tencent.com
* @Version 1.0
* @Date 2018-01-02
*
*/
include_once
(
"
../src/CorpAPI.class.php
"
);
include_once
(
"
../src/ServiceCorpAPI.class.php
"
);
include_once
(
"
../src/ServiceProviderAPI.class.php
"
);
$
config
=
require
(
'
./config.php
'
);
// 需启用 "管理工具" -> "通讯录同步", 并使用该处的secret, 才能通过API管理通讯录
//
$
api
=
new
CorpAPI
(
$
config
[
'
CORP_ID
'
],
$
config
[
'
APP_SECRET
'
]);
try
{
//
$
invalidUserIdList
=
null
;
$
invalidPartyIdList
=
null
;
$
invalidTagIdList
=
null
;
$
api
->
BatchInvite
(
array
(
'
ZhuShengBen
'
,
'
abelzhu
'
,
'
userid_for_invite_test
'
),
array
(
1
,
2
,
111
),
array
(
1
,
222
),
$
invalidUserIdList
,
$
invalidPartyIdList
,
$
invalidTagIdList
);
var_dump
(
$
invalidUserIdList
);
var_dump
(
$
invalidPartyIdList
);
var_dump
(
$
invalidTagIdList
);
}
catch
(
Exception
$
e
) {
echo
$
e
->
getMessage
() .
"\n"
;
}
Back
|
FazBrowse Home
|
New Git URL