forked from binarywang/WxJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWxOpenMaEmbeddedService.java
More file actions
133 lines (117 loc) · 4.07 KB
/
WxOpenMaEmbeddedService.java
File metadata and controls
133 lines (117 loc) · 4.07 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
package me.chanjar.weixin.open.api;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.open.bean.result.WxOpenMaEmbeddedListResult;
/**
* 半屏小程序管理服务
* <pre>
* <a href="https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/embedded-management/addEmbedded.html">半屏小程序管理</a>
* </pre>
*
* @author Yuan
* @version 1.0.0
* @date 2024-12-04 16:55:19
*/
public interface WxOpenMaEmbeddedService {
/**
* 添加半屏小程序
* <pre>
* 本接口用于添加半屏小程序
* </pre>
*/
String API_ADD_EMBEDDED = "https://api.weixin.qq.com/wxaapi/wxaembedded/add_embedded";
/**
* 删除半屏小程序
* <pre>
* 用本接口可以删除已经获得授权调用的半屏小程序
* 说明:通过add_embedded接口添加半屏小程序后,可通过当前接口删除已经添加到半屏小程序列表的小程序
* </pre>
*/
String API_DELETE_EMBEDDED = "https://api.weixin.qq.com/wxaapi/wxaembedded/del_embedded";
/**
* 获取半屏小程序调用列表
* <pre>
* 调用本接口可以获取半屏小程序调用列表
* 说明:通过addEmbedded接口添加半屏小程序后,可通过当前接口获取半屏小程序调用列表
* </pre>
*/
String API_GET_EMBEDDED_LIST = "https://api.weixin.qq.com/wxaapi/wxaembedded/get_list";
/**
* 取消授权小程序
* <pre>
* 调用本接口可以取消已经授权的小程序
* 说明:可通过get_own_list接口获取当前半屏小程序已经授权的小程序列表,可通过当前接口取消对某个小程序的调用权限
* </pre>
*/
String API_DELETE_AUTHORIZED_EMBEDDED = "https://api.weixin.qq.com/wxaapi/wxaembedded/del_authorize";
/**
* 获取半屏小程序授权列表
* <pre>
* 调用本接口可以获取半屏小程序授权列表
* 说明:一个半屏小程序可授权给1000个小程序调用,通过该接口可获取已经授权的小程序列表
* </pre>
*/
String API_GET_OWN_LIST = "https://api.weixin.qq.com/wxaapi/wxaembedded/get_own_list";
/**
* 设置授权方式
*/
String API_SET_AUTHORIZED_EMBEDDED = "https://api.weixin.qq.com/wxaapi/wxaembedded/set_authorize";
/**
* 添加半屏小程序
*
* @param embeddedAppId 半屏小程序appId
* @param applyReason 申请理由
* @author Yuan
* @date 2024-12-04 17:33:33
*/
void addEmbedded(String embeddedAppId, String applyReason) throws WxErrorException;
/**
* 删除半屏小程序
*
* @param embeddedAppId 半屏小程序appId
* @author Yuan
* @date 2024-12-04 17:33:33
*/
void deleteEmbedded(String embeddedAppId) throws WxErrorException;
/**
* 获取半屏小程序调用列表
*
* @return {@link WxOpenMaEmbeddedListResult }
* @author Yuan
* @date 2024-12-04 17:33:33
*/
WxOpenMaEmbeddedListResult getEmbeddedList() throws WxErrorException;
/**
* 取消授权小程序
*
* @param embeddedAppId 半屏小程序appId
* @author Yuan
* @date 2024-12-04 17:33:33
*/
void deleteAuthorizedEmbedded(String embeddedAppId) throws WxErrorException;
/**
* 获取半屏小程序授权列表,默认分页起始值为0,一次拉取最大值为1000
*
* @return {@link WxOpenMaEmbeddedListResult }
* @author Yuan
* @date 2024-12-04 17:33:33
*/
WxOpenMaEmbeddedListResult getOwnList() throws WxErrorException;
/**
* 获取半屏小程序授权列表
*
* @param start 分页起始值 ,默认值为0
* @param num 一次拉取最大值,最大 1000,默认值为10
* @return {@link WxOpenMaEmbeddedListResult }
* @author Yuan
* @date 2024-12-04 17:33:33
*/
WxOpenMaEmbeddedListResult getOwnList(Integer start, Integer num) throws WxErrorException;
/**
* 设置授权方式
*
* @param flag 半屏小程序授权方式。0表示需要管理员验证;1表示自动通过;2表示自动拒绝。
* @author Yuan
* @date 2024-12-04 17:33:33
*/
void setAuthorizedEmbedded(Integer flag) throws WxErrorException;
}