9
9
10
10
/**
11
11
* 企业微信微盘相关接口.
12
- * https://developer.work.weixin.qq.com/document/path/93654
12
+ * <a href=" https://developer.work.weixin.qq.com/document/path/93654">...</a>
13
13
*
14
14
* @author <a href="https://github.com/0katekate0">Wang_Wong</a> created on 2022-04-22
15
15
*/
@@ -20,7 +20,7 @@ public interface WxCpOaWeDriveService {
20
20
* 该接口用于在微盘内新建空间,可以指定人创建空间。
21
21
* <p>
22
22
* 请求方式:POST(HTTPS)
23
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_create?access_token=ACCESS_TOKEN
23
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_create?access_token=ACCESS_TOKEN">...</a>
24
24
*
25
25
* @param request 新建空间对应请求参数
26
26
* @return spaceid (空间id)
@@ -33,7 +33,7 @@ public interface WxCpOaWeDriveService {
33
33
* 该接口用于重命名已有空间,接收userid参数,以空间管理员身份来重命名。
34
34
* <p>
35
35
* 请求方式:POST(HTTPS)
36
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_rename?access_token=ACCESS_TOKEN
36
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_rename?access_token=ACCESS_TOKEN">...</a>
37
37
*
38
38
* @param request 重命名空间的请求参数
39
39
* @return wx cp base resp
@@ -46,7 +46,7 @@ public interface WxCpOaWeDriveService {
46
46
* 该接口用于解散已有空间,需要以空间管理员身份来解散。
47
47
* <p>
48
48
* 请求方式:POST(HTTPS)
49
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_dismiss?access_token=ACCESS_TOKEN
49
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_dismiss?access_token=ACCESS_TOKEN">...</a>
50
50
*
51
51
* @param userId the user id
52
52
* @param spaceId the space id
@@ -60,7 +60,7 @@ public interface WxCpOaWeDriveService {
60
60
* 该接口用于获取空间成员列表、信息、权限等信息。
61
61
* <p>
62
62
* 请求方式:POST(HTTPS)
63
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_info?access_token=ACCESS_TOKEN
63
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_info?access_token=ACCESS_TOKEN">...</a>
64
64
*
65
65
* @param userId the user id
66
66
* @param spaceId the space id
@@ -74,7 +74,7 @@ public interface WxCpOaWeDriveService {
74
74
* 该接口用于对指定空间添加成员/部门,可一次性添加多个。
75
75
* <p>
76
76
* 请求方式:POST(HTTPS)
77
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_acl_add?access_token=ACCESS_TOKEN
77
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_acl_add?access_token=ACCESS_TOKEN">...</a>
78
78
*
79
79
* @param request 添加成员/部门请求参数
80
80
* @return wx cp base resp
@@ -87,7 +87,7 @@ public interface WxCpOaWeDriveService {
87
87
* 该接口用于对指定空间移除成员/部门,操作者需要有移除权限。
88
88
* <p>
89
89
* 请求方式:POST(HTTPS)
90
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_acl_del?access_token=ACCESS_TOKEN
90
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_acl_del?access_token=ACCESS_TOKEN">...</a>
91
91
*
92
92
* @param request 移除成员/部门请求参数
93
93
* @return wx cp base resp
@@ -100,7 +100,7 @@ public interface WxCpOaWeDriveService {
100
100
* 该接口用于修改空间权限,需要传入userid,修改权限范围继承传入用户的权限范围。
101
101
* <p>
102
102
* 请求方式:POST(HTTPS)
103
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_setting?access_token=ACCESS_TOKEN
103
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_setting?access_token=ACCESS_TOKEN">...</a>
104
104
*
105
105
* @param request 权限管理请求参数
106
106
* @return wx cp base resp
@@ -113,7 +113,7 @@ public interface WxCpOaWeDriveService {
113
113
* 该接口用于获取空间邀请分享链接。
114
114
* <p>
115
115
* 请求方式:POST(HTTPS)
116
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_share?access_token=ACCESS_TOKEN
116
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_share?access_token=ACCESS_TOKEN">...</a>
117
117
*
118
118
* @param userId the user id
119
119
* @param spaceId the space id
@@ -127,7 +127,7 @@ public interface WxCpOaWeDriveService {
127
127
* 该接口用于获取指定地址下的文件列表。
128
128
* <p>
129
129
* 请求方式:POST(HTTPS)
130
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_list?access_token=ACCESS_TOKEN
130
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_list?access_token=ACCESS_TOKEN">...</a>
131
131
*
132
132
* @param request 获取文件列表请求参数
133
133
* @return wx cp file list
@@ -140,7 +140,7 @@ public interface WxCpOaWeDriveService {
140
140
* 该接口用于向微盘中的指定位置上传文件。
141
141
* <p>
142
142
* 请求方式:POST(HTTPS)
143
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_upload?access_token=ACCESS_TOKEN
143
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_upload?access_token=ACCESS_TOKEN">...</a>
144
144
*
145
145
* @param request 上传文件请求参数
146
146
* @return wx cp file upload
@@ -153,54 +153,58 @@ public interface WxCpOaWeDriveService {
153
153
* 该接口用于下载文件,请求的userid需有下载权限。
154
154
* <p>
155
155
* 请求方式:POST(HTTPS)
156
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_download?access_token=ACCESS_TOKEN
156
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_download?access_token=ACCESS_TOKEN">...</a>
157
157
*
158
- * @param userId the user id
159
- * @param fileId the file id
160
- * @return wx cp file download
158
+ * @param fileId 文件fileid(只支持下载普通文件,不支持下载文件夹或微文档)
159
+ * @param selectedTicket 微盘和文件选择器jsapi返回的selectedTicket。若填此参数,则不需要填fileid。
160
+ * @return {
161
+ * "errcode": 0,
162
+ * "errmsg": "ok",
163
+ * "download_url": "DOWNLOAD_URL",
164
+ * "cookie_name": "COOKIE_NAME",
165
+ * "cookie_value": "COOKIE_VALUE"
166
+ * }
161
167
* @throws WxErrorException the wx error exception
162
168
*/
163
- WxCpFileDownload fileDownload (@ NonNull String userId , @ NonNull String fileId ) throws WxErrorException ;
169
+ WxCpFileDownload fileDownload ( String fileId , String selectedTicket ) throws WxErrorException ;
164
170
165
171
/**
166
172
* 重命名文件
167
173
* 该接口用于对指定文件进行重命名。
168
174
* <p>
169
175
* 请求方式:POST(HTTPS)
170
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_rename?access_token=ACCESS_TOKEN
176
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_rename?access_token=ACCESS_TOKEN">...</a>
171
177
*
172
- * @param userId the user id
173
178
* @param fileId the file id
174
179
* @param newName the new name
175
180
* @return wx cp file rename
176
181
* @throws WxErrorException the wx error exception
177
182
*/
178
- WxCpFileRename fileRename (@ NonNull String userId , @ NonNull String fileId , @ NonNull String newName ) throws WxErrorException ;
183
+ WxCpFileRename fileRename (@ NonNull String fileId , @ NonNull String newName ) throws WxErrorException ;
179
184
180
185
/**
181
- * 新建文件/微文档
182
- * 该接口用于在微盘指定位置新建文件、微文档 。
186
+ * 新建文件夹/文档
187
+ * 该接口用于在微盘指定位置新建文件夹、文档(更多文档接口能力可见文档API接口说明) 。
183
188
* <p>
184
189
* 请求方式:POST(HTTPS)
185
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_create?access_token=ACCESS_TOKEN
190
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_create?access_token=ACCESS_TOKEN">...</a>
186
191
*
187
- * @param userId 操作者userid
188
192
* @param spaceId 空间spaceid
189
193
* @param fatherId 父目录fileid, 在根目录时为空间spaceid
190
- * @param fileType 文件类型, 1:文件夹 3:微文档 (文档) 4:微文档 (表格)
191
- * @param fileName 文件名字
194
+ * @param fileType 文件类型, 1:文件夹 3:文档 (文档) 4:文档 (表格)
195
+ * @param fileName 文件名字(注意:文件名最多填255个字符, 英文算1个, 汉字算2个)
192
196
* @return wx cp file create
193
197
* @throws WxErrorException the wx error exception
194
198
*/
195
- WxCpFileCreate fileCreate (@ NonNull String userId , @ NonNull String spaceId ,
196
- @ NonNull String fatherId , @ NonNull Integer fileType , @ NonNull String fileName ) throws WxErrorException ;
199
+ WxCpFileCreate fileCreate (@ NonNull String spaceId , @ NonNull String fatherId , @ NonNull Integer fileType ,
200
+ @ NonNull String fileName ) throws WxErrorException ;
197
201
198
202
/**
199
203
* 移动文件
200
204
* 该接口用于将文件移动到指定位置。
201
205
* <p>
202
206
* 请求方式:POST(HTTPS)
203
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_move?access_token=ACCESS_TOKEN
207
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_move?access_token=ACCESS_TOKEN">...</a>
204
208
*
205
209
* @param request 移动文件的请求参数
206
210
* @return wx cp file move
@@ -213,21 +217,33 @@ WxCpFileCreate fileCreate(@NonNull String userId, @NonNull String spaceId,
213
217
* 该接口用于删除指定文件。
214
218
* <p>
215
219
* 请求方式:POST(HTTPS)
216
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_delete?access_token=ACCESS_TOKEN
220
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_delete?access_token=ACCESS_TOKEN">...</a>
217
221
*
218
- * @param userId 操作者userid
219
- * @param fileId 文件fileid列表
222
+ * @param fileIds 文件fileid列表
220
223
* @return wx cp base resp
221
224
* @throws WxErrorException the wx error exception
222
225
*/
223
- WxCpBaseResp fileDelete (@ NonNull String userId , @ NonNull List <String > fileId ) throws WxErrorException ;
226
+ WxCpBaseResp fileDelete (@ NonNull List <String > fileIds ) throws WxErrorException ;
227
+
228
+ /**
229
+ * 文件信息
230
+ * 该接口用于获取指定文件的信息。
231
+ * <p>
232
+ * 请求方式:POST(HTTPS)
233
+ * 请求地址: <a href="https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_info?access_token=ACCESS_TOKEN">...</a>
234
+ *
235
+ * @param fileId the file id
236
+ * @return wx cp file info
237
+ * @throws WxErrorException the wx error exception
238
+ */
239
+ WxCpFileInfo fileInfo (@ NonNull String fileId ) throws WxErrorException ;
224
240
225
241
/**
226
242
* 新增指定人
227
243
* 该接口用于对指定文件添加指定人/部门。
228
244
* <p>
229
245
* 请求方式:POST(HTTPS)
230
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_acl_add?access_token=ACCESS_TOKEN
246
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_acl_add?access_token=ACCESS_TOKEN">...</a>
231
247
*
232
248
* @param request 新增指定人请求参数
233
249
* @return wx cp base resp
@@ -240,7 +256,7 @@ WxCpFileCreate fileCreate(@NonNull String userId, @NonNull String spaceId,
240
256
* 该接口用于删除指定文件的指定人/部门。
241
257
* <p>
242
258
* 请求方式:POST(HTTPS)
243
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_acl_del?access_token=ACCESS_TOKEN
259
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_acl_del?access_token=ACCESS_TOKEN">...</a>
244
260
*
245
261
* @param request 请求参数
246
262
* @return wx cp base resp
@@ -253,7 +269,7 @@ WxCpFileCreate fileCreate(@NonNull String userId, @NonNull String spaceId,
253
269
* 该接口用于文件的分享设置。
254
270
* <p>
255
271
* 请求方式:POST(HTTPS)
256
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_setting?access_token=ACCESS_TOKEN
272
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_setting?access_token=ACCESS_TOKEN">...</a>
257
273
*
258
274
* @param userId the user id
259
275
* @param fileId the file id
@@ -269,7 +285,7 @@ WxCpFileCreate fileCreate(@NonNull String userId, @NonNull String spaceId,
269
285
* 该接口用于获取文件的分享链接。
270
286
* <p>
271
287
* 请求方式:POST(HTTPS)
272
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_share?access_token=ACCESS_TOKEN
288
+ * 请求地址: <a href=" https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_share?access_token=ACCESS_TOKEN">...</a>
273
289
*
274
290
* @param userId the user id
275
291
* @param fileId the file id
@@ -278,18 +294,4 @@ WxCpFileCreate fileCreate(@NonNull String userId, @NonNull String spaceId,
278
294
*/
279
295
WxCpFileShare fileShare (@ NonNull String userId , @ NonNull String fileId ) throws WxErrorException ;
280
296
281
- /**
282
- * 文件信息
283
- * 该接口用于获取指定文件的信息。
284
- * <p>
285
- * 请求方式:POST(HTTPS)
286
- * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_info?access_token=ACCESS_TOKEN
287
- *
288
- * @param userId the user id
289
- * @param fileId the file id
290
- * @return wx cp file info
291
- * @throws WxErrorException the wx error exception
292
- */
293
- WxCpFileInfo fileInfo (@ NonNull String userId , @ NonNull String fileId ) throws WxErrorException ;
294
-
295
297
}
0 commit comments