提交 | 用户 | age
|
826b66
|
1 |
package com.hx.api; |
C |
2 |
|
|
3 |
import com.alibaba.fastjson.JSONObject; |
|
4 |
import com.dtflys.forest.annotation.DataVariable; |
|
5 |
import com.dtflys.forest.annotation.JSONBody; |
|
6 |
import com.dtflys.forest.annotation.Post; |
|
7 |
|
|
8 |
/** |
|
9 |
* 企业微信微盘接口API |
|
10 |
* @Author: cmg |
|
11 |
* @Date: 2023-7-13 11:08 |
|
12 |
*/ |
|
13 |
public interface CorpMpSpaceApi { |
|
14 |
|
|
15 |
/** |
|
16 |
* 增加空间 |
|
17 |
* @param accessToken |
|
18 |
* @param param |
|
19 |
* @return |
|
20 |
*/ |
|
21 |
@Post( |
|
22 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_create?access_token=${accessToken}", |
|
23 |
headers = { |
|
24 |
"Content-Type: application/json" |
|
25 |
} |
|
26 |
) |
|
27 |
JSONObject addSpace(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
28 |
|
|
29 |
/** |
|
30 |
* 重命名空间 |
|
31 |
* @param accessToken |
|
32 |
* @param param |
|
33 |
* @return |
|
34 |
*/ |
|
35 |
@Post( |
|
36 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_rename?access_token=${accessToken}", |
|
37 |
headers = { |
|
38 |
"Content-Type: application/json" |
|
39 |
} |
|
40 |
) |
|
41 |
JSONObject renameSpace(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
42 |
|
|
43 |
/** |
|
44 |
* 解散空间 |
|
45 |
* @param accessToken |
|
46 |
* @param param |
|
47 |
* @return |
|
48 |
*/ |
|
49 |
@Post( |
|
50 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_dismiss?access_token=${accessToken}", |
|
51 |
headers = { |
|
52 |
"Content-Type: application/json" |
|
53 |
} |
|
54 |
) |
|
55 |
JSONObject dismissSpace(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
56 |
|
|
57 |
/** |
|
58 |
* 空间安全设置 |
|
59 |
* @param accessToken |
|
60 |
* @param param |
|
61 |
* @return |
|
62 |
*/ |
|
63 |
@Post( |
|
64 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_setting?access_token=${accessToken}", |
|
65 |
headers = { |
|
66 |
"Content-Type: application/json" |
|
67 |
} |
|
68 |
) |
|
69 |
JSONObject spaceSetting(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
70 |
|
|
71 |
/** |
|
72 |
* 新建文件夹/文档 |
|
73 |
* @param accessToken |
|
74 |
* @param param |
|
75 |
* @return |
|
76 |
*/ |
|
77 |
@Post( |
|
78 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_create?access_token=${accessToken}", |
|
79 |
headers = { |
|
80 |
"Content-Type: application/json" |
|
81 |
} |
|
82 |
) |
|
83 |
JSONObject createFile(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
84 |
|
|
85 |
/** |
|
86 |
* 文件重命名 |
|
87 |
* @param accessToken |
|
88 |
* @param param |
|
89 |
* @return |
|
90 |
*/ |
|
91 |
@Post( |
|
92 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_rename?access_token=${accessToken}", |
|
93 |
headers = { |
|
94 |
"Content-Type: application/json" |
|
95 |
} |
|
96 |
) |
|
97 |
JSONObject renameFile(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
98 |
|
|
99 |
/** |
|
100 |
* 移除文件 |
|
101 |
* @param accessToken |
|
102 |
* @param param |
|
103 |
* @return |
|
104 |
*/ |
|
105 |
@Post( |
|
106 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_delete?access_token=${accessToken}", |
|
107 |
headers = { |
|
108 |
"Content-Type: application/json" |
|
109 |
} |
|
110 |
) |
|
111 |
JSONObject deleteFile(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
112 |
|
|
113 |
/** |
|
114 |
* 分块上传初始化 |
|
115 |
* @param accessToken |
|
116 |
* @param param |
|
117 |
* @return |
|
118 |
*/ |
|
119 |
@Post( |
|
120 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_upload_init?access_token=${accessToken}", |
|
121 |
headers = { |
|
122 |
"Content-Type: application/json" |
|
123 |
} |
|
124 |
) |
|
125 |
JSONObject fileUploadInit(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
126 |
|
|
127 |
/** |
|
128 |
* 分块上传文件 |
|
129 |
* @param accessToken |
|
130 |
* @param param |
|
131 |
* @return |
|
132 |
*/ |
|
133 |
@Post( |
|
134 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_upload_part?access_token=${accessToken}", |
|
135 |
headers = { |
|
136 |
"Content-Type: application/json" |
|
137 |
} |
|
138 |
) |
|
139 |
JSONObject fileUploadPart(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
140 |
|
|
141 |
/** |
|
142 |
* 分块上传完成 |
|
143 |
* @param accessToken |
|
144 |
* @param param |
|
145 |
* @return |
|
146 |
*/ |
|
147 |
@Post( |
|
148 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_upload_finish?access_token=${accessToken}", |
|
149 |
headers = { |
|
150 |
"Content-Type: application/json" |
|
151 |
} |
|
152 |
) |
|
153 |
JSONObject fileUploadFinish(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
154 |
|
|
155 |
/** |
|
156 |
* 上传文件 |
|
157 |
* @param accessToken |
|
158 |
* @param param |
|
159 |
* @return |
|
160 |
*/ |
|
161 |
@Post( |
|
162 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_upload?access_token=${accessToken}", |
|
163 |
headers = { |
|
164 |
"Content-Type: application/json" |
|
165 |
} |
|
166 |
) |
|
167 |
JSONObject fileUpload(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
168 |
|
|
169 |
/** |
|
170 |
* 删除文件 |
|
171 |
* @param accessToken |
|
172 |
* @param param |
|
173 |
* @return |
|
174 |
*/ |
|
175 |
@Post( |
|
176 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_delete?access_token=${accessToken}", |
|
177 |
headers = { |
|
178 |
"Content-Type: application/json" |
|
179 |
} |
|
180 |
) |
|
181 |
JSONObject fileDelete(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
182 |
|
|
183 |
/** |
|
184 |
* 获取下载路径 |
|
185 |
* @param accessToken |
|
186 |
* @param param |
|
187 |
* @return |
|
188 |
*/ |
|
189 |
@Post( |
|
190 |
url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_download?access_token=${accessToken}", |
|
191 |
headers = { |
|
192 |
"Content-Type: application/json" |
|
193 |
} |
|
194 |
) |
|
195 |
JSONObject getDownloadUrl(@DataVariable("accessToken") String accessToken, @JSONBody String param); |
|
196 |
} |