1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the overtrue/wechat. |
5
|
|
|
* |
6
|
|
|
* (c) overtrue <[email protected]> |
7
|
|
|
* |
8
|
|
|
* This source file is subject to the MIT license that is bundled |
9
|
|
|
* with this source code in the file LICENSE. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace EasyWeChat\Work\MsgAudit; |
13
|
|
|
|
14
|
|
|
use EasyWeChat\Kernel\BaseClient; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Class Client. |
18
|
|
|
* |
19
|
|
|
* @author ZengJJ <[email protected] > |
20
|
|
|
*/ |
21
|
|
|
class Client extends BaseClient |
22
|
|
|
{ |
23
|
|
|
/** |
24
|
|
|
* @param string|null $type |
25
|
|
|
* |
26
|
|
|
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string |
27
|
|
|
* |
28
|
|
|
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException |
29
|
|
|
*/ |
30
|
|
|
public function getPermitUsers(string $type = null) |
31
|
|
|
{ |
32
|
|
|
return $this->httpPostJson('cgi-bin/msgaudit/get_permit_user_list', (empty($type) ? [] : ['type' => $type])); |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @param array $info 数组,格式: [[userid, exteranalopenid], [userid, exteranalopenid]] |
37
|
|
|
* |
38
|
|
|
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string |
39
|
|
|
* |
40
|
|
|
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException |
41
|
|
|
*/ |
42
|
|
|
public function getSingleAgreeStatus(array $info) |
43
|
|
|
{ |
44
|
|
|
$params = [ |
45
|
|
|
'info' => $info |
46
|
|
|
]; |
47
|
|
|
|
48
|
|
|
return $this->httpPostJson('cgi-bin/msgaudit/check_single_agree', $params); |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @param string $roomid |
53
|
|
|
* |
54
|
|
|
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string |
55
|
|
|
* |
56
|
|
|
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException |
57
|
|
|
*/ |
58
|
|
|
public function getRoomAgreeStatus(string $roomId) |
59
|
|
|
{ |
60
|
|
|
$params = [ |
61
|
|
|
'roomid' => $roomId |
62
|
|
|
]; |
63
|
|
|
|
64
|
|
|
return $this->httpPostJson('cgi-bin/msgaudit/check_room_agree', $params); |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @param string $roomid |
69
|
|
|
* |
70
|
|
|
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string |
71
|
|
|
* |
72
|
|
|
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException |
73
|
|
|
*/ |
74
|
|
|
public function getRoom(string $roomId) |
75
|
|
|
{ |
76
|
|
|
$params = [ |
77
|
|
|
'roomid' => $roomId |
78
|
|
|
]; |
79
|
|
|
|
80
|
|
|
return $this->httpPostJson('cgi-bin/msgaudit/groupchat/get', $params); |
81
|
|
|
} |
82
|
|
|
} |
83
|
|
|
|