-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Expand file tree
/
Copy pathWxCpAgentService.java
More file actions
70 lines (63 loc) · 2.23 KB
/
WxCpAgentService.java
File metadata and controls
70 lines (63 loc) · 2.23 KB
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
package me.chanjar.weixin.cp.api;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.cp.bean.WxCpAgent;
import me.chanjar.weixin.cp.bean.WxCpTpAdmin;
import java.util.List;
/**
* <pre>
* 管理企业号应用
* 文档地址:<a href="https://work.weixin.qq.com/api/doc#10087">...</a>
* Created by huansinho on 2018/4/13.
* </pre>
*
* @author <a href="https://github.com/huansinho">huansinho</a>
*/
public interface WxCpAgentService {
/**
* <pre>
* 获取企业号应用信息
* 该API用于获取企业号某个应用的基本信息,包括头像、昵称、账号类型、认证类型、可见范围等信息
* 详情请见: <a href="https://work.weixin.qq.com/api/doc#10087">...</a>
* </pre>
*
* @param agentId 企业应用的id
* @return wx cp agent
* @throws WxErrorException the wx error exception
*/
WxCpAgent get(Integer agentId) throws WxErrorException;
/**
* <pre>
* 设置应用.
* 仅企业可调用,可设置当前凭证对应的应用;第三方不可调用。
* 详情请见: <a href="https://work.weixin.qq.com/api/doc#10088">...</a>
* </pre>
*
* @param agentInfo 应用信息
* @throws WxErrorException the wx error exception
*/
void set(WxCpAgent agentInfo) throws WxErrorException;
/**
* <pre>
* 获取应用列表.
* 企业仅可获取当前凭证对应的应用;第三方仅可获取被授权的应用。
* 详情请见: <a href="https://work.weixin.qq.com/api/doc#11214">...</a>
* </pre>
*
* @return the list
* @throws WxErrorException the wx error exception
*/
List<WxCpAgent> list() throws WxErrorException;
/**
* <pre>
* 获取应用管理员列表
* 第三方服务商可以用此接口获取授权企业中某个第三方应用或者代开发应用的管理员列表(不包括外部管理员),
* 以便服务商在用户进入应用主页之后根据是否管理员身份做权限的区分。
* 详情请见: <a href="https://developer.work.weixin.qq.com/document/path/90506">文档</a>
* </pre>
*
* @param agentId 应用id
* @return admin list
* @throws WxErrorException the wx error exception
*/
WxCpTpAdmin getAdminList(Integer agentId) throws WxErrorException;
}