fwq
2024-09-24 03cc06f009f0645faea85297e8660afc1bf82846
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
package com.hx.api;
 
import com.alibaba.fastjson.JSONObject;
import com.dtflys.forest.annotation.DataVariable;
import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Post;
 
/**
 * 企业微信微盘接口API
 * @Author: cmg
 * @Date: 2023-7-13 11:08
 */
public interface CorpMpSpaceApi {
 
    /**
     * 增加空间
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_create?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject addSpace(@DataVariable("accessToken") String accessToken, @JSONBody String param);
 
    /**
     * 重命名空间
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_rename?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject renameSpace(@DataVariable("accessToken") String accessToken, @JSONBody String param);
 
    /**
     * 解散空间
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_dismiss?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject dismissSpace(@DataVariable("accessToken") String accessToken, @JSONBody String param);
 
    /**
     * 空间安全设置
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/space_setting?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject spaceSetting(@DataVariable("accessToken") String accessToken, @JSONBody String param);
 
    /**
     * 新建文件夹/文档
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_create?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject createFile(@DataVariable("accessToken") String accessToken, @JSONBody String param);
 
    /**
     * 文件重命名
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_rename?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject renameFile(@DataVariable("accessToken") String accessToken, @JSONBody String param);
 
    /**
     * 移除文件
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_delete?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject deleteFile(@DataVariable("accessToken") String accessToken, @JSONBody String param);
 
    /**
     * 分块上传初始化
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_upload_init?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject fileUploadInit(@DataVariable("accessToken") String accessToken, @JSONBody String param);
 
    /**
     * 分块上传文件
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_upload_part?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject fileUploadPart(@DataVariable("accessToken") String accessToken, @JSONBody String param);
 
    /**
     * 分块上传完成
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_upload_finish?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject fileUploadFinish(@DataVariable("accessToken") String accessToken, @JSONBody String param);
 
    /**
     * 上传文件
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_upload?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject fileUpload(@DataVariable("accessToken") String accessToken, @JSONBody String param);
 
    /**
     * 删除文件
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_delete?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject fileDelete(@DataVariable("accessToken") String accessToken, @JSONBody String param);
 
    /**
     * 获取下载路径
     * @param accessToken
     * @param param
     * @return
     */
    @Post(
            url = "https://qyapi.weixin.qq.com/cgi-bin/wedrive/file_download?access_token=${accessToken}",
            headers = {
                    "Content-Type: application/json"
            }
    )
    JSONObject getDownloadUrl(@DataVariable("accessToken") String accessToken, @JSONBody String param);
}