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); }