commit 60bf7feedee74d464c15662045193d74c1618ba7 Author: tt Date: Tue May 28 08:47:31 2024 +0800 封装一层API diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..993f872 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +/bin/ +.idea +test.go +test_init.exe +Helper_3.9.10.19.dll +HPSocket4C.dll +Loader_3.9.10.19.dll +callexe.exe diff --git a/README.md b/README.md new file mode 100644 index 0000000..ca1f8fd --- /dev/null +++ b/README.md @@ -0,0 +1,85 @@ +# 注意 +仅支持windows x64 + +# 安装 + +> 私有仓库先配置ssh秘钥,或者你应该知道怎么get私有仓库的代码 +> [教程](https://geek-docs.com/git/git-questions/974_git_whats_the_proper_way_to_go_get_a_private_repository.html) +> 当然git到本地也行 + +``` +replace github.com/goWxHook/goWxHook => your path/goWxHook +``` + +```azure +go install github.com/swaggo/swag/cmd/swag@v1.16.3 +swag init --parseInternal --parseDependency -g main.go +``` +# 功能表 + +## core.WxApi + +- [x] 获取好友列表消息 + - > GetFriendLists +- [x] 获取公众号消息 + - > GetPublicUserLIst +- [x] 获取群聊列表 + - > GetChatRoomList +- [x] 获取群成员 + - > GetRoomMember +- [x] 发送文本消息 (私聊/群聊/@) + - > SendTextMsg +- [x] 发送图片消息 + - > SendImageMsg +- [x] 发送GIF消息 + - > SendGifMsg +- [x] 发送文件消息 + - > SendFileMsg +- [x] 发送视频消息 + - > SendVideoMsg +- [x] 发送名片消息 + - > SendCardMsg +- [x] 发送链接消息 + - > SendLinkMsg +- [x] 加好友 + - > AddFriend +- [x] 删除好友 + - > DelFriend +- [x] 修改好友备注 + - > EditFriendRemark +- [x] 自动同意好友申请 + - > AutoAcceptAddFriend +- [x] 自动同意好友转帐 + - > AutoAccpetWCPay +- [x] 自动进群邀请 + - > AutoAccpetRoom +- [x] 自动加名片 + - > AutoAccpetCard +- [x] 邀请好友进群消息 + - > InviteToChatRoom +- [x] 删除群成员 + - > DelChatRoomMember +- [x] 退出并删除群 + - > DelChatRoom +- [x] 修改群名称 + - > EditChatRoomName +- [x] 修改群通知 + - > EditChatRoomNotice +- [x] 创建群聊 + - > CreateChatRoom +- [x] 进入直播间 + - > LiveEnter +- [x] 直播间发言 + - > LiveSendMsg +- [x] 解密图片 + - > DecryptImg +- [x] 置顶消息 + - > ChatSessionTop +- [x] 免打扰消息 + - > ChatMsgNotNotify +- [x] 修改显示群昵称 + - > RoomShowNameMsg +- [x] 保存到联系人 + - > SaveRoomSaveToContact +- [x] 修改群内昵称 + - > EditRoomMemberNickName diff --git a/api/cdn.go b/api/cdn.go new file mode 100644 index 0000000..554d7be --- /dev/null +++ b/api/cdn.go @@ -0,0 +1,442 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// cdnInitial +// +// @Summary CDN初始化 +// @Description CDN初始化接口 +// @Tags CDN +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse{Data=core.CDNInitialResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/initial [post] +func (w *WebApi) cdnInitial(c *gin.Context) { + ret, err := w.WxApi.InitialCDN() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnUpload +// +// @Summary CDN上传 +// @Description CDN上传接口 +// @Tags CDN +// @Accept json +// @Produce json +// @Param body body core.CDNUploadRequest true "上传数据" +// @Response 200 {object} CommonStringResponse{Data=core.CDNUploadResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/upload [post] +func (w *WebApi) cdnUpload(c *gin.Context) { + var form core.CDNUploadRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNUpload(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnDownload +// +// @Summary CDN下载 +// @Description CDN下载接口 +// @Tags CDN +// @Accept json +// @Produce json +// @Param body body core.CDNDownloadRequest true "下载数据" +// @Response 200 {object} CommonStringResponse{Data=core.CDNDownloadResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/download [post] +func (w *WebApi) cdnDownload(c *gin.Context) { + var form core.CDNDownloadRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNDownload(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnWorkWxDownload +// +// @Summary 企业微信CDN下载 +// @Description 企业微信CDN下载接口 +// @Tags CDN +// @Accept json +// @Produce json +// @Param body body core.WorkWxCdnDownloadRequest true "下载数据" +// @Response 200 {object} CommonStringResponse{Data=core.WorkWxCdnDownloadResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/workwx/download [post] +func (w *WebApi) cdnWorkWxDownload(c *gin.Context) { + var form core.WorkWxCdnDownloadRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.WorkWxCdnDownload(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendTextMsg +// +// @Summary 发送文本消息 +// @Description 发送文本消息接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendTextMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendTextMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/text [post] +func (w *WebApi) cdnSendTextMsg(c *gin.Context) { + var form core.CDNSendTextMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendTextMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendImageMsg +// +// @Summary 发送图片消息 +// @Description 发送图片消息接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendImageMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendImageMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/image [post] +func (w *WebApi) cdnSendImageMsg(c *gin.Context) { + var form core.CDNSendImageMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendImageMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendVideoMsg +// +// @Summary 发送视频消息 +// @Description 发送视频消息接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendVideoMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendVideoMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/video [post] +func (w *WebApi) cdnSendVideoMsg(c *gin.Context) { + var form core.CDNSendVideoMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendVideoMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendFileMsg +// +// @Summary 发送文件消息 +// @Description 发送文件消息接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendFileMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendFileMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/file [post] +func (w *WebApi) cdnSendFileMsg(c *gin.Context) { + var form core.CDNSendFileMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendFileMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendCardLinkMsg +// +// @Summary 发送卡片链接消息 +// @Description 发送卡片链接消息接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendCardLinkMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendCardLinkMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/card_link [post] +func (w *WebApi) cdnSendCardLinkMsg(c *gin.Context) { + var form core.CDNSendCardLinkMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendCardLinkMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendGifMsg +// +// @Summary 发送GIF消息 +// @Description 发送GIF消息接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendGifMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendGifMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/gif [post] +func (w *WebApi) cdnSendGifMsg(c *gin.Context) { + var form core.CDNSendGifMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendGifMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendMiniProgramMsg +// +// @Summary 发送小程序消息 +// @Description 发送小程序消息接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendMiniProgramMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendMiniProgramMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/mini_program [post] +func (w *WebApi) cdnSendMiniProgramMsg(c *gin.Context) { + var form core.CDNSendMiniProgramMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendMiniProgramMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendVideoMomentMsg +// +// @Summary 发送视频号消息 +// @Description 发送视频号消息接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendVideoMomentMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendVideoMomentMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/video_number [post] +func (w *WebApi) cdnSendVideoMomentMsg(c *gin.Context) { + var form core.CDNSendVideoMomentMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendVideoMomentMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendCardMsg +// +// @Summary 发送名片消息 +// @Description 发送名片消息接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendCardMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendCardMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/card [post] +func (w *WebApi) cdnSendCardMsg(c *gin.Context) { + var form core.CDNSendCardMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendCardMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendLocationMsg +// +// @Summary 发送位置消息 +// @Description 发送位置消息接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendLocationMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendLocationMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/location [post] +func (w *WebApi) cdnSendLocationMsg(c *gin.Context) { + var form core.CDNSendLocationMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendLocationMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendRevokeMsg +// +// @Summary 发送撤回消息 +// @Description 发送撤回消息接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendRevokeMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendRevokeMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/revoke [post] +func (w *WebApi) cdnSendRevokeMsg(c *gin.Context) { + var form core.CDNSendRevokeMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendRevokeMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendXmkMsg +// +// @Summary 发送xml消息 +// @Description 发送xml消息接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendXmlMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendXmlMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/xml [post] +func (w *WebApi) cdnSendXmkMsg(c *gin.Context) { + var form core.CDNSendXmlMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendXmlMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// cdnSendGifMsgNew +// +// @Summary 发送GIF消息(新) +// @Description 发送GIF消息(新)接口 +// @Tags CDN发送消息 +// @Accept json +// @Produce json +// @Param body body core.CDNSendGifMsgNewRequest true "消息" +// @Response 200 {object} CommonStringResponse{Data=core.CDNSendGifMsgNewResponseData} "{\"code\":0, ....} +// @Router /api/v1/cdn/send/gif_new [post] +func (w *WebApi) cdnSendGifMsgNew(c *gin.Context) { + var form core.CDNSendGifMsgNewRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.CDNSendGifMsgNew(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} diff --git a/api/collect.go b/api/collect.go new file mode 100644 index 0000000..a692e92 --- /dev/null +++ b/api/collect.go @@ -0,0 +1,78 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// getCollectList +// +// @Summary 获取收藏列表 +// @Description 获取收藏列表接口 +// @Tags 收藏 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse{Data=core.GetCollectListResponseData} "{\"code\":0, ....} +// @Router /api/v1/collect/list [get] +func (w *WebApi) getCollectList(c *gin.Context) { + list, err := w.WxApi.GetCollectList() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", list) + return +} + +// sendCollect +// +// @Summary 发送收藏(旧) +// @Description 发送收藏(旧)接口 +// @Tags 收藏 +// @Accept json +// @Produce json +// @Param body body core.SendCollectRequest true "收藏信息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/collect/send [post] +func (w *WebApi) sendCollect(c *gin.Context) { + var form core.SendCollectRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.SendCollect(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// sendCollectMsgByMsgId +// +// @Summary 收藏指定消息(旧) +// @Description 收藏指定消息(旧)接口 +// @Tags 收藏 +// @Accept json +// @Produce json +// @Param body body core.SendCollectMsgByMsgIdRequest true "消息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/collect/send/msgid [post] +func (w *WebApi) sendCollectMsgByMsgId(c *gin.Context) { + var form core.SendCollectMsgByMsgIdRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.SendCollectMsgByMsgId(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} diff --git a/api/contact.go b/api/contact.go new file mode 100644 index 0000000..4597602 --- /dev/null +++ b/api/contact.go @@ -0,0 +1,420 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// getFriendList +// +// @Summary 获取好友列表 +// @Description 获取好友列表接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse{Data=[]core.GetFriendListResponseDateItem} "{\"code\":0, ....} +// @Router /api/v1/contact/friend/list [get] +func (w *WebApi) getFriendList(c *gin.Context) { + list, err := w.WxApi.GetFriendList() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", list) + return +} + +// getFriendInfo +// +// @Summary 获取单个好友信息 +// @Description 获取单个好友信息接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param wxid path string true "微信ID" +// @Response 200 {object} CommonStringResponse{Data=core.GetFriendListResponseDateItem} "{\"code\":0, ....} +// @Router /api/v1/contact/friend/{wxid} [get] +func (w *WebApi) getFriendInfo(c *gin.Context) { + wxid := c.Param("wxid") + if len(wxid) == 0 { + utils.ResponseError(c, "wxid is required", nil) + return + } + info, err := w.WxApi.GetFriendInfo(wxid) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// getFriendBriefInfo +// +// @Summary 获取好友简要信息(协议) +// @Description 获取好友简要信息(协议)接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param wxid path string true "微信ID" +// @Response 200 {object} CommonStringResponse{Data=core.GetFriendBriefInfoByProtocolResponseData} "{\"code\":0, ....} +// @Router /api/v1/contact/friend/protocol/brief/{wxid} [get] +func (w *WebApi) getFriendBriefInfo(c *gin.Context) { + wxid := c.Param("wxid") + if len(wxid) == 0 { + utils.ResponseError(c, "wxid is required", nil) + return + } + info, err := w.WxApi.GetFriendBriefInfoByProtocol(wxid) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// getFriendDetailInfo +// +// @Summary 获取微信好友详细信息(协议) +// @Description 获取微信好友详细信息(协议)接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param wxid path string true "微信ID" +// @Response 200 {object} CommonStringResponse{Data=[]core.GetFriendDetailInfoByProtocolResponseDataContactListItem} "{\"code\":0, ....} +// @Router /api/v1/contact/friend/protocol/detail/{wxid} [get] +func (w *WebApi) getFriendDetailInfo(c *gin.Context) { + wxid := c.Param("wxid") + if len(wxid) == 0 { + utils.ResponseError(c, "wxid is required", nil) + return + } + info, err := w.WxApi.GetFriendDetailInfoByProtocol(wxid) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// batchGetFriendDetailInfo +// +// @Summary 批量获取好友详细信息(协议) +// @Description 批量获取好友详细信息(协议)接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param body body []string true "微信ID列表" +// @Response 200 {object} CommonStringResponse{Data=[]core.GetFriendDetailInfoByProtocolResponseDataContactListItem} "{\"code\":0, ....} +// @Router /api/v1/contact/friend/protocol/detail [post] +func (w *WebApi) batchGetFriendDetailInfo(c *gin.Context) { + var form []string + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form) == 0 { + utils.ResponseError(c, "wxids is required", nil) + return + } + info, err := w.WxApi.GetFriendDetailInfoListByProtocol(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// editFriendRemark +// +// @Summary 编辑好友备注 +// @Description 编辑好友备注接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param body body core.EditFriendRemarkRequest true "好友备注信息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/friend/remark [post] +func (w *WebApi) editFriendRemark(c *gin.Context) { + var form core.EditFriendRemarkRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.Wxid) == 0 { + utils.ResponseError(c, "wxid is required", nil) + return + } + if len(form.Remark) == 0 { + utils.ResponseError(c, "remark is required", nil) + return + } + err = w.WxApi.EditFriendRemark(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// addFriend +// +// @Summary 通过群聊加好友-发送好友申请 +// @Description 通过群聊加好友-发送好友申请接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param body body core.AddFriendRequest true "添加好友信息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/friend/add [post] +func (w *WebApi) addFriend(c *gin.Context) { + var form core.AddFriendRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.Wxid) == 0 { + utils.ResponseError(c, "wxid is required", nil) + return + } + + err = w.WxApi.AddFriend(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// acceptFriend +// +// @Summary 通过好友申请 +// @Description 通过好友申请接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param body body core.AcceptFriendRequest true "通过好友申请信息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/friend/accept [post] +func (w *WebApi) acceptFriend(c *gin.Context) { + var form core.AcceptFriendRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret := w.WxApi.AcceptFriend(form) + if ret.Errcode != 0 { + utils.ResponseError(c, ret.Errmsg, nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// deleteFriend +// +// @Summary 删除好友 +// @Description 删除好友接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param wxid path string true "微信ID" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/friend/delete/{wxid} [post] +func (w *WebApi) deleteFriend(c *gin.Context) { + wxid := c.Param("wxid") + if len(wxid) == 0 { + utils.ResponseError(c, "wxid is required", nil) + return + } + err := w.WxApi.DelFriend(wxid) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// searchWxUser +// +// @Summary 搜索微信用户 +// @Description 搜索微信用户接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param keyword query string true "搜索字符串" +// @Response 200 {object} CommonStringResponse{Data=[]core.SearchWxUserResponseData} "{\"code\":0, ....} +// @Router /api/v1/contact/friend/search [get] +func (w *WebApi) searchWxUser(c *gin.Context) { + keyword := c.Query("keyword") + if len(keyword) == 0 { + utils.ResponseError(c, "keyword is required", nil) + return + } + info, err := w.WxApi.SearchWxUser(keyword) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// addSearchWxUser +// +// @Summary 添加搜索微信用户为好友 +// @Description 添加搜索微信用户为好友接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param body body core.AddSearchWxUserRequest true "添加搜索微信用户为好友信息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/friend/add/search [post] +func (w *WebApi) addSearchWxUser(c *gin.Context) { + var form core.AddSearchWxUserRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret := w.WxApi.AddSearchWxUser(form) + if ret.Errcode != 0 { + utils.ResponseError(c, ret.Errmsg, nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// checkFriend +// +// @Summary 检测好友状态(发送无痕清粉消息) +// @Description 检测好友状态(发送无痕清粉消息)接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param wxid path string true "微信ID" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/friend/check/{wxid} [post] +func (w *WebApi) checkFriend(c *gin.Context) { + wxid := c.Param("wxid") + if len(wxid) == 0 { + utils.ResponseError(c, "wxid is required", nil) + return + } + ret := w.WxApi.CheckFriendStatus(wxid) + if ret.Errcode != 0 { + utils.ResponseError(c, ret.Errmsg, nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// autoAcceptAddFriend +// +// @Summary 自动同意好友申请 +// @Description 自动同意好友申请接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param body body core.AutoAcceptAddFriendRequest true "自动加好友" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/friend/add/auto [post] +func (w *WebApi) autoAcceptAddFriend(c *gin.Context) { + var form core.AutoAcceptAddFriendRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.AutoAcceptAddFriend(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// autoAcceptCard +// +// @Summary 自动接收名片 +// @Description 自动接收名片接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param body body core.AutoAcceptCardRequest true "自动接收名片" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/friend/card/auto [post] +func (w *WebApi) autoAcceptCard(c *gin.Context) { + var form core.AutoAcceptCardRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.AutoAcceptCard(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// autoAcceptWCPay +// +// @Summary 自动接收好友转账 +// @Description 自动接收好友转账接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Param body body core.AutoAcceptWCPayRequest true "自动接收好友转账" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/accept/wc_pay/auto [post] +func (w *WebApi) autoAcceptWCPay(c *gin.Context) { + var form core.AutoAcceptWCPayRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.AutoAcceptWCPay(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// getPublicUserList +// +// @Summary 获取公众号列表 +// @Description 获取公众号列表接口 +// @Tags 联系人 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse{Data=[]core.GetPublicUserListResponseData} "{\"code\":0, ....} +// @Router /api/v1/contact/public/list [get] +func (w *WebApi) getPublicUserList(c *gin.Context) { + list, err := w.WxApi.GetPublicUserList() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", list) + return +} diff --git a/api/doc.go b/api/doc.go new file mode 100644 index 0000000..9ad46cd --- /dev/null +++ b/api/doc.go @@ -0,0 +1,7 @@ +package api + +type CommonStringResponse struct { + Code int `json:"code"` + Msg string `json:"msg"` + Data string `json:"data"` +} diff --git a/api/live.go b/api/live.go new file mode 100644 index 0000000..f65350b --- /dev/null +++ b/api/live.go @@ -0,0 +1,130 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// liveEnter +// +// @Summary 进入直播间 +// @Description 进入直播间接口 +// @Tags 直播 +// @Accept json +// @Produce json +// @Param body body core.LiveEnterRequest true "直播间信息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/live/enter [post] +func (w *WebApi) liveEnter(c *gin.Context) { + var form core.LiveEnterRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.LiveEnter(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// liveGetOnlineUser +// +// @Summary 获取直播间在线用户 +// @Description 获取直播间在线用户接口 +// @Tags 直播 +// @Accept json +// @Produce json +// @Param body body core.LiveGetOnlineUserRequest true "直播间信息" +// @Response 200 {object} CommonStringResponse{Data=interface{}} "{\"code\":0, ....} +// @Router /api/v1/live/get/online/user [post] +func (w *WebApi) liveGetOnlineUser(c *gin.Context) { + var form core.LiveGetOnlineUserRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.LiveGetOnlineUser(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// liveGetChangeInfo +// +// @Summary 获取直播间变动信息(人气,实时发言等)) +// @Description 获取直播间变动信息(人气,实时发言等))接口 +// @Tags 直播 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse{Data=interface{}} "{\"code\":0, ....} +// @Router /api/v1/live/get/change/info [post] +func (w *WebApi) liveGetChangeInfo(c *gin.Context) { + info, err := w.WxApi.LiveGetChangeInfo() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// liveSendMsg +// +// @Summary 发送直播间消息 +// @Description 发送直播间消息接口 +// @Tags 直播 +// @Accept json +// @Produce json +// @Param body body core.LiveSendMsgRequest true "直播间信息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/live/send/msg [post] +func (w *WebApi) liveSendMsg(c *gin.Context) { + var form core.LiveSendMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.LiveSendMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// liveGetShelf +// +// @Summary 获取直播间货架 +// @Description 获取直播间货架接口 +// @Tags 直播 +// @Accept json +// @Produce json +// @Param body body core.LiveGetShelfRequest true "直播间信息" +// @Response 200 {object} CommonStringResponse{Data=interface{}} "{\"code\":0, ....} +// @Router /api/v1/live/get/shelf [post] +func (w *WebApi) liveGetShelf(c *gin.Context) { + var form core.LiveGetShelfRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.LiveGetShelf(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} diff --git a/api/login.go b/api/login.go new file mode 100644 index 0000000..c39c7b7 --- /dev/null +++ b/api/login.go @@ -0,0 +1,101 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/utils" +) + +// getWxVersion +// +// @Summary 获取微信版本 +// @Description 获取微信版本号接口 +// @Tags 登录 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/login/version [get] +func (w *WebApi) getWxVersion(c *gin.Context) { + version, err := w.WxApi.GetUserWeChatVersion() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", version) + return +} + +// getLoginUserInfo +// +// @Summary 获取登录用户信息 +// @Description 获取登录用户信息接口 +// @Tags 登录 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse{Data=core.GetLoginUserInfoResponseData} "{\"code\":0, ....} +// @Router /api/v1/login/userinfo [get] +func (w *WebApi) getLoginUserInfo(c *gin.Context) { + info, err := w.WxApi.GetLoginUserInfo() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// refreshLoginQrCode +// +// @Summary 刷新登录二维码 +// @Description 刷新登录二维码接口 +// @Tags 登录 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse{Data=core.RefreshLoginQrCodeResponseData} "{\"code\":0, ....} +// @Router /api/v1/login/qrcode/refresh [post] +func (w *WebApi) refreshLoginQrCode(c *gin.Context) { + info, err := w.WxApi.RefreshLoginQrCode() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// wxLogout +// +// @Summary 注销微信登录 +// @Description 注销微信登录接口 +// @Tags 登录 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/login/logout [post] +func (w *WebApi) wxLogout(c *gin.Context) { + err := w.WxApi.WxUserLogout() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// wxExit +// +// @Summary 退出微信 +// @Description 退出微信接口 +// @Tags 登录 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/login/exit [post] +func (w *WebApi) wxExit(c *gin.Context) { + err := w.WxApi.WxExit() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} diff --git a/api/message.go b/api/message.go new file mode 100644 index 0000000..e386656 --- /dev/null +++ b/api/message.go @@ -0,0 +1,267 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// sendTextMsg +// +// @Summary 发送文本消息 +// @Description 发送文本消息接口 +// @Tags 发送消息 +// @Accept json +// @Produce json +// @Param body body core.SendTextMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/message/send/text [post] +func (w *WebApi) sendTextMsg(c *gin.Context) { + var form core.SendTextMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.SendTextMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// sendCardMsg +// +// @Summary 发送名片消息 +// @Description 发送名片消息接口 +// @Tags 发送消息 +// @Accept json +// @Produce json +// @Param body body core.SendCardMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/message/send/card [post] +func (w *WebApi) sendCardMsg(c *gin.Context) { + var form core.SendCardMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.SendCardMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// sendLinkMsg +// +// @Summary 发送链接消息 +// @Description 发送链接消息接口 +// @Tags 发送消息 +// @Accept json +// @Produce json +// @Param body body core.SendLinkMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/message/send/link [post] +func (w *WebApi) sendLinkMsg(c *gin.Context) { + var form core.SendLinkMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.SendLinkMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// sendImageMsg +// +// @Summary 发送图片消息 +// @Description 发送图片消息接口 +// @Tags 发送消息 +// @Accept json +// @Produce json +// @Param body body core.SendImageMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/message/send/image [post] +func (w *WebApi) sendImageMsg(c *gin.Context) { + var form core.SendImageMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.SendImageMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// sendFileMsg +// +// @Summary 发送文件消息 +// @Description 发送文件消息接口 +// @Tags 发送消息 +// @Accept json +// @Produce json +// @Param body body core.SendFileMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/message/send/file [post] +func (w *WebApi) sendFileMsg(c *gin.Context) { + var form core.SendFileMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.SendFileMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// sendVideoMsg +// +// @Summary 发送视频文件消息 +// @Description 发送视频文件消息接口 +// @Tags 发送消息 +// @Accept json +// @Produce json +// @Param body body core.SendVideoMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/message/send/video [post] +func (w *WebApi) sendVideoMsg(c *gin.Context) { + var form core.SendVideoMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.SendVideoMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// sendGifMsg +// +// @Summary 发送gif消息 +// @Description 发送gif消息接口 +// @Tags 发送消息 +// @Accept json +// @Produce json +// @Param body body core.SendGifMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/message/send/git [post] +func (w *WebApi) sendGifMsg(c *gin.Context) { + var form core.SendGifMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.SendGifMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// sendXmlMsg +// +// @Summary 发送XML消息 +// @Description 发送XML消息接口 +// @Tags 发送消息 +// @Accept json +// @Produce json +// @Param body body core.SendXmlMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/message/send/xml [post] +func (w *WebApi) sendXmlMsg(c *gin.Context) { + var form core.SendXmlMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.SendXmlMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// sendForwardMsg +// +// @Summary 转发任意类型消息 +// @Description 转发任意类型消息接口 +// @Tags 发送消息 +// @Accept json +// @Produce json +// @Param body body core.ForwardMsgRequest true "消息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/message/send/forward [post] +func (w *WebApi) sendForwardMsg(c *gin.Context) { + var form core.ForwardMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.ForwardMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// registerMsgHttpCallBack +// +// @Summary 注册消息回调 +// @Description 注册消息回调接口 +// @Tags 发送消息 +// @Accept json +// @Produce json +// @Param body body core.HttpCallBackRequest true "回调" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/message/register_msg_http_callback [post] +func (w *WebApi) registerMsgHttpCallBack(c *gin.Context) { + var form core.HttpCallBackRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = core.RegisterHttpCallback(form.Url, form.Timeout) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} diff --git a/api/moment.go b/api/moment.go new file mode 100644 index 0000000..9b2b6a9 --- /dev/null +++ b/api/moment.go @@ -0,0 +1,163 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// getMoment +// +// @Summary 获取朋友圈 +// @Description 获取朋友圈接口 +// @Tags 朋友圈 +// @Accept json +// @Produce json +// @Param body body core.GetMomentRequest true "朋友圈信息" +// @Response 200 {object} CommonStringResponse{Data=core.GetMomentResponseData} "{\"code\":0, ....} +// @Router /api/v1/moment/list [post] +func (w *WebApi) getMoment(c *gin.Context) { + var form core.GetMomentRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.GetMoment(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// commentMoment +// +// @Summary 评论朋友圈 +// @Description 评论朋友圈接口 +// @Tags 朋友圈 +// @Accept json +// @Produce json +// @Param body body core.CommentMomentRequest true "评论信息" +// @Response 200 {object} CommonStringResponse{Data=core.CommentMomentResponseData} "{\"code\":0, ....} +// @Router /api/v1/moment/comment [post] +func (w *WebApi) commentMoment(c *gin.Context) { + var form core.CommentMomentRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.CommentMoment(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// likeMoment +// +// @Summary 点赞朋友圈 +// @Description 点赞朋友圈接口 +// @Tags 朋友圈 +// @Accept json +// @Produce json +// @Param body body core.LikeMomentRequest true "点赞信息" +// @Response 200 {object} CommonStringResponse{Data=core.LikeMomentResponseData} "{\"code\":0, ....} +// @Router /api/v1/moment/like [post] +func (w *WebApi) likeMoment(c *gin.Context) { + var form core.LikeMomentRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.LikeMoment(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// sendMoment +// +// @Summary 发送朋友圈 +// @Description 发送朋友圈接口 +// @Tags 朋友圈 +// @Accept json +// @Produce json +// @Param body body core.SendMomentRequest true "发送信息" +// @Response 200 {object} CommonStringResponse{Data=core.SendMomentResponseData} "{\"code\":0, ....} +// @Router /api/v1/moment/send [post] +func (w *WebApi) sendMoment(c *gin.Context) { + var form core.SendMomentRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.SendMoment(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// uploadMomentImage +// +// @Summary 上传朋友圈图片 +// @Description 上传朋友圈图片接口 +// @Tags 朋友圈 +// @Accept json +// @Produce json +// @Param body body core.UploadMomentImageRequest true "上传图片信息" +// @Response 200 {object} CommonStringResponse{Data=core.UploadMomentImageResponseData} "{\"code\":0, ....} +// @Router /api/v1/moment/upload/image [post] +func (w *WebApi) uploadMomentImage(c *gin.Context) { + var form core.UploadMomentImageRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.UploadMomentImage(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// getFriendMoment +// +// @Summary 获取好友朋友圈 +// @Description 获取好友朋友圈接口 +// @Tags 朋友圈 +// @Accept json +// @Produce json +// @Param body body core.GetFriendMomentRequest true "好友朋友圈信息" +// @Response 200 {object} CommonStringResponse{Data=core.GetFriendMomentResponseData} "{\"code\":0, ....} +// @Router /api/v1/moment/friend/list [post] +func (w *WebApi) getFriendMoment(c *gin.Context) { + var form core.GetFriendMomentRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.GetFriendMoment(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} diff --git a/api/mp.go b/api/mp.go new file mode 100644 index 0000000..6b0647e --- /dev/null +++ b/api/mp.go @@ -0,0 +1,33 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// getMiniProgramCode +// +// @Summary 获取小程序授权Code +// @Description 获取小程序授权Code接口 +// @Tags 小程序 +// @Accept json +// @Produce json +// @Param body body core.GetMiniProgramCodeRequest true "小程序信息" +// @Response 200 {object} CommonStringResponse{Data=core.GetMiniProgramCodeResponseData} "{\"code\":0, ....} +// @Router /api/v1/mini/program/code [post] +func (w *WebApi) getMiniProgramCode(c *gin.Context) { + var form core.GetMiniProgramCodeRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.GetMiniProgramCode(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} diff --git a/api/other.go b/api/other.go new file mode 100644 index 0000000..1848e14 --- /dev/null +++ b/api/other.go @@ -0,0 +1,59 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// getA8Key +// +// @Summary 获取A8Key +// @Description 获取A8Key接口 +// @Tags 其他 +// @Accept json +// @Produce json +// @Param body body core.GetA8KeyRequest true "A8Key请求" +// @Response 200 {object} CommonStringResponse{Data=core.GetA8KeyResponseData} "{\"code\":0, ....} +// @Router /api/v1/other/get_a8_key [post] +func (w *WebApi) getA8Key(c *gin.Context) { + var form core.GetA8KeyRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.GetA8Key(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// decryptImg +// +// @Summary 解密图片 +// @Description 解密图片接口 +// @Tags 其他 +// @Accept json +// @Produce json +// @Param body body core.DecryptImgRequest true "解密图片请求" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/other/decrypt_img [post] +func (w *WebApi) decryptImg(c *gin.Context) { + var form core.DecryptImgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.DecryptImg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} diff --git a/api/room.go b/api/room.go new file mode 100644 index 0000000..2068942 --- /dev/null +++ b/api/room.go @@ -0,0 +1,458 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// getRoomList +// +// @Summary 获取群列表 +// @Description 获取群列表接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse{Data=[]core.GetChatRoomListResponseDataItem} "{\"code\":0, ....} +// @Router /api/v1/contact/room/list [get] +func (w *WebApi) getRoomList(c *gin.Context) { + list, err := w.WxApi.GetChatRoomList() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", list) + return +} + +// getRoomMemberList +// +// @Summary 获取群成员列表 +// @Description 获取群成员列表接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param roomWxid path string true "微信群ID" +// @Response 200 {object} CommonStringResponse{Data=core.GetChatRoomMemberListResponseData} "{\"code\":0, ....} +// @Router /api/v1/contact/room/member/list/{roomWxid} [get] +func (w *WebApi) getRoomMemberList(c *gin.Context) { + roomWxid := c.Param("roomWxid") + if len(roomWxid) == 0 { + utils.ResponseError(c, "roomWxid is required", nil) + return + } + list, err := w.WxApi.GetChatRoomMemberList(roomWxid) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", list) + return +} + +// getRoomDetailInfo +// +// @Summary 获取微信群详细信息(协议) +// @Description 获取微信群详细信息(协议)接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param roomWxid path string true "微信群ID" +// @Response 200 {object} CommonStringResponse{Data=[]core.GetFriendDetailInfoByProtocolResponseDataContactListItem} "{\"code\":0, ....} +// @Router /api/v1/contact/room/protocol/detail/{roomWxid} [get] +func (w *WebApi) getRoomDetailInfo(c *gin.Context) { + roomWxid := c.Param("roomWxid") + if len(roomWxid) == 0 { + utils.ResponseError(c, "roomWxid is required", nil) + return + } + info, err := w.WxApi.GetRoomDetailInfoByProtocol(roomWxid) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// getRoomInviteRelationList +// +// @Summary 获取群成员邀请关系(协议) +// @Description 获取群成员邀请关系(协议)接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param roomWxid path string true "微信群ID" +// @Response 200 {object} CommonStringResponse{Data=core.GetRoomMemberInviteListResponseData} "{\"code\":0, ....} +// @Router /api/v1/contact/room/protocol/invite/list/{roomWxid} [get] +func (w *WebApi) getRoomInviteRelationList(c *gin.Context) { + roomWxid := c.Param("roomWxid") + if len(roomWxid) == 0 { + utils.ResponseError(c, "roomWxid is required", nil) + return + } + info, err := w.WxApi.GetRoomMemberInviteList(roomWxid) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// createRoom +// +// @Summary 创建群聊 +// @Description 创建群聊接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param body body core.CreateRoomRequest true "微信ID列表" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/room/create [post] +func (w *WebApi) createRoom(c *gin.Context) { + var form core.CreateRoomRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.Wxids) == 0 { + utils.ResponseError(c, "wxids is required", nil) + return + } + err = w.WxApi.CreateChatRoom(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// createRoomByProtocol +// +// @Summary 创建群聊(协议) +// @Description 创建群聊(协议)接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param body body core.CreateRoomRequest true "微信ID列表" +// @Response 200 {object} CommonStringResponse{Data=core.CreateChatRoomByProtocolResponseData} "{\"code\":0, ....} +// @Router /api/v1/contact/room/protocol/create [post] +func (w *WebApi) createRoomByProtocol(c *gin.Context) { + var form core.CreateRoomRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.Wxids) == 0 { + utils.ResponseError(c, "wxids is required", nil) + return + } + info, err := w.WxApi.CreateChatRoomByProtocol(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// inviteToRoom +// +// @Summary 邀请好友进群 +// @Description 邀请好友进群接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param body body core.InviteToRoomRequest true "邀请信息" +// @Response 200 {object} CommonStringResponse{Data=core.InviteToRoomResponseData} "{\"code\":0, ....} +// @Router /api/v1/contact/room/member/invite [post] +func (w *WebApi) inviteToRoom(c *gin.Context) { + var form core.InviteToRoomRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.MemberList) == 0 { + utils.ResponseError(c, "member_list is required", nil) + return + } + info, err := w.WxApi.InviteToRoom(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// deleteRoomMember +// +// @Summary 踢除群成员 +// @Description 踢除群成员接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param body body core.DelChatRoomMemberRequest true "成员信息" +// @Response 200 {object} CommonStringResponse{} "{\"code\":0, ....} +// @Router /api/v1/contact/room/member/delete [post] +func (w *WebApi) deleteRoomMember(c *gin.Context) { + var form core.DelChatRoomMemberRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.MemberList) == 0 { + utils.ResponseError(c, "member_list is required", nil) + return + } + err = w.WxApi.DelChatRoomMember(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// editRoomName +// +// @Summary 修改群聊名称 +// @Description 修改群聊名称接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param body body core.EditChatRoomMemberRequest true "成员信息" +// @Response 200 {object} CommonStringResponse{} "{\"code\":0, ....} +// @Router /api/v1/contact/room/name/modify [post] +func (w *WebApi) editRoomName(c *gin.Context) { + var form core.EditChatRoomMemberRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.RoomWxid) == 0 { + utils.ResponseError(c, "room_wxid is required", nil) + return + } + err = w.WxApi.EditChatRoomName(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// editRoomNotice +// +// @Summary 修改群公告 +// @Description 修改群公告接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param body body core.EditChatRoomNoticeRequest true "公告信息" +// @Response 200 {object} CommonStringResponse{} "{\"code\":0, ....} +// @Router /api/v1/contact/room/notice/modify [post] +func (w *WebApi) editRoomNotice(c *gin.Context) { + var form core.EditChatRoomNoticeRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.RoomWxid) == 0 { + utils.ResponseError(c, "room_wxid is required", nil) + return + } + err = w.WxApi.EditChatRoomNotice(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// editRoomMineNickName +// +// @Summary 修改我在本群的昵称 +// @Description 修改我在本群的昵称接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param body body core.EditRoomMineNickNameRequest true "昵称信息" +// @Response 200 {object} CommonStringResponse{} "{\"code\":0, ....} +// @Router /api/v1/contact/room/mine/nickname/modify [post] +func (w *WebApi) editRoomMineNickName(c *gin.Context) { + var form core.EditRoomMineNickNameRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.RoomWxid) == 0 { + utils.ResponseError(c, "room_wxid is required", nil) + return + } + err = w.WxApi.EditRoomMineNickName(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// showRoomNickName +// +// @Summary 是否显示群成员昵称 +// @Description 是否显示群成员昵称接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param body body core.RoomShowNickNameRequest true "昵称信息" +// @Response 200 {object} CommonStringResponse{} "{\"code\":0, ....} +// @Router /api/v1/contact/room/member/nickname/show [post] +func (w *WebApi) showRoomNickName(c *gin.Context) { + var form core.RoomShowNickNameRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.RoomWxid) == 0 { + utils.ResponseError(c, "room_wxid is required", nil) + return + } + err = w.WxApi.RoomShowNickName(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// roomSaveToContact +// +// @Summary 保存到/移出通讯录 +// @Description 保存到/移出通讯录接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param body body core.SaveRoomSaveToContactRequest true "昵称信息" +// @Response 200 {object} CommonStringResponse{} "{\"code\":0, ....} +// @Router /api/v1/contact/room/to_contact/save [post] +func (w *WebApi) roomSaveToContact(c *gin.Context) { + var form core.SaveRoomSaveToContactRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.RoomWxid) == 0 { + utils.ResponseError(c, "room_wxid is required", nil) + return + } + err = w.WxApi.SaveRoomSaveToContact(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// addRoomMemberToFriend +// +// @Summary 添加群成员为好友 +// @Description 添加群成员为好友接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param body body core.AddFriendRequest true "添加好友信息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/room/friend/add [post] +func (w *WebApi) addRoomMemberToFriend(c *gin.Context) { + var form core.AddFriendRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.Wxid) == 0 { + utils.ResponseError(c, "wxid is required", nil) + return + } + + err = w.WxApi.AddFriend(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// deleteRoom +// +// @Summary 退出群聊 +// @Description 退出群聊接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param body body core.DelChatRoomRequest true "推出的群聊" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/room/delete [post] +func (w *WebApi) deleteRoom(c *gin.Context) { + var form core.DelChatRoomRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + if len(form.RoomWxid) == 0 { + utils.ResponseError(c, "room_wxid is required", nil) + return + } + err = w.WxApi.DelChatRoom(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// autoAcceptRoom +// +// @Summary 自动接受群邀请 +// @Description 自动接受群邀请接口 +// @Tags 群管理 +// @Accept json +// @Produce json +// @Param body body core.AutoAcceptRoomRequest true "自动接受群邀请" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/contact/room/accept/auto [post] +func (w *WebApi) autoAcceptRoom(c *gin.Context) { + var form core.AutoAcceptRoomRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.AutoAcceptRoom(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} diff --git a/api/router.go b/api/router.go new file mode 100644 index 0000000..f3b81a3 --- /dev/null +++ b/api/router.go @@ -0,0 +1,169 @@ +package api + +import ( + "fmt" + "github.com/gin-contrib/pprof" + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/docs" + swaggerFiles "github.com/swaggo/files" + ginSwagger "github.com/swaggo/gin-swagger" + "log/slog" +) + +type WebApi struct { + WxApi *core.WxApi + Port int +} + +func NewWebApi(wxApi *core.WxApi, port int) *WebApi { + return &WebApi{ + WxApi: wxApi, + Port: port, + } +} + +func (w *WebApi) StartWebApi() error { + gin.SetMode(gin.ReleaseMode) + app := gin.New() + app.Use(gin.Recovery()) + api := app.Group("/api") + v1 := api.Group("/v1") + + // swagger doc + docs.SwaggerInfo.Host = fmt.Sprintf("127.0.0.1:%d", w.Port) + docs.SwaggerInfo.Schemes = []string{"http"} + + url := ginSwagger.URL("/api/swagger/doc.json") + app.GET("/api/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, url)) + + pprof.Register(app, "/api/v1/debug/pprof") + + // 登录接口 + v1.GET("/login/version", w.getWxVersion) + v1.GET("/login/userinfo", w.getLoginUserInfo) + v1.POST("/login/qrcode/refresh", w.refreshLoginQrCode) + v1.POST("/login/logout", w.wxLogout) + v1.POST("/login/exit", w.wxExit) + + // 联系人接口 + v1.GET("/contact/friend/list", w.getFriendList) + v1.GET("/contact/friend/:wxid", w.getFriendInfo) + v1.GET("/contact/friend/protocol/brief/:wxid", w.getFriendBriefInfo) + v1.GET("/contact/friend/protocol/detail/:wxid", w.getFriendDetailInfo) + v1.POST("/contact/friend/protocol/detail", w.batchGetFriendDetailInfo) + v1.POST("/contact/friend/remark", w.editFriendRemark) + v1.POST("/contact/friend/add", w.addFriend) + v1.POST("/contact/friend/accept", w.acceptFriend) + v1.POST("/contact/friend/delete/:wxid", w.deleteFriend) + v1.GET("/contact/friend/search", w.searchWxUser) + v1.POST("/contact/friend/add/search", w.addSearchWxUser) + v1.POST("/contact/friend/check/:wxid", w.checkFriend) + v1.POST("/contact/friend/add/auto", w.autoAcceptAddFriend) + v1.POST("/contact/friend/card/auto", w.autoAcceptCard) + v1.POST("/contact/accept/wc_pay/auto", w.autoAcceptWCPay) + v1.POST("/contact/public/list", w.getPublicUserList) + + v1.GET("/contact/room/list", w.getRoomList) + v1.GET("/contact/room/member/list/:roomWxid", w.getRoomMemberList) + v1.GET("/contact/room/protocol/detail/:roomWxid", w.getRoomDetailInfo) + v1.GET("/contact/room/protocol/invite/list/:roomWxid", w.getRoomInviteRelationList) + v1.POST("/contact/room/create", w.createRoom) + v1.POST("/contact/room/protocol/create", w.createRoomByProtocol) + v1.POST("/contact/room/member/invite", w.inviteToRoom) + v1.POST("/contact/room/member/delete", w.deleteRoomMember) + v1.POST("/contact/room/name/modify", w.editRoomName) + v1.POST("/contact/room/notice/modify", w.editRoomNotice) + v1.POST("/contact/room/mine/nickname/modify", w.editRoomMineNickName) + v1.POST("/contact/room/member/nickname/show", w.showRoomNickName) + v1.POST("/contact/room/to_contact/save", w.roomSaveToContact) + v1.POST("/contact/room/friend/add", w.addRoomMemberToFriend) + v1.POST("/contact/room/delete/:roomWxid", w.deleteRoom) + v1.POST("/contact/room/accept/auto", w.autoAcceptRoom) + + v1.POST("/message/send/text", w.sendTextMsg) + v1.POST("/message/send/card", w.sendCardMsg) + v1.POST("/message/send/link", w.sendLinkMsg) + v1.POST("/message/send/image", w.sendImageMsg) + v1.POST("/message/send/file", w.sendFileMsg) + v1.POST("/message/send/video", w.sendVideoMsg) + v1.POST("/message/send/gif", w.sendGifMsg) + v1.POST("/message/send/xml", w.sendXmlMsg) + v1.POST("/message/send/forward", w.sendForwardMsg) + v1.POST("/message/register_msg_http_callback", w.registerMsgHttpCallBack) + + v1.POST("/cdn/initial", w.cdnInitial) + v1.POST("/cdn/upload", w.cdnUpload) + v1.POST("/cdn/download", w.cdnDownload) + v1.POST("/cdn/workwx/download", w.cdnWorkWxDownload) + v1.POST("/cdn/send/text", w.cdnSendTextMsg) + v1.POST("/cdn/send/image", w.cdnSendImageMsg) + v1.POST("/cdn/send/video", w.cdnSendVideoMsg) + v1.POST("/cdn/send/file", w.cdnSendFileMsg) + v1.POST("/cdn/send/card_link", w.cdnSendCardLinkMsg) + v1.POST("/cdn/send/gif", w.cdnSendGifMsg) + v1.POST("/cdn/send/mini_program", w.cdnSendMiniProgramMsg) + v1.POST("/cdn/send/video_number", w.cdnSendVideoMomentMsg) + v1.POST("/cdn/send/card", w.cdnSendCardMsg) + v1.POST("/cdn/send/location", w.cdnSendLocationMsg) + v1.POST("/cdn/send/revoke", w.cdnSendRevokeMsg) + v1.POST("/cdn/send/xml", w.cdnSendXmkMsg) + v1.POST("/cdn/send/gif_new", w.cdnSendGifMsgNew) + + v1.GET("/workwx/user/list", w.getWorkWxUserList) + v1.GET("/workwx/room/list", w.getWorkWxRoomList) + v1.POST("/workwx/room/member/list", w.getWorkWxRoomMemberList) + + v1.GET("/collect/list", w.getCollectList) + v1.POST("/collect/send", w.sendCollect) + v1.POST("/collect/send/msgid", w.sendCollectMsgByMsgId) + + v1.GET("/tag/list", w.getTagList) + v1.POST("/tag/add", w.addTag) + v1.POST("/tag/delete", w.deleteTag) + v1.POST("/tag/modify", w.modifyTag) + v1.POST("/tag/add/user", w.addTagToUser) + v1.POST("/tag/list/user", w.getTagListByWxid) + + v1.POST("/voice/to/text", w.voiceToText) + + v1.POST("/mini/program/code", w.getMiniProgramCode) + + v1.POST("/ui/switch/session", w.switchSession) + v1.POST("/ui/clear/chat/record", w.clearChatRecord) + v1.POST("/ui/chat/msg/not/notify", w.chatMsgNotNotify) + v1.POST("/ui/chat/session/top", w.chatSessionTop) + + v1.POST("/moment/list", w.getMoment) + v1.POST("/moment/comment", w.commentMoment) + v1.POST("/moment/like", w.likeMoment) + v1.POST("/moment/send", w.sendMoment) + v1.POST("/moment/upload/image", w.uploadMomentImage) + v1.POST("/moment/friend/list", w.getFriendMoment) + + v1.POST("/video_moment/init", w.videoMomentInit) + v1.POST("/video_moment/search", w.videoMomentSearch) + v1.POST("/video_moment/user/home", w.videoMomentUserHome) + v1.POST("/video_moment/video/detail", w.videoMomentVideoDetail) + v1.POST("/video_moment/follow", w.videoMomentFollow) + v1.POST("/video_moment/like", w.videoMomentLike) + v1.POST("/video_moment/get/session_id", w.videoMomentGetSessionId) + v1.POST("/video_moment/send/msg", w.videoMomentSendMsg) + v1.POST("/video_moment/create/virtual_nickname", w.videoMomentCreateVirtualNickName) + v1.POST("/video_moment/switch/virtual_nickname", w.videoMomentSwitchVirtualNickName) + v1.POST("/video_moment/delete/virtual_nickname", w.videoMomentDeleteVirtualNickName) + + v1.POST("/live/enter", w.liveEnter) + v1.POST("/live/get/online/user", w.liveGetOnlineUser) + v1.POST("/live/get/change/info", w.liveGetChangeInfo) + v1.POST("/live/send/msg", w.liveSendMsg) + v1.POST("/live/get/shelf", w.liveGetShelf) + + v1.POST("/other/get_a8_key", w.getA8Key) + v1.POST("/other/decrypt_img", w.decryptImg) + + // 启动一个API服务 + slog.Info("启动服务WEB服务", "API监听", fmt.Sprintf("http://127.0.0.1:%d", w.Port), + "接口文档", fmt.Sprintf("http://127.0.0.1:%d%s", w.Port, "/api/swagger/index.html")) + return app.Run(fmt.Sprintf(":%d", w.Port)) +} diff --git a/api/tag.go b/api/tag.go new file mode 100644 index 0000000..bc71567 --- /dev/null +++ b/api/tag.go @@ -0,0 +1,156 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// getTagList +// +// @Summary 获取标签列表 +// @Description 获取标签列表接口 +// @Tags 标签 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse{Data=[]core.GetTagListResponseDataItem} "{\"code\":0, ....} +// @Router /api/v1/tag/list [get] +func (w *WebApi) getTagList(c *gin.Context) { + list, err := w.WxApi.GetTagList() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", list) + return +} + +// addTag +// +// @Summary 添加标签 +// @Description 添加标签接口 +// @Tags 标签 +// @Accept json +// @Produce json +// @Param body body core.AddTagRequest true "标签信息" +// @Response 200 {object} CommonStringResponse{Data=core.AddTagResponseData} "{\"code\":0, ....} +// @Router /api/v1/tag/add [post] +func (w *WebApi) addTag(c *gin.Context) { + var form core.AddTagRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.AddTag(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// deleteTag +// +// @Summary 删除标签 +// @Description 删除标签接口 +// @Tags 标签 +// @Accept json +// @Produce json +// @Param body body core.DeleteTagRequest true "标签信息" +// @Response 200 {object} CommonStringResponse{Data=core.DeleteTagResponseData} "{\"code\":0, ....} +// @Router /api/v1/tag/delete [post] +func (w *WebApi) deleteTag(c *gin.Context) { + var form core.DeleteTagRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.DeleteTag(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// modifyTag +// +// @Summary 修改标签 +// @Description 修改标签接口 +// @Tags 标签 +// @Accept json +// @Produce json +// @Param body body core.ModifyTagRequest true "标签信息" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/tag/modify [post] +func (w *WebApi) modifyTag(c *gin.Context) { + var form core.ModifyTagRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.ModifyTag(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// addTagToUser +// +// @Summary 为用户添加标签 +// @Description 为用户添加标签接口 +// @Tags 标签 +// @Accept json +// @Produce json +// @Param body body core.AddTagToUserRequest true "标签信息" +// @Response 200 {object} CommonStringResponse{Data=core.AddTagToUserResponseData} "{\"code\":0, ....} +// @Router /api/v1/tag/add/user [post] +func (w *WebApi) addTagToUser(c *gin.Context) { + var form core.AddTagToUserRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.AddTagToUser(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} + +// getTagListByWxid +// +// @Summary 获取用户标签列表 +// @Description 获取用户标签列表接口 +// @Tags 标签 +// @Accept json +// @Produce json +// @Param body body core.GetTagListByWxidRequest true "标签信息" +// @Response 200 {object} CommonStringResponse{Data=core.GetTagListByWxidResponseData} "{\"code\":0, ....} +// @Router /api/v1/tag/list/user [post] +func (w *WebApi) getTagListByWxid(c *gin.Context) { + var form core.GetTagListByWxidRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + ret, err := w.WxApi.GetTagListByWxid(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", ret) + return +} diff --git a/api/ui.go b/api/ui.go new file mode 100644 index 0000000..6bc65b2 --- /dev/null +++ b/api/ui.go @@ -0,0 +1,104 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// switchSession +// +// @Summary 切换会话 +// @Description 切换会话接口 +// @Tags 界面 +// @Accept json +// @Produce json +// @Param body body core.SwitchSessionRequest true "会话" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/ui/switch/session [post] +func (w *WebApi) switchSession(c *gin.Context) { + var form core.SwitchSessionRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.SwitchSession(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// clearChatRecord +// +// @Summary 清空聊天记录 +// @Description 清空聊天记录接口 +// @Tags 界面 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/ui/clear/chat/record [post] +func (w *WebApi) clearChatRecord(c *gin.Context) { + err := w.WxApi.ClearChatRecord() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// chatMsgNotNotify +// +// @Summary 消息免打扰 +// @Description 消息免打扰接口 +// @Tags 界面 +// @Accept json +// @Produce json +// @Param body body core.ChatMsgNotNotifyRequest true "消息免打扰" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/ui/chat/msg/not/notify [post] +func (w *WebApi) chatMsgNotNotify(c *gin.Context) { + var form core.ChatMsgNotNotifyRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.ChatMsgNotNotify(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} + +// chatSessionTop +// +// @Summary 置顶会话 +// @Description 置顶会话接口 +// @Tags 界面 +// @Accept json +// @Produce json +// @Param body body core.ChatSessionTopRequest true "会话" +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/ui/chat/session/top [post] +func (w *WebApi) chatSessionTop(c *gin.Context) { + var form core.ChatSessionTopRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + err = w.WxApi.ChatSessionTop(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} diff --git a/api/video_moment.go b/api/video_moment.go new file mode 100644 index 0000000..2792572 --- /dev/null +++ b/api/video_moment.go @@ -0,0 +1,279 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// videoMomentInit +// +// @Summary 视频号初始化 +// @Description 视频号初始化接口 +// @Tags 视频号 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse{Data=core.VideoMomentInitResponseData} "{\"code\":0, ....} +// @Router /api/v1/video_moment/init [post] +func (w *WebApi) videoMomentInit(c *gin.Context) { + info, err := w.WxApi.VideoMomentInit() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// videoMomentSearch +// +// @Summary 搜索视频号 +// @Description 搜索视频号接口 +// @Tags 视频号 +// @Accept json +// @Produce json +// @Param body body core.VideoMomentSearchRequest true "搜索信息" +// @Response 200 {object} CommonStringResponse{Data=interface{}} "{\"code\":0, ....} +// @Router /api/v1/video_moment/search [post] +func (w *WebApi) videoMomentSearch(c *gin.Context) { + var form core.VideoMomentSearchRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.VideoMomentSearch(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// videoMomentUserHome +// +// @Summary 视频号用户主页 +// @Description 视频号用户主页接口 +// @Tags 视频号 +// @Accept json +// @Produce json +// @Param body body core.VideoMomentUserHomeRequest true "用户信息" +// @Response 200 {object} CommonStringResponse{Data=interface{}} "{\"code\":0, ....} +// @Router /api/v1/video_moment/user/home [post] +func (w *WebApi) videoMomentUserHome(c *gin.Context) { + var form core.VideoMomentUserHomeRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.VideoMomentUserHome(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// videoMomentVideoDetail +// +// @Summary 查看视频详细信息(包含评论) +// @Description 查看视频详细信息(包含评论)接口 +// @Tags 视频号 +// @Accept json +// @Produce json +// @Param body body core.VideoMomentVideoDetailRequest true "视频信息" +// @Response 200 {object} CommonStringResponse{Data=interface{}} "{\"code\":0, ....} +// @Router /api/v1/video_moment/video/detail [post] +func (w *WebApi) videoMomentVideoDetail(c *gin.Context) { + var form core.VideoMomentVideoDetailRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.VideoMomentVideoDetail(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// videoMomentFollow +// +// @Summary 关注视频号 +// @Description 关注视频号接口 +// @Tags 视频号 +// @Accept json +// @Produce json +// @Param body body core.VideoMomentFollowRequest true "关注信息" +// @Response 200 {object} CommonStringResponse{Data=core.VideoMomentFollowResponseData} "{\"code\":0, ....} +// @Router /api/v1/video_moment/follow [post] +func (w *WebApi) videoMomentFollow(c *gin.Context) { + var form core.VideoMomentFollowRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.VideoMomentFollow(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// videoMomentLike +// +// @Summary 点赞视频 +// @Description 点赞视频接口 +// @Tags 视频号 +// @Accept json +// @Produce json +// @Param body body core.VideoMomentLikeRequest true "点赞信息" +// @Response 200 {object} CommonStringResponse{Data=core.VideoMomentLikeResponseData} "{\"code\":0, ....} +// @Router /api/v1/video_moment/like [post] +func (w *WebApi) videoMomentLike(c *gin.Context) { + var form core.VideoMomentLikeRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.VideoMomentLike(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// videoMomentGetSessionId +// +// @Summary 获取私信sessionId +// @Description 获取私信sessionId接口 +// @Tags 视频号 +// @Accept json +// @Produce json +// @Param body body core.VideoMomentGetSessionIdRequest true "sessionId信息" +// @Response 200 {object} CommonStringResponse{Data=core.VideoMomentGetSessionIdResponseData} "{\"code\":0, ....} +// @Router /api/v1/video_moment/get/session_id [post] +func (w *WebApi) videoMomentGetSessionId(c *gin.Context) { + var form core.VideoMomentGetSessionIdRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.VideoMomentGetSessionId(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// videoMomentSendMsg +// +// @Summary 发送私信 +// @Description 发送私信接口 +// @Tags 视频号 +// @Accept json +// @Produce json +// @Param body body core.VideoMomentSendMsgRequest true "发送信息" +// @Response 200 {object} CommonStringResponse{Data=core.VideoMomentSendMsgResponseData} "{\"code\":0, ....} +// @Router /api/v1/video_moment/send/msg [post] +func (w *WebApi) videoMomentSendMsg(c *gin.Context) { + var form core.VideoMomentSendMsgRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.VideoMomentSendMsg(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// videoMomentCreateVirtualNickName +// +// @Summary 创建虚拟昵称 +// @Description 创建虚拟昵称接口 +// @Tags 视频号 +// @Accept json +// @Produce json +// @Param body body core.VideoMomentCreateVirtualNickNameRequest true "昵称信息" +// @Response 200 {object} CommonStringResponse{Data=interface{}} "{\"code\":0, ....} +// @Router /api/v1/video_moment/create/virtual_nickname [post] +func (w *WebApi) videoMomentCreateVirtualNickName(c *gin.Context) { + var form core.VideoMomentCreateVirtualNickNameRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.VideoMomentCreateVirtualNickName(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// videoMomentSwitchVirtualNickName +// +// @Summary 切换虚拟昵称 +// @Description 切换虚拟昵称接口 +// @Tags 视频号 +// @Accept json +// @Produce json +// @Param body body core.VideoMomentSwitchVirtualNickNameRequest true "昵称信息" +// @Response 200 {object} CommonStringResponse{Data=interface{}} "{\"code\":0, ....} +// @Router /api/v1/video_moment/switch/virtual_nickname [post] +func (w *WebApi) videoMomentSwitchVirtualNickName(c *gin.Context) { + var form core.VideoMomentSwitchVirtualNickNameRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.VideoMomentSwitchVirtualNickName(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} + +// videoMomentDeleteVirtualNickName +// +// @Summary 删除虚拟昵称 +// @Description 删除虚拟昵称接口 +// @Tags 视频号 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse "{\"code\":0, ....} +// @Router /api/v1/video_moment/delete/virtual_nickname [post] +func (w *WebApi) videoMomentDeleteVirtualNickName(c *gin.Context) { + err := w.WxApi.VideoMomentDeleteVirtualNickName() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", nil) + return +} diff --git a/api/voice.go b/api/voice.go new file mode 100644 index 0000000..86e83a3 --- /dev/null +++ b/api/voice.go @@ -0,0 +1,33 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// voiceToText +// +// @Summary 语音转文字 +// @Description 语音转文字接口 +// @Tags 语音转文字 +// @Accept json +// @Produce json +// @Param body body core.VoiceToTextRequest true "语音信息" +// @Response 200 {object} CommonStringResponse{Data=core.VoiceToTextResponseData} "{\"code\":0, ....} +// @Router /api/v1/voice/to/text [post] +func (w *WebApi) voiceToText(c *gin.Context) { + var form core.VoiceToTextRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + info, err := w.WxApi.VoiceToText(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", info) + return +} diff --git a/api/workwx.go b/api/workwx.go new file mode 100644 index 0000000..bf273ac --- /dev/null +++ b/api/workwx.go @@ -0,0 +1,71 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/core" + "github.com/goWxHook/goWxHook/utils" +) + +// getWorkWxUserList +// +// @Summary 获取企业微信用户列表 +// @Description 获取企业微信用户列表接口 +// @Tags 企业微信 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse{Data=[]core.GetWorkWxUserListResponseDataItem} "{\"code\":0, ....} +// @Router /api/v1/workwx/user/list [get] +func (w *WebApi) getWorkWxUserList(c *gin.Context) { + list, err := w.WxApi.GetWorkWxUserList() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", list) + return +} + +// getWorkWxRoomList +// +// @Summary 获取企业微信群列表 +// @Description 获取企业微信群列表接口 +// @Tags 企业微信 +// @Accept json +// @Produce json +// @Response 200 {object} CommonStringResponse{Data=[]core.GetWorkWxRoomListResponseDataItem} "{\"code\":0, ....} +// @Router /api/v1/workwx/room/list [get] +func (w *WebApi) getWorkWxRoomList(c *gin.Context) { + list, err := w.WxApi.GetWorkWxRoomList() + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", list) + return +} + +// getWorkWxRoomMemberList +// +// @Summary 获取企业微信群成员列表 +// @Description 获取企业微信群成员列表接口 +// @Tags 企业微信 +// @Accept json +// @Produce json +// @Param body body core.GetWorkWxChatRoomMemberRequest true "群信息" +// @Response 200 {object} CommonStringResponse{Data=core.GetWorkWxChatRoomMemberResponseData} "{\"code\":0, ....} +// @Router /api/v1/workwx/room/member/list [post] +func (w *WebApi) getWorkWxRoomMemberList(c *gin.Context) { + var form core.GetWorkWxChatRoomMemberRequest + err := c.ShouldBindJSON(&form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + list, err := w.WxApi.GetWorkWxChatRoomMember(form) + if err != nil { + utils.ResponseError(c, err.Error(), nil) + return + } + utils.ResponseOK(c, "success", list) + return +} diff --git a/core/ListenServer.go b/core/ListenServer.go new file mode 100644 index 0000000..76c139c --- /dev/null +++ b/core/ListenServer.go @@ -0,0 +1,168 @@ +package core + +import ( + "bytes" + "errors" + "fmt" + "github.com/gin-gonic/gin" + "github.com/goWxHook/goWxHook/utils" + "github.com/goWxHook/goWxHook/utils/json" + "io" + "log/slog" + "net/http" + "strconv" + "time" +) + +var ( + + // ReportClientConnecFunc 客户连接 + ReportClientConnecFunc func(id string) + // ReportClientCloseFunc 客户关闭 + ReportClientCloseFunc func(id string) + // ReportClientMsgFunc 收到消息 + ReportClientMsgFunc func(id string, data string) + + // wxInitiativeCallQueue 主动消息队列 + // key: 消息id + wxInitiativeCallQueue = utils.NewSafeMap[int, *wxCallQueue]() + + registerPid = make(map[int]bool) +) + +// 每种消息类型的主动消息队列 +type wxCallQueue struct { + Send chan string // 是否有消息等待投递 + Resp chan string // 应答消息 +} + +func registerWxCallBackListen(port int) error { + gin.SetMode(gin.ReleaseMode) + callback := gin.New() + callback.Use(gin.Recovery()) + callback.POST("/send/error", func(c *gin.Context) { + data, _ := io.ReadAll(c.Request.Body) + lastErrorStr = string(data) + }) + // 客户端上报(被动消息) + clientGroup := callback.Group("/report/client") + { + clientGroup.GET("/connect", reportClientConnect) + clientGroup.GET("/close", reportClientClose) + clientGroup.POST("/msg", reportClientMsg) + clientGroup.POST("/log", reportTest) + } + slog.Info(fmt.Sprintf("启动微信回调接收监听 :%d", port)) + return callback.Run(fmt.Sprintf(":%d", port)) +} + +func RegisterClientConnectFunc(f func(id string)) { + ReportClientConnecFunc = f +} + +func reportTest(c *gin.Context) { + id, _ := strconv.Atoi(c.Query("id")) + data, _ := io.ReadAll(c.Request.Body) + defer c.Request.Body.Close() + slog.Debug("test log", "id", id, "data", string(data)) +} + +func reportClientConnect(c *gin.Context) { + id := c.Query("id") + if ReportClientConnecFunc != nil { + ReportClientConnecFunc(id) + } +} + +func RegisterClientCloseFunc(f func(id string)) { + ReportClientCloseFunc = f +} + +func reportClientClose(c *gin.Context) { + id := c.Query("id") + if ReportClientCloseFunc != nil { + ReportClientCloseFunc(id) + } +} + +func registerClientMsgFunc(f func(id string, data string)) { + ReportClientMsgFunc = f +} + +type wxRespDataSimple struct { + Type int `json:"type"` +} + +func reportClientMsg(c *gin.Context) { + defer c.Request.Body.Close() + id := c.Query("id") + data, _ := io.ReadAll(c.Request.Body) + // 拦截解析主动消息 + var respData wxRespDataSimple + _ = json.Unmarshal(data, &respData) + if respData.Type != 0 { + // 检查主动消息 + if v, ok := wxInitiativeCallQueue.Get(respData.Type); ok { + if respData.Type == loginSuccessMsg { + sr := WxLoginInfoResp{} + _ = json.Unmarshal(data, &sr) + if _, isexits := registerPid[sr.Data.Pid]; !isexits { + select { + case message, ifSubscribe := <-v.Send: + if ifSubscribe { + v.Resp <- string(data) + _ = message + return + } + } + } + } else { + select { + case message, ifSubscribe := <-v.Send: + if ifSubscribe { + v.Resp <- string(data) + _ = message + return + } + } + } + + } + } + // 无订阅, 进入用户回调 + dataStr := string(data) + if ReportClientMsgFunc != nil { + ReportClientMsgFunc(id, dataStr) + } +} + +type HttpCallBackRequest struct { + Url string `json:"url"` + Timeout int `json:"timeout"` // 默认5秒 +} + +// RegisterHttpCallback 注册http消息回调 +func RegisterHttpCallback(url string, timeout int) error { + if len(url) == 0 { + return errors.New("url不能为空") + } + if timeout == 0 { + timeout = 5 + } + if timeout > 60 { + timeout = 60 + } + registerClientMsgFunc(func(id string, data string) { + debugOutput(data) + // 注册http post回调 + client := http.Client{ + Timeout: time.Duration(timeout) * time.Second, + } + _, err := client.Post(url, "application/json", io.NopCloser(bytes.NewBufferString(data))) + if err != nil { + slog.Error("RegisterHttpCallback: http post error", "url", url, "error", err) + return + } + }) + return nil +} diff --git a/core/WxModule.go b/core/WxModule.go new file mode 100644 index 0000000..0dae87a --- /dev/null +++ b/core/WxModule.go @@ -0,0 +1,106 @@ +package core + +import ( + "errors" + "fmt" + "github.com/goWxHook/goWxHook/resource" + "github.com/goWxHook/goWxHook/utils" + "github.com/goWxHook/goWxHook/utils/tcp" + "log/slog" + "os" + "os/exec" + "strconv" + "time" +) + +var ( + GlobalCallUrl string + lastErrorStr string + GlobalDebug bool +) + +func init() { + files := map[string]*[]byte{ + "Helper_3.9.10.19.dll": &resource.HelperDll, + "Loader_3.9.10.19.dll": &resource.LoaderDll, + "callexe.exe": &resource.CallExe, + "HPSocket4C.dll": &resource.HPSocket4C, + } + for name, val := range files { + if !utils.FileExists(name) { + if err := utils.WriteFile(name, *val); err != nil { + panic(err) + } + } + } +} + +// 获取宿主机上下一个可用的Api端口,检测端口和+1的端口是否可用 +func getNextAvailableApiPort(fromPort int) (int, error) { + const lowerLimit = 1000 + const upperLimit = 65535 + searchDown := (fromPort - lowerLimit) > (upperLimit - fromPort) + var step int + if searchDown { + step = -1 + } else { + step = 1 + } + + var m = make(map[int]bool) + for { + fromPort += step + if fromPort < lowerLimit || fromPort > upperLimit { + return 0, errors.New("no available port") + } + portUsed := tcp.CheckPortConnection("127.0.0.1", fromPort) + m[fromPort] = portUsed + if !portUsed { + beforePort := fromPort - step + if v, ok := m[beforePort]; ok && !v { + if searchDown { + return fromPort, nil + } else { + return beforePort, nil + } + } + } + } +} + +// WxModuleInit 初始化微信模块 +// 除此之外,系统主动检测启动端口用于dll和服务内部统信 +func WxModuleInit(listenerPort int, debug bool) error { + GlobalDebug = debug + if GlobalDebug { + slog.SetLogLoggerLevel(slog.LevelDebug) + } + // 获取内部服务使用端口 + port, err := getNextAvailableApiPort(listenerPort) + if err != nil { + return err + } + var lserr error + go func() { + lserr = registerWxCallBackListen(port + 1) + }() + time.Sleep(2 * time.Second) + if lserr != nil { + return lserr + } + args := []string{strconv.Itoa(os.Getpid()), strconv.Itoa(port)} + cmd := exec.Command(".\\callexe.exe", args...) + err = cmd.Start() + if err != nil { + return err + } + // 等待3秒进程启动 + time.Sleep(3 * time.Second) + GlobalCallUrl = fmt.Sprintf("http://127.0.0.1:%d", port) + slog.Info(fmt.Sprintf("启动微信监听 %d\n", port)) + api := WxApi{} + if err := api.Ping(); err != nil { + return err + } + return nil +} diff --git a/core/WxStruct.go b/core/WxStruct.go new file mode 100644 index 0000000..fae5c2e --- /dev/null +++ b/core/WxStruct.go @@ -0,0 +1,29 @@ +package core + +type WxCommonResponse struct { + Data WxCommonData `json:"data"` + Type int `json:"type"` +} + +// WxCommonData 微信通用返回的结构体 +type WxCommonData struct { + Errcode int `json:"errcode"` // 0代表成功,其他代表失败 + Errmsg string `json:"errmsg"` + Status int `json:"status"` + Wxid string `json:"wxid"` +} + +type WxLoginInfoResp struct { + Data UserClientInfo `json:"data"` + Type int `json:"type"` +} +type UserClientInfo struct { + Account string `json:"account"` + Avatar string `json:"avatar"` + Nickname string `json:"nickname"` + Phone string `json:"phone"` + Pid int `json:"pid"` + UnreadMsgCount int `json:"unread_msg_count"` + WxUserDir string `json:"wx_user_dir"` + Wxid string `json:"wxid"` +} diff --git a/core/callapi.go b/core/callapi.go new file mode 100644 index 0000000..7980689 --- /dev/null +++ b/core/callapi.go @@ -0,0 +1,381 @@ +package core + +import ( + "bytes" + "fmt" + "github.com/goWxHook/goWxHook/utils/json" + "io" + "log/slog" + "net/http" + "time" +) + +const ( + MtDebugLog = 11024 // debug消息 + loginSuccessMsg = 11025 // 登录成功 + MtUserLogin = 11025 // 登录消息 + MtUserLogout = 11026 // 注销消息 + MtSqlQuery = 11027 // 数据库查询消息 + MtDataOwnerMsg = 11028 // 获取我的信息消息 + MtDataWxidMsg = 11029 // 获取单个好友信息 + MtDataFriendsMsg = 11030 // 获取好友列表消息 + MtDataChatroomsMsg = 11031 // 获取群聊列表消息 + MtDataChatroomMembersMsg = 11032 // 获取群成员消息 + MtDataPublicsMsg = 11033 // 获取公众号消息 + MtUpdateWxidMsg = 11034 // 从网络更新单个好友信息消息 + MtUpdateRoomMemberMsg = 11035 // 从网络更新群成员信息消息 + MtSendTextmsg = 11036 // 发送文本消息 + MtSendChatroomAtmsg = 11037 // 发送群@消息 + MtSendCardmsg = 11038 // 发送名片消息 + MtSendLinkmsg = 11039 // 发送链接消息 + MtSendImgmsg = 11040 // 发送图片消息 + MtSendFilemsg = 11041 // 发送文件消息 + MtSendVideomsg = 11042 // 发送视频消息 + MtSendGifmsg = 11043 // 发送gif消息 + MtRecvTextMsg = 11046 // 接收文本消息 + MtRecvPictureMsg = 11047 // 接收图片消息 + MtRecvVoiceMsg = 11048 // 接收视频消息 + MtRecvFriendMsg = 11049 // 接收申请好友消息 + MtRecvCardMsg = 11050 // 接收名片消息 + MtRecvVideoMsg = 11051 // 接收视频消息 + MtRecvEmojiMsg = 11052 // 接收表情消息 + MtRecvLocationMsg = 11053 // 接收位置消息 + MtRecvLinkMsg = 11054 // 接收链接消息 + MtRecvFileMsg = 11055 // 接收文件消息 + MtRecvMiniappMsg = 11056 // 接收小程序消息 + MtRecvWcpayMsg = 11057 // 接收好友转账消息 + MtRecvSystemMsg = 11058 // 接收系统消息 + MtRecvRevokeMsg = 11059 // 接收撤回消息 + MtRecvOtherMsg = 11060 // 接收其他未知消息 + MtRecvOtherAppMsg = 11061 // 接收应用类型未知消息 + MtAddFriendMsg = 11062 // 发送加好友消息 + MtModFriendRemarkMsg = 11063 // 发送修改好友备注消息 + MtDelFriendMsg = 11064 // 发送删除好友消息 + MtAcceptFriendMsg = 11065 // 发送同意加好友申请消息 + MtAcceptWcpayMsg = 11066 // 发送接收好友转帐消息 + MtAcceptRoomMsg = 11067 // 发送同意进群邀请消息 + MtCreateRoomMsg = 11068 // 发送创建群聊消息 + MtInviteToRoomMsg = 11069 // 发送邀请好友进群消息,40人以下 + MtInviteToRoomReqMsg = 11070 // 发送邀请好友进群消息,40人以上 + MtDelRoomMemberMsg = 11071 // 发送删除群成员消息 + MtModRoomNameMsg = 11072 // 发送修改群名称消息 + MtModRoomNoticeMsg = 11073 // 发送修改群通知消息 + MtModRoomMemberNameMsg = 11074 // 发送修改我在本群的昵称消息 + MtModRoomShowNameMsg = 11075 // 发送修改显示群昵称消息 + MtSaveRoomToContactMsg = 11076 // 发送保存到联系人消息 + MtQuitDelRoomMsg = 11077 // 发送退出并删除群消息 + MtModRecvNotifyMsg = 11078 // 发送消息免打扰消息 + MtModChatSessionTopMsg = 11079 // 发送置顶消息 + MtZombieCheckMsg = 11080 // 发送无痕清粉消息 + MtAutoAcceptFriendMsg = 11081 // 发送自动同意好友申请消息 + MtAutoAcceptWcpayMsg = 11082 // 发送自动同意好友转帐消息 + MtAutoAcceptRoomMsg = 11083 // 发送自动进群邀请消息 + MtAutoAcceptCardMsg = 11084 // 发送自动加名片消息 + MtDecryptImgMsg = 11085 // 发送解密图片消息 + MtOpenBrowserMsg = 11086 // 发送打开浏览器消息 + MtRefreshLoginQrcode = 11087 // 刷新登录二维码 + MtSwitchSessionMsg = 11090 // 发送切换当前会话消息 + MtSearchWxUserMsg = 11096 // 搜索微信用户 + MtAddSearchUserMsg = 11097 // 添加搜索的微信用户 + MtVoiceToTextMsg = 11112 // 语音消息转文本(旧) + MtSendXmlMsg = 11113 // 发送XML原始消息 + MtLogoutMsg = 11104 // 发送注销登录消息 + MtExitMsg = 11105 // 发送退出微信消息 + MtClearChatRecordMsg = 11108 // 清除聊天记录 + MtGetCollectListMsg = 11109 // 获取收藏列表 + MtSendCollectMsg = 11110 // 发送收藏(旧) + MtSendCollectMsgByMsgId = 11111 // 收藏指定消息(旧) + MtGetWorkWxChatRoomMsg = 11129 // 获取企业微信群 + MtGetWorkWxChatRoomMemberMsg = 11130 //获取企业微信群成员 + MtGetWorkWxUserListMsg = 11132 // 获取企业微信好友 + MtGetChatRoomInviteRelationMsg = 11134 // 获取群成员邀请关系(协议) + MtGetA8KeyMsg = 11135 // A8Key接口 + MtGetMiniProgramCodeMsg = 11136 // 获取小程序授权code + MtAddTagMsg = 11137 // 添加标签 + MtDeleteTagMsg = 11138 // 删除标签 + MtModifyTagMsg = 11139 // 修改标签 + MtAddTagToUserMsg = 11140 // 批量给用户加标签 + MtGetTagListByWxidMsg = 11141 // 获取指定好友的所有标签 + MtGetTagListMsg = 11142 // 获取标签列表 + MtGetMomentMsg = 11145 // 获取朋友圈 + MtCommentMomentMsg = 11146 // 朋友圈评论 + MtLikeMomentMsg = 11147 // 朋友圈点赞 + MtSendMomentMsg = 11148 // 朋友圈发表 + MtUploadMomentImageMsg = 11149 // 朋友圈上传图片 + MtGetFriendMomentMsg = 11150 // 获取好友朋友圈 + MtVideoMomentInitMsg = 11160 // 视频号初始化 + MtVideoMomentSearchMsg = 11161 // 视频号搜索 + MtLiveEnterMsg = 11162 //进入直播间 + MtLiveGetChangeInfoMsg = 11163 // 获取直播间变动信息(人气,实时发言等) + MtLiveSendMsg = 11164 // 发送直播间消息 + MtVideoMomentFollowMsg = 11167 // 关注博主 + MtVideoMomentLikeMsg = 11168 // 视频号点赞 + MtVideoMomentVideoDetailMsg = 11169 // 查看视频详细信息(包含评论) + MtVideoMomentUserHomeMsg = 11170 // 视频号用户主页 + MtLiveGetOnlineUserMsg = 11172 // 获取直播间在线人员 + MtGetFriendDetailMsg = 11174 // 获取好友详细信息(协议) + MtLiveGetShelfMsg = 11186 // 获取直播间货架 + MtVideoMomentCreateVirtualNickNameMsg = 11194 // 视频号创建虚拟昵称 + MtVideoMomentSwitchVirtualNickNameMsg = 11195 // 视频号切换虚拟昵称 + MtVideoMomentDeleteVirtualNickNameMsg = 11197 // 视频号删除虚拟昵称 + MtVideoMomentGetSessionIdMsg = 11202 // 获取视频号私信sessionId + MtVideoMomentSendMsg = 11203 // 发送视频号私信 + MtCdnSendXmlMsg = 11214 // 发送XML原始消息 + MtCdnInitialMsg = 11228 // CDN初始化 + MtCdnUploadFileMsg = 11229 // CDN上传 + MtCdnDownloadFileMsg = 11230 // CDN下载 + MtCdnSendImageMsg = 11231 // 发送图片消息 + MtCdnSendVideoMsg = 11233 // 发送视频消息 + MtCdnSendFileMsg = 11235 // 发送文件消息 + MtCdnSendCardLinkMsg = 11236 // 发送链接卡片消息 + MtCdnSendTextMsg = 11237 // 发送文本消息 + MtCdnSendLocationMsg = 11238 // 发送位置 + MtCdnSendCardMsg = 11239 // 发送名片 + MtCdnSendAtTextMsg = 11240 // 发送At消息 + MtCdnSendGifMsg = 11241 // 发送动图消息 + MtCdnSendMiniProgramMsg = 11242 // 发送小程序 + MtCdnSendVideoMomentMsg = 11243 // 发送视频号 + MtCdnSendRevokeMsg = 11244 // 撤回消息 + MtForwardMsg = 11245 // 转发任意类型消息 + MtCreateRoomByProtocolMsg = 11246 // 创建群聊(协议) + MtWorkWxCdnDownloadMsg = 11253 // 企业微信CDN + MtCdnSendGifMsgNew = 11254 // 发送动图消息New +) + +type RespJson struct { + Error int `json:"error"` + Msg string `json:"msg"` + Data any `json:"data"` +} + +type WxApi struct { + UserInfo UserClientInfo + TimeOut int // 上传大文件时记得手动拉长超时 +} + +func debugOutput(msg string) { + if GlobalDebug { + slog.Debug(msg) + } +} + +// Ping 📡 微信与服务的健康脉动,轻触即刻,安心无边 +// 骑上代码的独角兽,驰骋在微信与服务的和谐旋律中; +// 若路遇荆棘(错误翩翩),WxError的信使将携谜团(-1)翩然而至。 +func (*WxApi) Ping() error { + // 抛出魔法飞毯,直抵全球通讯站(GlobalCallUrl)/ping + resp, err := http.Get(GlobalCallUrl + "/ping") + if err != nil { + // 魔法失效,WxError的封印(-1)悄然降临,记录下不解之谜 + return WxError{-1, err.Error()} + } + defer resp.Body.Close() // 隐身术,抹去所有痕迹,不留下一丝涟漪 + + // 倾听回响,秘密文字在耳边低语 + data, err := io.ReadAll(resp.Body) + if err != nil { + // 文字破碎,WxError的警告(-2)再次响起 + return WxError{-2, err.Error()} + } + + // 古卷解读,将回响化为RespJson的智慧之光 + rjson := RespJson{} + json.Unmarshal(data, &rjson) + + // 密文比对,10000是神秘的共鸣密码 + if rjson.Error != 10000 { + // 密码失真,WxError的困惑(-rjson.Error)引领着归途 + return WxError{rjson.Error, rjson.Msg} + } + + // 脉动稳健,旅程圆满,一切安好 + return nil +} + +// GetUserWeChatVersion 探索微信的奥秘维度 +// 跨越星辰大海,追寻新版图的圣杯传说; +// 若遭逢风暴,空荡的圣杯将裹挟WxError的失落归来。 +func (*WxApi) GetUserWeChatVersion() (string, error) { + // 出发,以光年速度驶向微信版本的时空节点 + resp, err := http.Get(GlobalCallUrl + "/GetUserWeChatVersion") + if err != nil { + // 时空乱流,WxError的幻影(-1)携破碎梦想现身 + return "", WxError{-1, err.Error()} + } + defer resp.Body.Close() // 关闭时空裂隙,以防异界侵袭 + + // 接纳圣杯的微光,倾听宇宙的低语 + data, err := io.ReadAll(resp.Body) + if err != nil { + // 信息迷失,WxError(-2)的哀歌在虚空中回荡 + return "", WxError{-2, err.Error()} + } + + // 古老符文解析,揭示RespJson的宇宙密语 + rjson := RespJson{} + _ = json.Unmarshal(data, &rjson) + + // 密令确认,10000是真理的指引 + if rjson.Error != 10000 { + // 光芒黯淡,WxError(-rjson.Error)载着谜团回归 + return "", WxError{rjson.Error, rjson.Msg} + } + + // 圣杯显现,微信版图的最新座标(version)闪耀而出 + return rjson.Data.(map[string]any)["version"].(string), nil +} + +// InjectWeChat 微信灵魂注入术,让微信与服务融为一体 +// 邀请全球通讯站,完成神秘仪式; +// 若召唤失败,WxError的诅咒将随之降临。 +func (w *WxApi) InjectWeChat() (u *UserClientInfo, r error) { + sl := make(chan int) + wait := wxInitiativeCallQueue.GetWithSetDefault(loginSuccessMsg, &wxCallQueue{ + Send: make(chan string), + Resp: make(chan string), + }) + go func() { + go func() { + wait.Send <- "1" + }() + + const timeout = 99999 + + // 等待密信,或迎接时间的审判 + select { + case message := <-wait.Resp: + sr := WxLoginInfoResp{} + err := json.Unmarshal([]byte(message), &sr) + if err != nil { + r = WxError{-3, "login timeout"} + sl <- 0 + break + } + w.UserInfo = sr.Data + registerPid[sr.Data.Pid] = true + sl <- 1 + // return &w.UserInfo, nil + break + case <-time.After(time.Duration(timeout) * time.Second): + r = WxError{-3, "login timeout"} + sl <- 0 + break + } + //if w.UserInfo.Wxid != "" || r != nil { + // break + //} + }() + // 释放灵能,向宇宙宣告召唤 + resp, err := http.Get(GlobalCallUrl + "/InjectWeChat") + if err != nil { + // 灵能消散,WxError的阴霾笼罩(-1) + return nil, WxError{-1, err.Error()} + } + defer resp.Body.Close() // 收敛气息,防止泄露 + + // 汇聚反馈,领悟回应的奥秘 + data, err := io.ReadAll(resp.Body) + if err != nil { + close(wait.Send) + close(wait.Resp) + wxInitiativeCallQueue.Delete(loginSuccessMsg) + // 奥秘难解,WxError的迷雾笼罩(-2) + return nil, WxError{-2, err.Error()} + } + <-sl + if r != nil { + return nil, r + } + + // 解析神秘符号,揭示RespJson的真谛 + var rjson RespJson + _ = json.Unmarshal(data, &rjson) + + // 检验仪式成功,10000为灵能共鸣的证明 + if rjson.Error != 10000 { + // 引力失衡,WxError的警告回荡 + return nil, WxError{rjson.Error, rjson.Msg} + } + + // 仪式圆满,灵能注入,无误返回 + return &w.UserInfo, nil +} + +// sendWeChatData 📨 内部秘法,向微信投递加密情报 +// 注册ID、客户端ID、JSON数据及超时时限,编织跨越次元的信使; +// 若信使迷失,WxError的幽灵将悄然而至,揭示暗影的谜团。 +func (*WxApi) sendWeChatData(registerID, ClientID int, JsonData string, timeout int) (rstr string, rerr error) { + // 符文编织,信使的护甲,信息封存 + jsonBytes, _ := json.Marshal(map[string]interface{}{ + "ClientId": ClientID, + "JsonData": JsonData, + }) + var wait *wxCallQueue + if registerID != 0 { + wait = wxInitiativeCallQueue.GetWithSetDefault(registerID, &wxCallQueue{ + Send: make(chan string), + Resp: make(chan string), + }) + } + + go func() { + go func() { + if registerID != 0 { + wait.Send <- "1" + } + }() + // 飞翔吧,信使!目标:全球通讯站/SendWeChatData + url := GlobalCallUrl + "/SendWeChatData" + req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonBytes)) + if err != nil { + rerr = WxError{ + ErrorCode: -1, + Message: fmt.Sprintf("Error crafting message: %v", err), + } + return + } + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + rerr = WxError{ + ErrorCode: -2, + Message: fmt.Sprintf("Error delivering message: %v", err), + } + return + } + defer resp.Body.Close() + + }() + if registerID != 0 { + if timeout == 0 { + timeout = 999999 + } + if timeout > 0 { + select { + case message := <-wait.Resp: + return message, nil + case <-time.After(time.Duration(timeout) * time.Second): + return "", WxError{-3, "request timeout"} + } + } + } + + return +} + +// internalCall +func (w *WxApi) internalCall(registerID, timeout, Type int, JsonData any, trace any) (string, error) { + send := map[string]interface{}{ + "type": Type, + } + if JsonData != nil { + send["data"] = JsonData + } + if trace != nil { + send["trace"] = trace + } + + jsonBytes, _ := json.Marshal(send) + + return w.sendWeChatData(registerID, 1, string(jsonBytes), timeout) +} diff --git a/core/callapi_cdn.go b/core/callapi_cdn.go new file mode 100644 index 0000000..83d91c0 --- /dev/null +++ b/core/callapi_cdn.go @@ -0,0 +1,696 @@ +package core + +import ( + "github.com/goWxHook/goWxHook/utils/json" +) + +type CDNInitialResponse struct { + Data CDNInitialResponseData `json:"data"` + Type int `json:"type"` +} + +type CDNInitialResponseData struct { + Status int `json:"status"` +} + +// InitialCDN CDN初始化 +func (w *WxApi) InitialCDN() (*CDNInitialResponseData, error) { + resp, err := w.internalCall(MtCdnInitialMsg, 30, MtCdnInitialMsg, map[string]interface{}{}, nil) + if err != nil { + return nil, err + } + var rdata CDNInitialResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNUploadRequest struct { + FileType int `json:"file_type"` + FilePath string `json:"file_path"` +} + +type CDNUploadResponseData struct { + AesKey string `json:"aes_key"` + Crc32 int64 `json:"crc32"` + ErrorCode int `json:"error_code"` + FileId string `json:"file_id"` + FileKey string `json:"file_key"` + FileMd5 string `json:"file_md5"` + FilePath string `json:"file_path"` + FileSize int `json:"file_size"` + ThumbFileMd5 string `json:"thumb_file_md5"` + ThumbFileSize int `json:"thumb_file_size"` +} + +type CDNUploadResponse struct { + Data CDNUploadResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNUpload CDN上传 +func (w *WxApi) CDNUpload(request CDNUploadRequest) (*CDNUploadResponseData, error) { + resp, err := w.internalCall(MtCdnUploadFileMsg, 600, MtCdnUploadFileMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNUploadResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNDownloadRequest struct { + FileId string `json:"file_id"` + FileType int `json:"file_type"` + AesKey string `json:"aes_key"` + SavePath string `json:"save_path"` +} + +type CDNDownloadResponseData struct { + ErrorCode int `json:"error_code"` + FileId string `json:"file_id"` + FileSize int `json:"file_size"` + SavePath string `json:"save_path"` +} + +type CDNDownloadResponse struct { + Data CDNDownloadResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNDownload CDN下载 +func (w *WxApi) CDNDownload(request CDNDownloadRequest) (*CDNDownloadResponseData, error) { + resp, err := w.internalCall(MtCdnDownloadFileMsg, 600, MtCdnDownloadFileMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNDownloadResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type WorkWxCdnDownloadRequest struct { + Url string `json:"url"` + AuthKey string `json:"auth_key"` + AesKey string `json:"aes_key"` + SavePath string `json:"save_path"` +} + +type WorkWxCdnDownloadResponseData struct { + ErrorCode int `json:"error_code"` + SavePath string `json:"save_path"` +} + +type WorkWxCdnDownloadResponse struct { + Data WorkWxCdnDownloadResponseData `json:"data"` + Type int `json:"type"` +} + +// WorkWxCdnDownload 企业微信CDN +func (w *WxApi) WorkWxCdnDownload(request WorkWxCdnDownloadRequest) (*WorkWxCdnDownloadResponseData, error) { + resp, err := w.internalCall(MtWorkWxCdnDownloadMsg, 600, MtWorkWxCdnDownloadMsg, request, nil) + if err != nil { + return nil, err + } + var rdata WorkWxCdnDownloadResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendTextMsgRequest struct { + ToWxid string `json:"to_wxid"` + Content string `json:"content"` + AtList []string `json:"at_list"` // 群消息时候使用 + AtAll int `json:"at_all"` // 群消息时候,1是at所有人 +} + +type CDNSendTextMsgResponseData struct { + BaseResponse struct { + Ret int `json:"ret"` + } `json:"baseResponse"` + Count int `json:"count"` + MsgResponseList []struct { + ClientMsgId int `json:"clientMsgId"` + CreateTime int `json:"createTime"` + MsgId int `json:"msgId"` + NewMsgId string `json:"newMsgId"` + Ret int `json:"ret"` + ServerTime int `json:"serverTime"` + ToUserName struct { + String string `json:"string"` + } `json:"toUserName"` + Type int `json:"type"` + } `json:"msgResponseList"` +} +type CDNSendTextMsgResponse struct { + Data CDNSendTextMsgResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNSendTextMsg 发送文本消息 +func (w *WxApi) CDNSendTextMsg(request CDNSendTextMsgRequest) (*CDNSendTextMsgResponseData, error) { + var ( + resp string + err error + ) + if len(request.AtList) > 0 || request.AtAll == 1 { + resp, err = w.internalCall(MtCdnSendAtTextMsg, 30, MtCdnSendAtTextMsg, request, nil) + if err != nil { + return nil, err + } + } else { + resp, err = w.internalCall(MtCdnSendTextMsg, 30, MtCdnSendTextMsg, request, nil) + if err != nil { + return nil, err + } + } + var rdata CDNSendTextMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendImageMsgRequest struct { + AesKey string `json:"aes_key"` + FileId string `json:"file_id"` + FileMd5 string `json:"file_md5"` + FileSize int `json:"file_size"` + ThumbFileSize int `json:"thumb_file_size"` + Crc32 int `json:"crc32"` + ToWxid string `json:"to_wxid"` +} + +type CDNSendImageMsgResponseData struct { + AesKey string `json:"aes_key"` + FileId string `json:"file_id"` + FileMd5 string `json:"file_md5"` + FileSize int `json:"file_size"` + ThumbFileSize int `json:"thumb_file_size"` + Crc32 int `json:"crc32"` + ToWxid string `json:"to_wxid"` +} + +type CDNSendImageMsgResponse struct { + Data CDNSendImageMsgResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNSendImageMsg 发送图片 +func (w *WxApi) CDNSendImageMsg(request CDNSendImageMsgRequest) (*CDNSendImageMsgResponseData, error) { + resp, err := w.internalCall(MtCdnSendImageMsg, 120, MtCdnSendImageMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNSendImageMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendVideoMsgRequest struct { + AesKey string `json:"aes_key"` + FileId string `json:"file_id"` + FileMd5 string `json:"file_md5"` + FileSize int `json:"file_size"` + ThumbFileSize int `json:"thumb_file_size"` + ToWxid string `json:"to_wxid"` +} + +type CDNSendVideoMsgResponseData struct { + ActionFlag int `json:"actionFlag"` + Aeskey string `json:"aeskey"` + BaseResponse struct { + Ret int `json:"ret"` + } `json:"baseResponse"` + ClientMsgId string `json:"clientMsgId"` + MsgId int `json:"msgId"` + MsgSource string `json:"msgSource"` + NewMsgId string `json:"newMsgId"` + RawAeskey string `json:"rawAeskey"` + RawVideoNeedReupload bool `json:"rawVideoNeedReupload"` + ThumbStartPos int `json:"thumbStartPos"` + VideoNeedReupload bool `json:"videoNeedReupload"` + VideoStartPos int `json:"videoStartPos"` +} + +type CDNSendVideoMsgResponse struct { + Data CDNSendVideoMsgResponseData `json:"data"` + Type int `json:"type"` +} + +func (w *WxApi) CDNSendVideoMsg(request CDNSendVideoMsgRequest) (*CDNSendVideoMsgResponseData, error) { + resp, err := w.internalCall(MtCdnSendVideoMsg, 120, MtCdnSendVideoMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNSendVideoMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendFileMsgRequest struct { + AesKey string `json:"aes_key"` + FileId string `json:"file_id"` + FileMd5 string `json:"file_md5"` + FileName string `json:"file_name"` + FileSize int `json:"file_size"` + ToWxid string `json:"to_wxid"` +} + +type CDNSendFileMsgResponseData struct { + ActionFlag int `json:"actionFlag"` + Aeskey string `json:"aeskey"` + AppId string `json:"appId"` + BaseResponse struct { + Ret int `json:"ret"` + } `json:"baseResponse"` + ClientMsgId string `json:"clientMsgId"` + CreateTime int `json:"createTime"` + FromUserName string `json:"fromUserName"` + MsgId int `json:"msgId"` + MsgSource string `json:"msgSource"` + NewMsgId string `json:"newMsgId"` + ToUserName string `json:"toUserName"` + Type int `json:"type"` +} + +type CDNSendFileMsgResponse struct { + Data CDNSendFileMsgResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNSendFileMsg 发送文件 +func (w *WxApi) CDNSendFileMsg(request CDNSendFileMsgRequest) (*CDNSendFileMsgResponseData, error) { + resp, err := w.internalCall(MtCdnSendFileMsg, 120, MtCdnSendFileMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNSendFileMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendCardLinkMsgRequest struct { + ToWxid string `json:"to_wxid"` + Title string `json:"title"` + Desc string `json:"desc"` + Url string `json:"url"` + ImageUrl string `json:"image_url"` +} + +type CDNSendCardLinkMsgResponseData struct { + ActionFlag int `json:"actionFlag"` + Aeskey string `json:"aeskey"` + AppId string `json:"appId"` + BaseResponse struct { + ErrMsg struct { + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + ClientMsgId string `json:"clientMsgId"` + CreateTime int `json:"createTime"` + FromUserName string `json:"fromUserName"` + MsgId int `json:"msgId"` + MsgSource string `json:"msgSource"` + NewMsgId string `json:"newMsgId"` + ToUserName string `json:"toUserName"` + Type int `json:"type"` +} + +type CDNSendCardLinkMsgResponse struct { + Data CDNSendCardLinkMsgResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNSendCardLinkMsg 发送链接卡片 +func (w *WxApi) CDNSendCardLinkMsg(request CDNSendCardLinkMsgRequest) (*CDNSendCardLinkMsgResponseData, error) { + resp, err := w.internalCall(MtCdnSendCardLinkMsg, 120, MtCdnSendCardLinkMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNSendCardLinkMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendGifMsgRequest struct { + AesKey string `json:"aes_key"` + FileId string `json:"file_id"` + FileMd5 string `json:"file_md5"` + FileSize int `json:"file_size"` + ToWxid string `json:"to_wxid"` +} + +type CDNSendGifMsgResponseData struct { + ActionFlag int `json:"actionFlag"` + Aeskey string `json:"aeskey"` + AppId string `json:"appId"` + BaseResponse struct { + Ret int `json:"ret"` + } `json:"baseResponse"` + ClientMsgId string `json:"clientMsgId"` + CreateTime int `json:"createTime"` + FromUserName string `json:"fromUserName"` + MsgId int `json:"msgId"` + MsgSource string `json:"msgSource"` + NewMsgId string `json:"newMsgId"` + ToUserName string `json:"toUserName"` + Type int `json:"type"` +} + +type CDNSendGifMsgResponse struct { + Data CDNSendGifMsgResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNSendGifMsg 发送动图 +func (w *WxApi) CDNSendGifMsg(request CDNSendGifMsgRequest) (*CDNSendGifMsgResponseData, error) { + resp, err := w.internalCall(MtCdnSendGifMsg, 120, MtCdnSendGifMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNSendGifMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendMiniProgramMsgRequest struct { + ToWxid string `json:"to_wxid"` + Username string `json:"username"` + Appid string `json:"appid"` + Appname string `json:"appname"` + Appicon string `json:"appicon"` + Title string `json:"title"` + PagePath string `json:"page_path"` + FileId string `json:"file_id"` + AesKey string `json:"aes_key"` + FileMd5 string `json:"file_md5"` + FileSize int `json:"file_size"` +} +type CDNSendMiniProgramMsgResponseData struct { + ActionFlag int `json:"actionFlag"` + Aeskey string `json:"aeskey"` + AppId string `json:"appId"` + BaseResponse struct { + Ret int `json:"ret"` + } `json:"baseResponse"` + ClientMsgId string `json:"clientMsgId"` + CreateTime int `json:"createTime"` + FromUserName string `json:"fromUserName"` + MsgId int `json:"msgId"` + MsgSource string `json:"msgSource"` + NewMsgId string `json:"newMsgId"` + ToUserName string `json:"toUserName"` + Type int `json:"type"` +} + +type CDNSendMiniProgramMsgResponse struct { + Data CDNSendMiniProgramMsgResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNSendMiniProgramMsg 发送小程序 +func (w *WxApi) CDNSendMiniProgramMsg(request CDNSendMiniProgramMsgRequest) (*CDNSendMiniProgramMsgResponseData, error) { + resp, err := w.internalCall(MtCdnSendMiniProgramMsg, 120, MtCdnSendMiniProgramMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNSendMiniProgramMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendVideoMomentMsgRequest struct { + ToWxid string `json:"to_wxid"` + ObjectId string `json:"object_id"` + ObjectNonceId string `json:"object_nonce_id"` + Nickname string `json:"nickname"` + Username string `json:"username"` + Avatar string `json:"avatar"` + Desc string `json:"desc"` + ThumbUrl string `json:"thumb_url"` + Url string `json:"url"` +} + +type CDNSendVideoMomentMsgResponseData struct { + ActionFlag int `json:"actionFlag"` + Aeskey string `json:"aeskey"` + AppId string `json:"appId"` + BaseResponse struct { + Ret int `json:"ret"` + } `json:"baseResponse"` + ClientMsgId string `json:"clientMsgId"` + CreateTime int `json:"createTime"` + FromUserName string `json:"fromUserName"` + MsgId int `json:"msgId"` + MsgSource string `json:"msgSource"` + NewMsgId string `json:"newMsgId"` + ToUserName string `json:"toUserName"` + Type int `json:"type"` +} + +type CDNSendVideoMomentMsgResponse struct { + Data CDNSendVideoMomentMsgResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNSendVideoMomentMsg 发送视频号 +func (w *WxApi) CDNSendVideoMomentMsg(request CDNSendVideoMomentMsgRequest) (*CDNSendVideoMomentMsgResponseData, error) { + resp, err := w.internalCall(MtCdnSendVideoMomentMsg, 120, MtCdnSendVideoMomentMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNSendVideoMomentMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendCardMsgRequest struct { + ToWxid string `json:"to_wxid"` + Username string `json:"username"` + Nickname string `json:"nickname"` + Avatar string `json:"avatar"` +} + +type CDNSendCardMsgResponseData struct { + BaseResponse struct { + Ret int `json:"ret"` + } `json:"baseResponse"` + Count int `json:"count"` + MsgResponseList []struct { + ClientMsgId int `json:"clientMsgId"` + CreateTime int `json:"createTime"` + MsgId int `json:"msgId"` + NewMsgId string `json:"newMsgId"` + Ret int `json:"ret"` + ServerTime int `json:"serverTime"` + ToUserName struct { + String string `json:"string"` + } `json:"toUserName"` + Type int `json:"type"` + } `json:"msgResponseList"` +} + +type CDNSendCardMsgResponse struct { + Data CDNSendCardMsgResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNSendCardMsg 发送名片 +func (w *WxApi) CDNSendCardMsg(request CDNSendCardMsgRequest) (*CDNSendCardMsgResponseData, error) { + resp, err := w.internalCall(MtCdnSendCardMsg, 120, MtCdnSendCardMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNSendCardMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendLocationMsgRequest struct { + ToWxid string `json:"to_wxid"` + Address string `json:"address"` + Latitude float64 `json:"latitude"` + Longitude float64 `json:"longitude"` + Title string `json:"title"` +} + +type CDNSendLocationMsgResponseData struct { + BaseResponse struct { + Ret int `json:"ret"` + } `json:"baseResponse"` + Count int `json:"count"` + MsgResponseList []struct { + ClientMsgId int `json:"clientMsgId"` + CreateTime int `json:"createTime"` + MsgId int `json:"msgId"` + NewMsgId string `json:"newMsgId"` + Ret int `json:"ret"` + ServerTime int `json:"serverTime"` + ToUserName struct { + String string `json:"string"` + } `json:"toUserName"` + Type int `json:"type"` + } `json:"msgResponseList"` +} + +type CDNSendLocationMsgResponse struct { + Data CDNSendLocationMsgResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNSendLocationMsg 发送位置 +func (w *WxApi) CDNSendLocationMsg(request CDNSendLocationMsgRequest) (*CDNSendLocationMsgResponseData, error) { + resp, err := w.internalCall(MtCdnSendLocationMsg, 120, MtCdnSendLocationMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNSendLocationMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendRevokeMsgRequest struct { + ClientMsgid interface{} `json:"client_msgid"` + CreateTime int `json:"create_time"` + ToWxid string `json:"to_wxid"` + NewMsgid string `json:"new_msgid"` +} + +type CDNSendRevokeMsgResponseData struct { + BaseResponse struct { + Ret int `json:"ret"` + } `json:"baseResponse"` + Introduction string `json:"introduction"` + SysWording string `json:"sysWording"` +} + +type CDNSendRevokeMsgResponse struct { + Data CDNSendRevokeMsgResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNSendRevokeMsg 撤回消息 +func (w *WxApi) CDNSendRevokeMsg(request CDNSendRevokeMsgRequest) (*CDNSendRevokeMsgResponseData, error) { + resp, err := w.internalCall(MtCdnSendRevokeMsg, 120, MtCdnSendRevokeMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNSendRevokeMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendXmlMsgRequest struct { + // "1658934822522.gif<... ...</weappinfo><websearch /></appmsg>", + Content string `json:"content"` + ToWxid string `json:"to_wxid"` +} + +type CDNSendXmlMsgResponseData struct { + ActionFlag int `json:"actionFlag"` + Aeskey string `json:"aeskey"` + AppId string `json:"appId"` + BaseResponse struct { + Ret int `json:"ret"` + } `json:"baseResponse"` + ClientMsgId string `json:"clientMsgId"` + CreateTime int `json:"createTime"` + FromUserName string `json:"fromUserName"` + MsgId int `json:"msgId"` + MsgSource string `json:"msgSource"` + NewMsgId string `json:"newMsgId"` + ToUserName string `json:"toUserName"` + Type int `json:"type"` +} + +type CDNSendXmlMsgResponse struct { + Data CDNSendXmlMsgResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNSendXmlMsg 发送xml消息 +func (w *WxApi) CDNSendXmlMsg(request CDNSendXmlMsgRequest) (*CDNSendXmlMsgResponseData, error) { + resp, err := w.internalCall(MtCdnSendXmlMsg, 120, MtCdnSendXmlMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CDNSendXmlMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CDNSendGifMsgNewRequest struct { + Path string `json:"path"` + ToWxid string `json:"to_wxid"` +} + +type CDNSendGifMsgNewResponseData struct { + Md5 string `json:"md5"` + Size int `json:"size"` + ToWxid string `json:"to_wxid"` +} + +type CDNSendGifMsgNewResponse struct { + Data CDNSendGifMsgNewResponseData `json:"data"` + Type int `json:"type"` +} + +// CDNSendGifMsgNew 发送动图 +func (w *WxApi) CDNSendGifMsgNew(request CDNSendGifMsgNewRequest) (*CDNSendGifMsgNewResponseData, error) { + resp, err := w.internalCall(MtCdnSendGifMsgNew, 120, MtCdnSendGifMsgNew, request, nil) + if err != nil { + return nil, err + } + var rdata CDNSendGifMsgNewResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} diff --git a/core/callapi_collect.go b/core/callapi_collect.go new file mode 100644 index 0000000..29e6f11 --- /dev/null +++ b/core/callapi_collect.go @@ -0,0 +1,56 @@ +package core + +import "github.com/goWxHook/goWxHook/utils/json" + +type GetCollectListResponseData struct { + Items []struct { + FromUser string `json:"from_user"` + LocalId int `json:"local_id"` + RoomMember string `json:"room_member"` + Title string `json:"title"` + Type int `json:"type"` + UpdateTime int `json:"update_time"` + Xml string `json:"xml"` + } `json:"items"` + Status int `json:"status"` +} + +type GetCollectListResponse struct { + Data GetCollectListResponseData `json:"data"` + Type int `json:"type"` +} + +// GetCollectList 获取收藏列表 +func (w *WxApi) GetCollectList() (*GetCollectListResponseData, error) { + resp, err := w.internalCall(MtGetCollectListMsg, 20, MtGetCollectListMsg, map[string]interface{}{}, nil) + if err != nil { + return nil, err + } + var rdata GetCollectListResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type SendCollectRequest struct { + ToWxid string `json:"to_wxid"` + LocalId int `json:"local_id"` +} + +// SendCollect 发送收藏(旧) +func (w *WxApi) SendCollect(request SendCollectRequest) error { + _, err := w.internalCall(MtSendCollectMsg, 20, MtSendCollectMsg, request, nil) + return err +} + +type SendCollectMsgByMsgIdRequest struct { + Msgid string `json:"msgid"` +} + +// SendCollectMsgByMsgId 收藏指定消息(旧) +func (w *WxApi) SendCollectMsgByMsgId(request SendCollectMsgByMsgIdRequest) error { + _, err := w.internalCall(MtSendCollectMsgByMsgId, 20, MtSendCollectMsgByMsgId, request, nil) + return err +} diff --git a/core/callapi_contact.go b/core/callapi_contact.go new file mode 100644 index 0000000..596ab96 --- /dev/null +++ b/core/callapi_contact.go @@ -0,0 +1,432 @@ +package core + +import ( + "github.com/goWxHook/goWxHook/utils/json" +) + +type GetFriendListResponse struct { + Data []GetFriendListResponseDateItem `json:"data"` + Type int `json:"type"` +} +type GetFriendListResponseDateItem struct { + Account string `json:"account"` // 微信账号,友情的直接连线 + Avatar string `json:"avatar"` // 头像的风景画,好友的形象代言 + City string `json:"city"` // 都市的温馨角落,好友的日常坐标 + Country string `json:"country"` // 国界的另一端,好友的远方故事 + LabelidList string `json:"labelid_list"` // 标签的彩虹桥,连接不同朋友圈的密码 + Nickname string `json:"nickname"` // 昵称的诗篇,好友的个性签名 + Province string `json:"province"` // 省份的风土人情,好友的地域色彩 + Remark string `json:"remark"` // 备注的小秘密,只有你知道的代号 + Sex int `json:"sex"` // 性别的罗盘,1为蓝海,2为红颜 + Wxid string `json:"wxid"` // 微信ID,好友的唯一坐标 +} + +// GetFriendList 获取好友列表 +func (w *WxApi) GetFriendList() ([]GetFriendListResponseDateItem, error) { + resp, err := w.internalCall(MtDataFriendsMsg, 10, MtDataFriendsMsg, map[string]interface{}{}, nil) + if err != nil { + return nil, err + } + var rdata GetFriendListResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} + +type GetFriendInfoResponse struct { + Data GetFriendListResponseDateItem `json:"data"` + Type int `json:"type"` +} + +// GetFriendInfo 获取单个好友信息 +func (w *WxApi) GetFriendInfo(wxid string) (*GetFriendListResponseDateItem, error) { + resp, err := w.internalCall(MtDataWxidMsg, 10, MtDataWxidMsg, map[string]interface{}{"wxid": wxid}, nil) + if err != nil { + return nil, err + } + var rdata GetFriendInfoResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type GetFriendBriefInfoByProtocolResponseData struct { + Account string `json:"account"` + Avatar string `json:"avatar"` + City string `json:"city"` + Country string `json:"country"` + Nickname string `json:"nickname"` + Province string `json:"province"` + Remark string `json:"remark"` + Sex int `json:"sex"` + Signature string `json:"signature"` + SmallAvatar string `json:"small_avatar"` + SnsPic string `json:"sns_pic"` + SourceType int `json:"source_type"` + Status int `json:"status"` + V1 string `json:"v1"` + V2 string `json:"v2"` + Wxid string `json:"wxid"` +} +type GetFriendBriefInfoByProtocolResponse struct { + Data GetFriendBriefInfoByProtocolResponseData `json:"data"` + Type int `json:"type"` +} + +// GetFriendBriefInfoByProtocol 获取好友简要信息(协议) +func (w *WxApi) GetFriendBriefInfoByProtocol(wxid string) (*GetFriendBriefInfoByProtocolResponseData, error) { + resp, err := w.internalCall(MtUpdateWxidMsg, 20, MtUpdateWxidMsg, map[string]interface{}{"wxid": wxid}, nil) + if err != nil { + return nil, err + } + var rdata GetFriendBriefInfoByProtocolResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type GetFriendDetailInfoByProtocolResponseData struct { + BaseResponse struct { + ErrMsg struct { + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + ContactCount int `json:"contactCount"` + ContactList []GetFriendDetailInfoByProtocolResponseDataContactListItem `json:"contactList"` + RetList []struct { + RetList int `json:"retList"` + } `json:"retList"` + VerifyUserValidTicketList []interface{} `json:"verifyUserValidTicketList"` +} + +type GetFriendDetailInfoByProtocolResponseDataContactListItem struct { + AddContactScene int `json:"addContactScene"` + AdditionalContactList struct { + LinkedinContactItem struct { + } `json:"linkedinContactItem"` + } `json:"additionalContactList"` + AlbumBgImgId string `json:"albumBgImgId"` + AlbumFlag int `json:"albumFlag"` + AlbumStyle int `json:"albumStyle"` + Alias string `json:"alias"` + BigHeadImgUrl string `json:"bigHeadImgUrl"` + BitMask int64 `json:"bitMask"` + BitVal int `json:"bitVal"` + CardImgUrl string `json:"cardImgUrl"` + ChatRoomData string `json:"chatRoomData"` + ChatRoomNotify int `json:"chatRoomNotify"` + ChatRoomOwner string `json:"chatRoomOwner"` + ChatroomInfoVersion int `json:"chatroomInfoVersion"` + ChatroomMaxCount int `json:"chatroomMaxCount"` + ChatroomType int `json:"chatroomType"` + ChatroomVersion int `json:"chatroomVersion"` + City string `json:"city"` + ContactType int `json:"contactType"` + Country string `json:"country"` + CustomizedInfo struct { + BrandFlag int `json:"brandFlag"` + BrandIconURL string `json:"brandIconURL"` + BrandInfo string `json:"brandInfo"` + ExternalInfo string `json:"externalInfo"` + } `json:"customizedInfo"` + DeleteFlag int `json:"deleteFlag"` + Description string `json:"description"` + DomainList struct { + } `json:"domainList"` + EncryptUserName string `json:"encryptUserName"` + ExtInfo string `json:"extInfo"` + HasWeiXinHdHeadImg int `json:"hasWeiXinHdHeadImg"` + HeadImgMd5 string `json:"headImgMd5"` + IdcardNum string `json:"idcardNum"` + ImgBuf struct { + Buffer string `json:"buffer"` + ILen int `json:"iLen"` + } `json:"imgBuf"` + ImgFlag int `json:"imgFlag"` + LabelIdList string `json:"labelIdList"` + Level int `json:"level"` + MobileFullHash string `json:"mobileFullHash"` + MobileHash string `json:"mobileHash"` + MyBrandList string `json:"myBrandList"` + NewChatroomData struct { + ChatRoomMemberList []interface{} `json:"chatRoomMemberList"` + InfoMask int `json:"infoMask"` + MemberCount int `json:"memberCount"` + } `json:"newChatroomData"` + NickName struct { + String string `json:"string"` + } `json:"nickName"` + PersonalCard int `json:"personalCard"` + PhoneNumListInfo struct { + Count int `json:"count"` + PhoneNumList []interface{} `json:"phoneNumList"` + } `json:"phoneNumListInfo"` + Province string `json:"province"` + PyInitial struct { + String string `json:"string"` + } `json:"pyInitial"` + QuanPin struct { + String string `json:"string"` + } `json:"quanPin"` + RealName string `json:"realName"` + Remark struct { + } `json:"remark"` + RemarkPYInitial struct { + } `json:"remarkPYInitial"` + RemarkQuanPin struct { + } `json:"remarkQuanPin"` + RoomInfoCount int `json:"roomInfoCount"` + RoomInfoList []interface{} `json:"roomInfoList"` + Sex int `json:"sex"` + Signature string `json:"signature"` + SmallHeadImgUrl string `json:"smallHeadImgUrl"` + SnsUserInfo struct { + SnsBgImgId string `json:"snsBgImgId"` + SnsBgObjectId string `json:"snsBgObjectId"` + SnsFlag int `json:"snsFlag"` + SnsFlagEx int `json:"snsFlagEx"` + } `json:"snsUserInfo"` + Source int `json:"source"` + UserName struct { + String string `json:"string"` + } `json:"userName"` + VerifyContent string `json:"verifyContent"` + VerifyFlag int `json:"verifyFlag"` + VerifyInfo string `json:"verifyInfo"` + WeiDianInfo string `json:"weiDianInfo"` + Weibo string `json:"weibo"` + WeiboFlag int `json:"weiboFlag"` + WeiboNickname string `json:"weiboNickname"` +} + +type GetFriendDetailInfoByProtocolResponse struct { + Data GetFriendDetailInfoByProtocolResponseData `json:"data"` + Type int `json:"type"` +} + +// GetFriendDetailInfoByProtocol 获取好友详细信息(协议) +func (w *WxApi) GetFriendDetailInfoByProtocol(wxid string) ([]GetFriendDetailInfoByProtocolResponseDataContactListItem, error) { + resp, err := w.internalCall(MtGetFriendDetailMsg, 20, MtGetFriendDetailMsg, map[string]interface{}{"wxid": wxid}, nil) + if err != nil { + return nil, err + } + var rdata GetFriendDetailInfoByProtocolResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + + return rdata.Data.ContactList, nil +} + +// GetFriendDetailInfoListByProtocol 批量获取好友详细信息(协议) +func (w *WxApi) GetFriendDetailInfoListByProtocol(wxids []string) ([]GetFriendDetailInfoByProtocolResponseDataContactListItem, error) { + resp, err := w.internalCall(MtGetFriendDetailMsg, 20, MtGetFriendDetailMsg, map[string]interface{}{"username_list": wxids}, nil) + if err != nil { + return nil, err + } + var rdata GetFriendDetailInfoByProtocolResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data.ContactList, nil +} + +type EditFriendRemarkRequest struct { + Wxid string `json:"wxid"` + Remark string `json:"remark"` +} + +// EditFriendRemark 编辑好友备注 +func (w *WxApi) EditFriendRemark(request EditFriendRemarkRequest) (err error) { + _, err = w.internalCall(0, -1, MtModFriendRemarkMsg, request, nil) + return err +} + +type AddFriendRequest struct { + Wxid string `json:"wxid"` + Remark string `json:"remark"` + RoomWxid string `json:"room_wxid"` + SourceType int `json:"source_type"` +} + +// AddFriend 发送好友申请 +// 参数: +// clientId: 客户端ID,用于标识发起请求的客户端 +// wxid: 待添加好友的微信ID +// remark: 对好友的备注信息 +// roomWxid: 若是在某个群聊中发起的好友申请,此参数为群聊的微信ID +// sourceType: 好友申请的来源类型,群聊14 +func (w *WxApi) AddFriend(request AddFriendRequest) (err error) { + _, err = w.internalCall(0, -1, MtAddFriendMsg, request, nil) + return err +} + +type AcceptFriendRequest struct { + Encryptusername string `json:"encryptusername"` + Ticket string `json:"ticket"` + Scene int `json:"scene"` +} +type AcceptFriendResponse struct { + Data WxCommonData `json:"data"` + Type int `json:"type"` +} + +// AcceptFriend 同意加好友申请 +func (w *WxApi) AcceptFriend(request AcceptFriendRequest) *WxCommonData { + resp, err := w.internalCall(MtAcceptFriendMsg, 30, MtAcceptFriendMsg, request, nil) + if err != nil { + return &WxCommonData{Errcode: -1, Errmsg: err.Error()} + } + var rdata AcceptFriendResponse + err = json.Unmarshal([]byte(resp), rdata) + if err != nil { + return &WxCommonData{Errcode: -1, Errmsg: err.Error()} + } + return &rdata.Data +} + +// DelFriend 删除好友 +func (w *WxApi) DelFriend(wxid string) (err error) { + _, err = w.internalCall(0, -1, MtDelFriendMsg, map[string]interface{}{ + "wxid": wxid, + }, nil) + return err +} + +type SearchWxUserResponseData struct { + Account string `json:"account"` + Avatar string `json:"avatar"` + City string `json:"city"` + Country string `json:"country"` + Keyword string `json:"keyword"` + Nickname string `json:"nickname"` + Provice string `json:"provice"` + Search string `json:"search"` + Sex int `json:"sex"` + Signature string `json:"signature"` + SmallAvatar string `json:"small_avatar"` + Status int `json:"status"` + V1 string `json:"v1"` + V2 string `json:"v2"` + Wxid string `json:"wxid"` +} + +type SearchWxUserResponse struct { + Data SearchWxUserResponseData `json:"data"` + Type int `json:"type"` +} + +// SearchWxUser 搜索微信用户 +func (w *WxApi) SearchWxUser(keyword string) (*SearchWxUserResponseData, error) { + resp, err := w.internalCall(MtSearchWxUserMsg, 20, MtSearchWxUserMsg, map[string]interface{}{"search": keyword}, nil) + if err != nil { + return nil, err + } + var rdata SearchWxUserResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type AddSearchWxUserRequest struct { + V1 string `json:"v1"` + V2 string `json:"v2"` + Remark string `json:"remark"` +} + +type AddSearchWxUserResponse struct { + Data WxCommonData `json:"data"` + Type int `json:"type"` +} + +// AddSearchWxUser 添加搜索用户 +func (w *WxApi) AddSearchWxUser(request AddSearchWxUserRequest) *WxCommonData { + resp, err := w.internalCall(MtAddSearchUserMsg, 30, MtAddSearchUserMsg, request, nil) + if err != nil { + return &WxCommonData{Errcode: -1, Errmsg: err.Error()} + } + var rdata AddSearchWxUserResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return &WxCommonData{Errcode: -1, Errmsg: err.Error()} + } + return &rdata.Data +} + +// CheckFriendStatus 检测好友状态(发送无痕清粉消息) +func (w *WxApi) CheckFriendStatus(wxid string) *WxCommonData { + resp, err := w.internalCall(MtZombieCheckMsg, 10, MtZombieCheckMsg, map[string]interface{}{"wxid": wxid}, nil) + if err != nil { + return &WxCommonData{Errcode: -1, Errmsg: err.Error()} + } + var rdata WxCommonResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return &WxCommonData{Errcode: -1, Errmsg: err.Error()} + } + return &rdata.Data +} + +type AutoAcceptAddFriendRequest struct { + Auto int `json:"auto"` // 1自动同意 0取消自动同意 +} + +// AutoAcceptAddFriend 自动同意好友申请 +func (w *WxApi) AutoAcceptAddFriend(request AutoAcceptAddFriendRequest) (err error) { + _, err = w.internalCall(0, -1, MtAutoAcceptFriendMsg, request, nil) + return err +} + +type AutoAcceptCardRequest struct { + Auto int `json:"auto"` // 1自动接收 0取消自动接收 +} + +// AutoAcceptCard 自动接收名片 +func (w *WxApi) AutoAcceptCard(request AutoAcceptCardRequest) error { + _, err := w.internalCall(0, -1, MtAutoAcceptCardMsg, request, nil) + return err +} + +type AutoAcceptWCPayRequest struct { + Auto int `json:"auto"` // 1自动接收 0取消自动接收 +} + +// AutoAcceptWCPay 自动接收好友转账 +func (w *WxApi) AutoAcceptWCPay(request AutoAcceptWCPayRequest) error { + _, err := w.internalCall(0, -1, MtAutoAcceptWcpayMsg, request, nil) + return err +} + +type GetPublicUserListResponse struct { + Data []GetPublicUserListResponseData `json:"data"` + Type int `json:"type"` +} + +type GetPublicUserListResponseData struct { + Avatar string `json:"avatar"` + Nickname string `json:"nickname"` + Wxid string `json:"wxid"` +} + +func (w *WxApi) GetPublicUserList() ([]GetPublicUserListResponseData, error) { + resp, err := w.internalCall(MtDataPublicsMsg, 30, MtDataPublicsMsg, nil, map[string]interface{}{}) + if err != nil { + return nil, err + } + var rdata GetPublicUserListResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} diff --git a/core/callapi_live.go b/core/callapi_live.go new file mode 100644 index 0000000..ef515d3 --- /dev/null +++ b/core/callapi_live.go @@ -0,0 +1,94 @@ +package core + +import "github.com/goWxHook/goWxHook/utils/json" + +type LiveEnterRequest struct { + ObjectId string `json:"object_id"` + LiveId string `json:"live_id"` + ObjectNonceId string `json:"object_nonce_id"` +} + +// LiveEnter 进入直播间 +func (w *WxApi) LiveEnter(request LiveEnterRequest) error { + _, err := w.internalCall(0, -1, MtLiveEnterMsg, request, nil) + return err +} + +type LiveGetOnlineUserRequest struct { + ObjectId string `json:"object_id"` + LiveId string `json:"live_id"` + ObjectNonceId string `json:"object_nonce_id"` + LastBuff string `json:"last_buff"` +} + +type LiveGetOnlineUserResponse struct { + Data interface{} `json:"data"` + Type int `json:"type"` +} + +// LiveGetOnlineUser 获取直播间在线用户 +func (w *WxApi) LiveGetOnlineUser(request LiveGetOnlineUserRequest) (interface{}, error) { + resp, err := w.internalCall(MtLiveGetOnlineUserMsg, 60, MtLiveGetOnlineUserMsg, request, nil) + if err != nil { + return nil, err + } + var rdata LiveGetOnlineUserResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} + +type LiveGetChangeInfoResponse struct { + Data interface{} `json:"data"` + Type int `json:"type"` +} + +// LiveGetChangeInfo 获取直播间变动信息(人气,实时发言等)) +func (w *WxApi) LiveGetChangeInfo() (interface{}, error) { + resp, err := w.internalCall(MtLiveGetChangeInfoMsg, 60, MtLiveGetChangeInfoMsg, map[string]interface{}{}, nil) + if err != nil { + return nil, err + } + var rdata LiveGetChangeInfoResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} + +type LiveSendMsgRequest struct { + Content string `json:"content"` +} + +// LiveSendMsg 发送直播间消息 +func (w *WxApi) LiveSendMsg(request LiveSendMsgRequest) error { + _, err := w.internalCall(0, -1, MtLiveSendMsg, request, nil) + return err +} + +type LiveGetShelfRequest struct { + LiveUsername string `json:"live_username"` + RequestId string `json:"request_id"` +} + +type LiveGetShelfResponse struct { + Data interface{} `json:"data"` + Type int `json:"type"` +} + +// LiveGetShelf 获取直播间货架 +func (w *WxApi) LiveGetShelf(request LiveGetShelfRequest) (interface{}, error) { + resp, err := w.internalCall(MtLiveGetShelfMsg, 60, MtLiveGetShelfMsg, request, nil) + if err != nil { + return nil, err + } + var rdata LiveGetShelfResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} diff --git a/core/callapi_login.go b/core/callapi_login.go new file mode 100644 index 0000000..0189512 --- /dev/null +++ b/core/callapi_login.go @@ -0,0 +1,71 @@ +package core + +import "github.com/goWxHook/goWxHook/utils/json" + +type GetLoginUserInfoResponseData struct { + Account string `json:"account"` + Avatar string `json:"avatar"` + Nickname string `json:"nickname"` + Wxid string `json:"wxid"` + Phone string `json:"phone"` + Pid int `json:"pid"` + UnreadMsgCount int `json:"unread_msg_count"` + WxUserDir string `json:"wx_user_dir"` +} +type GetLoginUserInfoResponse struct { + Data GetLoginUserInfoResponseData `json:"data"` + Type int `json:"type"` +} + +// GetLoginUserInfo 获取登录用户信息 +func (w *WxApi) GetLoginUserInfo() (*GetLoginUserInfoResponseData, error) { + resp, err := w.internalCall(MtDataOwnerMsg, 10, MtDataOwnerMsg, nil, map[string]interface{}{}) + if err != nil { + return nil, err + } + var rdata GetLoginUserInfoResponse + debugOutput(resp) + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type RefreshLoginQrcodeResponse struct { + Data RefreshLoginQrCodeResponseData `json:"data"` + Type int `json:"type"` +} + +type RefreshLoginQrCodeResponseData struct { + File string `json:"file"` + Qrcode string `json:"qrcode"` + Pid int `json:"pid"` +} + +// RefreshLoginQrCode 刷新登录二维码 +func (w *WxApi) RefreshLoginQrCode() (*RefreshLoginQrCodeResponseData, error) { + resp, err := w.internalCall(MtRefreshLoginQrcode, 10, MtRefreshLoginQrcode, map[string]interface{}{}, nil) + if err != nil { + return nil, err + } + var rdata RefreshLoginQrcodeResponse + debugOutput(resp) + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +// WxUserLogout 注销登录 +func (w *WxApi) WxUserLogout() error { + _, err := w.internalCall(0, 10, MtLogoutMsg, nil, map[string]interface{}{}) + return err +} + +// WxExit 退出微信 +func (w *WxApi) WxExit() error { + _, err := w.internalCall(0, 10, MtExitMsg, nil, map[string]interface{}{}) + return err +} diff --git a/core/callapi_message.go b/core/callapi_message.go new file mode 100644 index 0000000..94822fe --- /dev/null +++ b/core/callapi_message.go @@ -0,0 +1,114 @@ +package core + +type SendTextMsgRequest struct { + ToWxid string `json:"to_wxid"` + Content string `json:"content"` + AtList []string `json:"at_list"` // 群消息时候使用 "notify@all" @所有人 +} + +// SendTextMsg 发送文本消息 +func (w *WxApi) SendTextMsg(request SendTextMsgRequest) (err error) { + if len(request.AtList) > 0 { + _, err = w.internalCall(0, -1, MtSendChatroomAtmsg, request, nil) + if err != nil { + return err + } + } else { + _, err = w.internalCall(0, -1, MtSendTextmsg, request, nil) + if err != nil { + return err + } + } + return nil +} + +type SendCardMsgRequest struct { + ToWxid string `json:"to_wxid"` + CardWxid string `json:"card_wxid"` +} + +// SendCardMsg 发送名片消息 +func (w *WxApi) SendCardMsg(request SendCardMsgRequest) (err error) { + _, err = w.internalCall(0, -1, MtSendCardmsg, request, nil) + return err +} + +type SendLinkMsgRequest struct { + ToWxid string `json:"to_wxid"` + Title string `json:"title"` + Desc string `json:"desc"` + Url string `json:"url"` + ImageUrl string `json:"image_url"` +} + +// SendLinkMsg 发送链接消息 +func (w *WxApi) SendLinkMsg(request SendLinkMsgRequest) (err error) { + _, err = w.internalCall(0, -1, MtSendLinkmsg, request, nil) + return err +} + +type SendImageMsgRequest struct { + ToWxid string `json:"to_wxid"` + File string `json:"file"` // 例如 "C:\\a.jpg" +} + +// SendImageMsg 发送图片消息 +func (w *WxApi) SendImageMsg(request SendImageMsgRequest) (err error) { + _, err = w.internalCall(0, 60, MtSendImgmsg, request, nil) + return err +} + +type SendFileMsgRequest struct { + ToWxid string `json:"to_wxid"` + File string `json:"file"` +} + +// SendFileMsg 发送文件消息 +func (w *WxApi) SendFileMsg(request SendFileMsgRequest) (err error) { + _, err = w.internalCall(0, -1, MtSendFilemsg, request, nil) + return err +} + +type SendVideoMsgRequest struct { + ToWxid string `json:"to_wxid"` + File string `json:"file"` +} + +// SendVideoMsg 发送视频消息 +func (w *WxApi) SendVideoMsg(request SendVideoMsgRequest) (err error) { + _, err = w.internalCall(0, -1, MtSendVideomsg, request, nil) + return err +} + +type SendGifMsgRequest struct { + ToWxid string `json:"to_wxid"` + File string `json:"file"` +} + +// SendGifMsg 发送GIF消息 +func (w *WxApi) SendGifMsg(request SendGifMsgRequest) (err error) { + _, err = w.internalCall(0, -1, MtSendGifmsg, request, nil) + return err +} + +type SendXmlMsgRequest struct { + ToWxid string `json:"to_wxid"` + Xml string `json:"xml"` +} + +// SendXmlMsg 发送XML原始消息 +func (w *WxApi) SendXmlMsg(request SendXmlMsgRequest) (err error) { + _, err = w.internalCall(0, -1, MtSendXmlMsg, request, nil) + return err +} + +type ForwardMsgRequest struct { + ToWxid string `json:"to_wxid"` + Msgid string `json:"msgid"` +} + +// ForwardMsg 转发任意类型消息 +func (w *WxApi) ForwardMsg(request ForwardMsgRequest) (err error) { + _, err = w.internalCall(0, -1, MtForwardMsg, request, nil) + return err +} diff --git a/core/callapi_moment.go b/core/callapi_moment.go new file mode 100644 index 0000000..00d747d --- /dev/null +++ b/core/callapi_moment.go @@ -0,0 +1,446 @@ +package core + +import "github.com/goWxHook/goWxHook/utils/json" + +type GetMomentRequest struct { + MaxId string `json:"max_id"` +} + +type GetMomentResponseData interface{} + +type GetMomentResponse struct { + Data GetMomentResponseData `json:"data"` + Type int `json:"type"` +} + +// GetMoment 获取朋友圈 +func (w *WxApi) GetMoment(request GetMomentRequest) (GetMomentResponseData, error) { + resp, err := w.internalCall(MtGetMomentMsg, 60, MtGetMomentMsg, request, nil) + if err != nil { + return nil, err + } + var rdata GetMomentResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CommentMomentRequest struct { + ObjectId string `json:"object_id"` + Content string `json:"content"` +} + +type CommentMomentResponseData struct { + BaseResponse struct { + ErrMsg struct { + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + SnsObject struct { + BlackList []interface{} `json:"blackList"` + BlackListCount int `json:"blackListCount"` + CommentCount int `json:"commentCount"` + CommentUserList []struct { + CommentFlag int `json:"commentFlag"` + CommentId int `json:"commentId"` + CommentId2 string `json:"commentId2"` + Content string `json:"content"` + CreateTime int `json:"createTime"` + DeleteFlag int `json:"deleteFlag"` + IsNotRichText int `json:"isNotRichText"` + Nickname string `json:"nickname"` + ReplyCommentId int `json:"replyCommentId"` + ReplyCommentId2 string `json:"replyCommentId2"` + ReplyUsername string `json:"replyUsername"` + Source int `json:"source"` + Type int `json:"type"` + Username string `json:"username"` + } `json:"commentUserList"` + CommentUserListCount int `json:"commentUserListCount"` + CreateTime int `json:"createTime"` + DeleteFlag int `json:"deleteFlag"` + ExtFlag int `json:"extFlag"` + GroupCount int `json:"groupCount"` + GroupList []interface{} `json:"groupList"` + GroupUser []interface{} `json:"groupUser"` + GroupUserCount int `json:"groupUserCount"` + Id string `json:"id"` + IsNotRichText int `json:"isNotRichText"` + LikeCount int `json:"likeCount"` + LikeFlag int `json:"likeFlag"` + LikeUserList []struct { + CommentFlag int `json:"commentFlag"` + CommentId int `json:"commentId"` + CommentId2 string `json:"commentId2"` + Content string `json:"content"` + CreateTime int `json:"createTime"` + DeleteFlag int `json:"deleteFlag"` + IsNotRichText int `json:"isNotRichText"` + Nickname string `json:"nickname"` + ReplyCommentId int `json:"replyCommentId"` + ReplyCommentId2 string `json:"replyCommentId2"` + ReplyUsername string `json:"replyUsername"` + Source int `json:"source"` + Type int `json:"type"` + Username string `json:"username"` + } `json:"likeUserList"` + LikeUserListCount int `json:"likeUserListCount"` + Nickname string `json:"nickname"` + NoChange int `json:"noChange"` + ObjectDesc struct { + Buffer string `json:"buffer"` + ILen int `json:"iLen"` + } `json:"objectDesc"` + ObjectOperations struct { + Buffer string `json:"buffer"` + ILen int `json:"iLen"` + } `json:"objectOperations"` + PreDownloadInfo struct { + NoPreDownloadRange string `json:"noPreDownloadRange"` + PreDownloadNetType int `json:"preDownloadNetType"` + PreDownloadPercent int `json:"preDownloadPercent"` + } `json:"preDownloadInfo"` + ReferId string `json:"referId"` + ReferUsername string `json:"referUsername"` + SnsRedEnvelops struct { + ReportId int `json:"reportId"` + ReportKey int `json:"reportKey"` + ResourceId int `json:"resourceId"` + RewardCount int `json:"rewardCount"` + RewardUserList []interface{} `json:"rewardUserList"` + } `json:"snsRedEnvelops"` + Username string `json:"username"` + WeAppInfo struct { + AppId int `json:"appId"` + MapPoiId string `json:"mapPoiId"` + RedirectUrl string `json:"redirectUrl"` + Score int `json:"score"` + ShowType int `json:"showType"` + UserName string `json:"userName"` + } `json:"weAppInfo"` + WithUserCount int `json:"withUserCount"` + WithUserList []interface{} `json:"withUserList"` + WithUserListCount int `json:"withUserListCount"` + } `json:"snsObject"` +} + +type CommentMomentResponse struct { + Data CommentMomentResponseData `json:"data"` + Type int `json:"type"` +} + +// CommentMoment 评论朋友圈 +func (w *WxApi) CommentMoment(request CommentMomentRequest) (*CommentMomentResponseData, error) { + resp, err := w.internalCall(MtCommentMomentMsg, 60, MtCommentMomentMsg, request, nil) + if err != nil { + return nil, err + } + var rdata CommentMomentResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type LikeMomentRequest struct { + ObjectId string `json:"object_id"` +} + +type LikeMomentResponseData struct { + BaseResponse struct { + ErrMsg struct { + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + SnsObject struct { + BlackList []interface{} `json:"blackList"` + BlackListCount int `json:"blackListCount"` + CommentCount int `json:"commentCount"` + CommentUserList []struct { + CommentFlag int `json:"commentFlag"` + CommentId int `json:"commentId"` + CommentId2 string `json:"commentId2"` + Content string `json:"content"` + CreateTime int `json:"createTime"` + DeleteFlag int `json:"deleteFlag"` + IsNotRichText int `json:"isNotRichText"` + Nickname string `json:"nickname"` + ReplyCommentId int `json:"replyCommentId"` + ReplyCommentId2 string `json:"replyCommentId2"` + ReplyUsername string `json:"replyUsername"` + Source int `json:"source"` + Type int `json:"type"` + Username string `json:"username"` + } `json:"commentUserList"` + CommentUserListCount int `json:"commentUserListCount"` + CreateTime int `json:"createTime"` + DeleteFlag int `json:"deleteFlag"` + ExtFlag int `json:"extFlag"` + GroupCount int `json:"groupCount"` + GroupList []interface{} `json:"groupList"` + GroupUser []interface{} `json:"groupUser"` + GroupUserCount int `json:"groupUserCount"` + Id string `json:"id"` + IsNotRichText int `json:"isNotRichText"` + LikeCount int `json:"likeCount"` + LikeFlag int `json:"likeFlag"` + LikeUserList []struct { + CommentFlag int `json:"commentFlag"` + CommentId int `json:"commentId"` + CommentId2 string `json:"commentId2"` + Content string `json:"content"` + CreateTime int `json:"createTime"` + DeleteFlag int `json:"deleteFlag"` + IsNotRichText int `json:"isNotRichText"` + Nickname string `json:"nickname"` + ReplyCommentId int `json:"replyCommentId"` + ReplyCommentId2 string `json:"replyCommentId2"` + ReplyUsername string `json:"replyUsername"` + Source int `json:"source"` + Type int `json:"type"` + Username string `json:"username"` + } `json:"likeUserList"` + LikeUserListCount int `json:"likeUserListCount"` + Nickname string `json:"nickname"` + NoChange int `json:"noChange"` + ObjectDesc struct { + Buffer string `json:"buffer"` + ILen int `json:"iLen"` + } `json:"objectDesc"` + ObjectOperations struct { + Buffer string `json:"buffer"` + ILen int `json:"iLen"` + } `json:"objectOperations"` + PreDownloadInfo struct { + NoPreDownloadRange string `json:"noPreDownloadRange"` + PreDownloadNetType int `json:"preDownloadNetType"` + PreDownloadPercent int `json:"preDownloadPercent"` + } `json:"preDownloadInfo"` + ReferId string `json:"referId"` + ReferUsername string `json:"referUsername"` + SnsRedEnvelops struct { + ReportId int `json:"reportId"` + ReportKey int `json:"reportKey"` + ResourceId int `json:"resourceId"` + RewardCount int `json:"rewardCount"` + RewardUserList []interface{} `json:"rewardUserList"` + } `json:"snsRedEnvelops"` + Username string `json:"username"` + WeAppInfo struct { + AppId int `json:"appId"` + MapPoiId string `json:"mapPoiId"` + RedirectUrl string `json:"redirectUrl"` + Score int `json:"score"` + ShowType int `json:"showType"` + UserName string `json:"userName"` + } `json:"weAppInfo"` + WithUserCount int `json:"withUserCount"` + WithUserList []interface{} `json:"withUserList"` + WithUserListCount int `json:"withUserListCount"` + } `json:"snsObject"` +} + +type LikeMomentResponse struct { + Data LikeMomentResponseData `json:"data"` + Type int `json:"type"` +} + +// LikeMoment 点赞朋友圈 +func (w *WxApi) LikeMoment(request LikeMomentRequest) (*LikeMomentResponseData, error) { + resp, err := w.internalCall(MtLikeMomentMsg, 60, MtLikeMomentMsg, request, nil) + if err != nil { + return nil, err + } + var rdata LikeMomentResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type SendMomentRequest struct { + ObjectDesc string `json:"object_desc"` +} + +type SendMomentResponseData struct { + BaseResponse struct { + ErrMsg struct { + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + SnsObject struct { + BlackList []interface{} `json:"blackList"` + BlackListCount int `json:"blackListCount"` + CommentCount int `json:"commentCount"` + CommentUserList []interface{} `json:"commentUserList"` + CommentUserListCount int `json:"commentUserListCount"` + CreateTime int `json:"createTime"` + DeleteFlag int `json:"deleteFlag"` + ExtFlag int `json:"extFlag"` + GroupCount int `json:"groupCount"` + GroupList []interface{} `json:"groupList"` + GroupUser []interface{} `json:"groupUser"` + GroupUserCount int `json:"groupUserCount"` + Id string `json:"id"` + IsNotRichText int `json:"isNotRichText"` + LikeCount int `json:"likeCount"` + LikeFlag int `json:"likeFlag"` + LikeUserList []interface{} `json:"likeUserList"` + LikeUserListCount int `json:"likeUserListCount"` + Nickname string `json:"nickname"` + NoChange int `json:"noChange"` + ObjectDesc struct { + Buffer string `json:"buffer"` + ILen int `json:"iLen"` + } `json:"objectDesc"` + ObjectOperations struct { + Buffer string `json:"buffer"` + ILen int `json:"iLen"` + } `json:"objectOperations"` + PreDownloadInfo struct { + NoPreDownloadRange string `json:"noPreDownloadRange"` + PreDownloadNetType int `json:"preDownloadNetType"` + PreDownloadPercent int `json:"preDownloadPercent"` + } `json:"preDownloadInfo"` + ReferId string `json:"referId"` + ReferUsername string `json:"referUsername"` + SnsRedEnvelops struct { + ReportId int `json:"reportId"` + ReportKey int `json:"reportKey"` + ResourceId int `json:"resourceId"` + RewardCount int `json:"rewardCount"` + RewardUserList []interface{} `json:"rewardUserList"` + } `json:"snsRedEnvelops"` + Username string `json:"username"` + WeAppInfo struct { + AppId int `json:"appId"` + MapPoiId string `json:"mapPoiId"` + RedirectUrl string `json:"redirectUrl"` + Score int `json:"score"` + ShowType int `json:"showType"` + UserName string `json:"userName"` + } `json:"weAppInfo"` + WithUserCount int `json:"withUserCount"` + WithUserList []interface{} `json:"withUserList"` + WithUserListCount int `json:"withUserListCount"` + } `json:"snsObject"` + SpamTips string `json:"spamTips"` +} + +type SendMomentResponse struct { + Data SendMomentResponseData `json:"data"` + Type int `json:"type"` +} + +// SendMoment 发送朋友圈 +func (w *WxApi) SendMoment(request SendMomentRequest) (*SendMomentResponseData, error) { + resp, err := w.internalCall(MtSendMomentMsg, 60, MtSendMomentMsg, request, nil) + if err != nil { + return nil, err + } + var rdata SendMomentResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type UploadMomentImageRequest struct { + Path string `json:"path"` +} + +type UploadMomentImageResponseData struct { + BaseResponse struct { + Ret int `json:"ret"` + } `json:"baseResponse"` + BufferUrl struct { + Type int `json:"type"` + Url string `json:"url"` + } `json:"bufferUrl"` + ClientId string `json:"clientId"` + Id int `json:"id"` + StartPos int `json:"startPos"` + ThumbUrlCount int `json:"thumbUrlCount"` + ThumbUrls []struct { + Type int `json:"type"` + Url string `json:"url"` + } `json:"thumbUrls"` + TotalLen int `json:"totalLen"` + Type int `json:"type"` +} + +type UploadMomentImageResponse struct { + Data UploadMomentImageResponseData `json:"data"` + Type int `json:"type"` +} + +// UploadMomentImage 上传朋友圈图片 +func (w *WxApi) UploadMomentImage(request UploadMomentImageRequest) (*UploadMomentImageResponseData, error) { + resp, err := w.internalCall(MtUploadMomentImageMsg, 60, MtUploadMomentImageMsg, request, nil) + if err != nil { + return nil, err + } + var rdata UploadMomentImageResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type GetFriendMomentRequest struct { + Username string `json:"username"` + FirstPageMd5 string `json:"first_page_md5"` + MaxId string `json:"max_id"` +} + +type GetFriendMomentResponseData struct { + BaseResponse struct { + ErrMsg struct { + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + ContinueId string `json:"continueId"` + FirstPageMd5 string `json:"firstPageMd5"` + LimitedId string `json:"limitedId"` + NewRequestTime int `json:"newRequestTime"` + ObjectCount int `json:"objectCount"` + ObjectCountForSameMd5 int `json:"objectCountForSameMd5"` + ObjectList []interface{} `json:"objectList"` + ObjectTotalCount int `json:"objectTotalCount"` + RetTips string `json:"retTips"` + ServerConfig struct { + CopyAndPasteWordLimit int `json:"copyAndPasteWordLimit"` + PostMentionLimit int `json:"postMentionLimit"` + } `json:"serverConfig"` + SnsUserInfo struct { + SnsBgImgId string `json:"snsBgImgId"` + SnsBgObjectId string `json:"snsBgObjectId"` + SnsFlag int `json:"snsFlag"` + SnsFlagEx int `json:"snsFlagEx"` + } `json:"snsUserInfo"` +} + +type GetFriendMomentResponse struct { + Data GetFriendMomentResponseData `json:"data"` + Type int `json:"type"` +} + +// GetFriendMoment 获取好友朋友圈 +func (w *WxApi) GetFriendMoment(request GetFriendMomentRequest) (*GetFriendMomentResponseData, error) { + resp, err := w.internalCall(MtGetFriendMomentMsg, 60, MtGetFriendMomentMsg, request, nil) + if err != nil { + return nil, err + } + var rdata GetFriendMomentResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} diff --git a/core/callapi_mp.go b/core/callapi_mp.go new file mode 100644 index 0000000..0544d33 --- /dev/null +++ b/core/callapi_mp.go @@ -0,0 +1,49 @@ +package core + +import "github.com/goWxHook/goWxHook/utils/json" + +type GetMiniProgramCodeRequest struct { + Appid string `json:"appid"` +} + +type GetMiniProgramCodeResponseData struct { + AppIconUrl string `json:"appIconUrl"` + AppName string `json:"appName"` + BaseResponse struct { + ErrMsg struct { + String string `json:"string"` + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + Code string `json:"code"` + JsApiBaseResponse struct { + Errcode int `json:"errcode"` + Errmsg string `json:"errmsg"` + } `json:"jsApiBaseResponse"` + LiftSpan int `json:"liftSpan"` + OpenId string `json:"openId"` + ScopeList []interface{} `json:"scopeList"` + SessionKey string `json:"sessionKey"` + SessionTicket string `json:"sessionTicket"` + Signature string `json:"signature"` + State string `json:"state"` +} + +type GetMiniProgramCodeResponse struct { + Data GetMiniProgramCodeResponseData `json:"data"` + Type int `json:"type"` +} + +// GetMiniProgramCode 获取小程序授权Code +func (w *WxApi) GetMiniProgramCode(request GetMiniProgramCodeRequest) (*GetMiniProgramCodeResponseData, error) { + resp, err := w.internalCall(MtGetMiniProgramCodeMsg, 60, MtGetMiniProgramCodeMsg, request, nil) + if err != nil { + return nil, err + } + var rdata GetMiniProgramCodeResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} diff --git a/core/callapi_other.go b/core/callapi_other.go new file mode 100644 index 0000000..9880f1e --- /dev/null +++ b/core/callapi_other.go @@ -0,0 +1,86 @@ +package core + +import "github.com/goWxHook/goWxHook/utils/json" + +type GetA8KeyRequest struct { + Url string `json:"url"` + Scene int `json:"scene"` +} + +type GetA8KeyResponseData struct { + A8Key string `json:"a8Key"` + ActionCode int `json:"actionCode"` + AntispamTicket string `json:"antispamTicket"` + BaseResponse struct { + ErrMsg struct { + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + Content string `json:"content"` + Cookie struct { + Buffer string `json:"buffer"` + ILen int `json:"iLen"` + } `json:"cookie"` + DeepLinkBitSet struct { + BitValue string `json:"bitValue"` + } `json:"deepLinkBitSet"` + FullUrl string `json:"fullUrl"` + GeneralControlBitSet struct { + BitValue int `json:"bitValue"` + } `json:"generalControlBitSet"` + HeadImg string `json:"headImg"` + HttpHeaderCount int `json:"httpHeaderCount"` + HttpHeaderList []struct { + Key string `json:"key"` + Value string `json:"value"` + } `json:"httpHeaderList"` + JsapicontrolBytes struct { + Buffer string `json:"buffer"` + ILen int `json:"iLen"` + } `json:"jsapicontrolBytes"` + Jsapipermission struct { + BitValue int `json:"bitValue"` + BitValue2 int `json:"bitValue2"` + BitValue3 int `json:"bitValue3"` + BitValue4 int `json:"bitValue4"` + } `json:"jsapipermission"` + MenuWording string `json:"menuWording"` + Mid string `json:"mid"` + ScopeCount int `json:"scopeCount"` + ScopeList []interface{} `json:"scopeList"` + ShareUrl string `json:"shareUrl"` + Ssid string `json:"ssid"` + Title string `json:"title"` + UserName string `json:"userName"` + Wording string `json:"wording"` +} + +type GetA8KeyResponse struct { + Data GetA8KeyResponseData `json:"data"` + Type int `json:"type"` +} + +// GetA8Key 获取A8Key +func (w *WxApi) GetA8Key(request GetA8KeyRequest) (*GetA8KeyResponseData, error) { + resp, err := w.internalCall(MtGetA8KeyMsg, 60, MtGetA8KeyMsg, request, nil) + if err != nil { + return nil, err + } + var rdata GetA8KeyResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type DecryptImgRequest struct { + SrcFile string `json:"src_file"` + DestFile string `json:"dest_file"` +} + +// DecryptImg 解密图片 +func (w *WxApi) DecryptImg(request DecryptImgRequest) error { + _, err := w.internalCall(0, -1, MtDecryptImgMsg, request, nil) + return err +} diff --git a/core/callapi_room.go b/core/callapi_room.go new file mode 100644 index 0000000..04770f2 --- /dev/null +++ b/core/callapi_room.go @@ -0,0 +1,352 @@ +package core + +import ( + "github.com/goWxHook/goWxHook/utils" + "github.com/goWxHook/goWxHook/utils/json" +) + +type GetChatRoomListResponse struct { + Data []GetChatRoomListResponseDataItem `json:"data"` + Type int `json:"type"` +} + +type GetChatRoomListResponseDataItem struct { + Avatar string `json:"avatar"` + IsManager int `json:"is_manager"` + ManagerWxid string `json:"manager_wxid"` + MemberList []string `json:"member_list"` + Nickname string `json:"nickname"` + Remark string `json:"remark"` + TotalMember int `json:"total_member"` + Wxid string `json:"wxid"` +} + +// GetChatRoomList 群聊列表 +func (w *WxApi) GetChatRoomList() ([]GetChatRoomListResponseDataItem, error) { + resp, err := w.internalCall(MtDataChatroomsMsg, 10, MtDataChatroomsMsg, map[string]interface{}{"detail": 1}, nil) + if err != nil { + return nil, err + } + var rdata GetChatRoomListResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} + +type GetChatRoomMemberListResponse struct { + Data GetChatRoomMemberListResponseData `json:"data"` + Type int `json:"type"` +} + +type GetChatRoomMemberListResponseData struct { + Extend string `json:"extend"` + GroupWxid string `json:"group_wxid"` + MemberList []struct { + Account string `json:"account"` + Avatar string `json:"avatar"` + City string `json:"city"` + Country string `json:"country"` + DisplayName string `json:"display_name"` + Nickname string `json:"nickname"` + Province string `json:"province"` + Remark string `json:"remark"` + Sex int `json:"sex"` + Wxid string `json:"wxid"` + } `json:"member_list"` + Total int `json:"total"` +} + +// GetChatRoomMemberList 获取群成员列表 +func (w *WxApi) GetChatRoomMemberList(roomWxid string) (*GetChatRoomMemberListResponseData, error) { + resp, err := w.internalCall(MtDataChatroomMembersMsg, 20, MtDataChatroomMembersMsg, map[string]interface{}{"room_wxid": roomWxid}, nil) + if err != nil { + return nil, err + } + var rdata GetChatRoomMemberListResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +// GetRoomDetailInfoByProtocol 获取群详细信息(协议) +func (w *WxApi) GetRoomDetailInfoByProtocol(roomWxid string) ([]GetFriendDetailInfoByProtocolResponseDataContactListItem, error) { + resp, err := w.internalCall(MtGetFriendDetailMsg, 20, MtGetFriendDetailMsg, map[string]interface{}{"wxid": roomWxid}, nil) + if err != nil { + return nil, err + } + var rdata GetFriendDetailInfoByProtocolResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data.ContactList, nil +} + +type GetRoomMemberInviteListResponseData struct { + MemberList []struct { + Avatar string `json:"avatar"` + Flag int `json:"flag"` + InviteBy string `json:"invite_by"` + Nickname string `json:"nickname"` + Wxid string `json:"wxid"` + } `json:"member_list"` + RoomWxid string `json:"room_wxid"` +} + +type GetRoomMemberInviteListResponse struct { + Data GetRoomMemberInviteListResponseData `json:"data"` + Type int `json:"type"` +} + +// GetRoomMemberInviteList 获取群成员邀请关系(协议) +func (w *WxApi) GetRoomMemberInviteList(roomWxid string) (*GetRoomMemberInviteListResponseData, error) { + resp, err := w.internalCall(MtGetChatRoomInviteRelationMsg, 20, MtGetChatRoomInviteRelationMsg, map[string]interface{}{"room_wxid": roomWxid}, nil) + if err != nil { + return nil, err + } + var rdata GetRoomMemberInviteListResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type CreateRoomRequest struct { + Wxids []string `json:"wxids"` +} + +// CreateChatRoom 创建群聊 +func (w *WxApi) CreateChatRoom(request CreateRoomRequest) error { + _, err := w.internalCall(0, -1, MtCreateRoomMsg, request.Wxids, nil) + return err +} + +type CreateChatRoomByProtocolResponseData struct { + BaseResponse struct { + ErrMsg struct { + String string `json:"string"` + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + BigHeadImgUrl string `json:"bigHeadImgUrl"` + ChatRoomName struct { + String string `json:"string"` + } `json:"chatRoomName"` + ImgBuf struct { + Buffer string `json:"buffer"` + ILen int `json:"iLen"` + } `json:"imgBuf"` + MemberCount int `json:"memberCount"` + MemberList []struct { + City string `json:"city"` + ContactType int `json:"contactType"` + Country string `json:"country"` + MemberName struct { + String string `json:"string"` + } `json:"memberName"` + MemberStatus int `json:"memberStatus"` + NickName struct { + String string `json:"string"` + } `json:"nickName"` + PersonalCard int `json:"personalCard"` + Province string `json:"province"` + PyInitial struct { + String string `json:"string"` + } `json:"pyInitial"` + QuanPin struct { + String string `json:"string"` + } `json:"quanPin"` + Remark struct { + } `json:"remark"` + RemarkPYInitial struct { + } `json:"remarkPYInitial"` + RemarkQuanPin struct { + } `json:"remarkQuanPin"` + Sex int `json:"sex"` + Signature string `json:"signature"` + VerifyFlag int `json:"verifyFlag"` + VerifyInfo string `json:"verifyInfo"` + } `json:"memberList"` + PyInitial struct { + } `json:"pyInitial"` + QuanPin struct { + } `json:"quanPin"` + SmallHeadImgUrl string `json:"smallHeadImgUrl"` + Topic struct { + } `json:"topic"` +} + +type CreateChatRoomByProtocolResponse struct { + Data CreateChatRoomByProtocolResponseData `json:"data"` + Type int `json:"type"` +} + +// CreateChatRoomByProtocol 创建群聊(协议) +func (w *WxApi) CreateChatRoomByProtocol(request CreateRoomRequest) (*CreateChatRoomByProtocolResponseData, error) { + resp, err := w.internalCall(MtCreateRoomByProtocolMsg, 20, MtCreateRoomByProtocolMsg, request.Wxids, nil) + if err != nil { + return nil, err + } + var rdata CreateChatRoomByProtocolResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type InviteToRoomRequest struct { + RoomWxid string `json:"room_wxid"` + MemberList []string `json:"member_list"` +} + +type InviteToRoomResponseData struct { + BaseResponse struct { + ErrMsg struct { + String string `json:"string"` + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + MemberCount int `json:"memberCount"` + MemberList []struct { + City string `json:"city"` + ContactType int `json:"contactType"` + Country string `json:"country"` + MemberName struct { + String string `json:"string"` + } `json:"memberName"` + MemberStatus int `json:"memberStatus"` + NickName struct { + String string `json:"string"` + } `json:"nickName"` + PersonalCard int `json:"personalCard"` + Province string `json:"province"` + PyInitial struct { + String string `json:"string"` + } `json:"pyInitial"` + QuanPin struct { + String string `json:"string"` + } `json:"quanPin"` + Remark struct { + } `json:"remark"` + RemarkPYInitial struct { + } `json:"remarkPYInitial"` + RemarkQuanPin struct { + } `json:"remarkQuanPin"` + Sex int `json:"sex"` + Signature string `json:"signature"` + VerifyFlag int `json:"verifyFlag"` + VerifyInfo string `json:"verifyInfo"` + } `json:"memberList"` +} + +type InviteToRoomResponse struct { + Data InviteToRoomResponseData `json:"data"` + Type int `json:"type"` +} + +// InviteToRoom 批量拉人进入群聊 +func (w *WxApi) InviteToRoom(request InviteToRoomRequest) (*InviteToRoomResponseData, error) { + rr := utils.Ifs(len(request.MemberList) > 40, MtInviteToRoomReqMsg, MtInviteToRoomMsg) + resp, err := w.internalCall(rr, 30, rr, request, nil) + if err != nil { + return nil, err + } + var rdata InviteToRoomResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type DelChatRoomMemberRequest struct { + RoomWxid string `json:"room_wxid"` + MemberList []string `json:"member_list"` +} + +// DelChatRoomMember 删除群成员 +func (w *WxApi) DelChatRoomMember(request DelChatRoomMemberRequest) error { + _, err := w.internalCall(MtDelRoomMemberMsg, 30, MtDelRoomMemberMsg, request, nil) + return err +} + +type EditChatRoomMemberRequest struct { + RoomWxid string `json:"room_wxid"` + Name string `json:"name"` +} + +// EditChatRoomName 修改群聊名称 +func (w *WxApi) EditChatRoomName(request EditChatRoomMemberRequest) error { + _, err := w.internalCall(0, -1, MtModRoomNameMsg, request, nil) + return err +} + +type EditChatRoomNoticeRequest struct { + RoomWxid string `json:"room_wxid"` + Notice string `json:"notice"` +} + +// EditChatRoomNotice 修改群公告 +func (w *WxApi) EditChatRoomNotice(request EditChatRoomNoticeRequest) error { + _, err := w.internalCall(0, -1, MtModRoomNoticeMsg, request, nil) + return err +} + +type EditRoomMineNickNameRequest struct { + RoomWxid string `json:"room_wxid"` + Nickname string `json:"nickname"` +} + +// EditRoomMineNickName 修改我在本群的昵称 +func (w *WxApi) EditRoomMineNickName(request EditRoomMineNickNameRequest) error { + _, err := w.internalCall(0, -1, MtModRoomMemberNameMsg, request, nil) + return err +} + +type RoomShowNickNameRequest struct { + RoomWxid string `json:"room_wxid"` + Status int `json:"status"` // 1显示 0隐藏 +} + +// RoomShowNickName 群聊是否显示昵称 +func (w *WxApi) RoomShowNickName(request RoomShowNickNameRequest) error { + _, err := w.internalCall(0, -1, MtModRoomShowNameMsg, request, nil) + return err +} + +type SaveRoomSaveToContactRequest struct { + RoomWxid string `json:"room_wxid"` + Status int `json:"status"` // 1保存 2移出 +} + +// SaveRoomSaveToContact 保存到/移出通讯录 +func (w *WxApi) SaveRoomSaveToContact(request SaveRoomSaveToContactRequest) error { + _, err := w.internalCall(0, -1, MtSaveRoomToContactMsg, request, nil) + return err +} + +type DelChatRoomRequest struct { + RoomWxid string `json:"room_wxid"` +} + +// DelChatRoom 退出并删除群聊 +func (w *WxApi) DelChatRoom(request DelChatRoomRequest) error { + _, err := w.internalCall(0, -1, MtQuitDelRoomMsg, request, nil) + return err +} + +type AutoAcceptRoomRequest struct { + Auto int `json:"auto"` // 0不自动 1自动 +} + +// AutoAcceptRoom 自动接收群邀请 +func (w *WxApi) AutoAcceptRoom(request AutoAcceptRoomRequest) error { + _, err := w.internalCall(0, -1, MtAutoAcceptRoomMsg, request, nil) + return err +} diff --git a/core/callapi_tag.go b/core/callapi_tag.go new file mode 100644 index 0000000..1dbcc71 --- /dev/null +++ b/core/callapi_tag.go @@ -0,0 +1,158 @@ +package core + +import "github.com/goWxHook/goWxHook/utils/json" + +type AddTagRequest struct { + LabelName string `json:"label_name"` +} + +type AddTagResponseData struct { + LabelId int `json:"label_id"` + LabelName string `json:"label_name"` +} + +type AddTagResponse struct { + Data AddTagResponseData `json:"data"` + Type int `json:"type"` +} + +// AddTag 添加标签 +func (w *WxApi) AddTag(request AddTagRequest) (*AddTagResponseData, error) { + resp, err := w.internalCall(MtAddTagMsg, 20, MtAddTagMsg, request, nil) + if err != nil { + return nil, err + } + var rdata AddTagResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type DeleteTagRequest struct { + LabelId int `json:"label_id"` +} + +type DeleteTagResponseData struct { + BaseResponse struct { + ErrMsg struct { + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` +} + +type DeleteTagResponse struct { + Data DeleteTagResponseData `json:"data"` + Type int `json:"type"` +} + +// DeleteTag 删除标签 +func (w *WxApi) DeleteTag(request DeleteTagRequest) (*DeleteTagResponseData, error) { + resp, err := w.internalCall(MtDeleteTagMsg, 20, MtDeleteTagMsg, request, nil) + if err != nil { + return nil, err + } + var rdata DeleteTagResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type ModifyTagRequest struct { + LabelId int `json:"label_id"` + LabelName string `json:"label_name"` +} + +// ModifyTag 修改标签 +func (w *WxApi) ModifyTag(request ModifyTagRequest) error { + _, err := w.internalCall(MtModifyTagMsg, 20, MtModifyTagMsg, request, nil) + return err +} + +type AddTagToUserRequest struct { + Wxid string `json:"wxid"` + LabelidList string `json:"labelid_list"` +} + +type AddTagToUserResponseData struct { + BaseResponse struct { + ErrMsg struct { + String string `json:"string"` + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` +} + +type AddTagToUserResponse struct { + Data AddTagToUserResponseData `json:"data"` + Type int `json:"type"` +} + +// AddTagToUser 为用户添加标签 +func (w *WxApi) AddTagToUser(request AddTagToUserRequest) (*AddTagToUserResponseData, error) { + resp, err := w.internalCall(MtAddTagToUserMsg, 20, MtAddTagToUserMsg, request, nil) + if err != nil { + return nil, err + } + var rdata AddTagToUserResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type GetTagListByWxidRequest struct { + Wxid string `json:"wxid"` +} + +type GetTagListByWxidResponseData struct { + LabelidList string `json:"labelid_list"` + Wxid string `json:"wxid"` +} + +type GetTagListByWxidResponse struct { + Data GetTagListByWxidResponseData `json:"data"` + Type int `json:"type"` +} + +// GetTagListByWxid 获取用户标签列表 +func (w *WxApi) GetTagListByWxid(request GetTagListByWxidRequest) (*GetTagListByWxidResponseData, error) { + resp, err := w.internalCall(MtGetTagListByWxidMsg, 20, MtGetTagListByWxidMsg, request, nil) + if err != nil { + return nil, err + } + var rdata GetTagListByWxidResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type GetTagListResponseDataItem struct { + LabelId string `json:"label_id"` + LabelName string `json:"label_name"` +} + +type GetTagListResponse struct { + Data []GetTagListResponseDataItem `json:"data"` + Type int `json:"type"` +} + +// GetTagList 获取标签列表 +func (w *WxApi) GetTagList() ([]GetTagListResponseDataItem, error) { + resp, err := w.internalCall(MtGetTagListMsg, 20, MtGetTagListMsg, nil, nil) + if err != nil { + return nil, err + } + var rdata GetTagListResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} diff --git a/core/callapi_ui.go b/core/callapi_ui.go new file mode 100644 index 0000000..5f07935 --- /dev/null +++ b/core/callapi_ui.go @@ -0,0 +1,39 @@ +package core + +type SwitchSessionRequest struct { + ToWxid string `json:"to_wxid"` +} + +// SwitchSession 切换会话 +func (w *WxApi) SwitchSession(request SwitchSessionRequest) error { + _, err := w.internalCall(0, -1, MtSwitchSessionMsg, request, nil) + return err +} + +// ClearChatRecord 清空聊天记录 +func (w *WxApi) ClearChatRecord() error { + _, err := w.internalCall(0, -1, MtClearChatRecordMsg, map[string]interface{}{}, nil) + return err +} + +type ChatMsgNotNotifyRequest struct { + Wxid string `json:"wxid"` + Status int `json:"status"` // 1开启 0关闭 +} + +// ChatMsgNotNotify 消息免打扰 +func (w *WxApi) ChatMsgNotNotify(request ChatMsgNotNotifyRequest) error { + _, err := w.internalCall(0, -1, MtModRecvNotifyMsg, request, nil) + return err +} + +type ChatSessionTopRequest struct { + Wxid string `json:"wxid"` + Status int `json:"status"` +} + +// ChatSessionTop 置顶会话 +func (w *WxApi) ChatSessionTop(request ChatSessionTopRequest) error { + _, err := w.internalCall(0, -1, MtModChatSessionTopMsg, request, nil) + return err +} diff --git a/core/callapi_video_moment.go b/core/callapi_video_moment.go new file mode 100644 index 0000000..5b69b2c --- /dev/null +++ b/core/callapi_video_moment.go @@ -0,0 +1,485 @@ +package core + +import "github.com/goWxHook/goWxHook/utils/json" + +type VideoMomentInitResponseData struct { + AliasInfo []struct { + AliasMsgName string `json:"aliasMsgName"` + AliasVersion int `json:"aliasVersion"` + HeadImgUrl string `json:"headImgUrl"` + Nickname string `json:"nickname"` + RoleType int `json:"roleType"` + } `json:"aliasInfo"` + BaseResponse struct { + ErrMsg struct { + String string `json:"string"` + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + Cmdlist []interface{} `json:"cmdlist"` + ContinueFlag int `json:"continueFlag"` + CurrentAliasRoleType int `json:"currentAliasRoleType"` + FinderUsernameList []struct { + FinderUsernameList string `json:"finderUsernameList"` + } `json:"finderUsernameList"` + Keybuf struct { + Buffer string `json:"buffer"` + ILen int `json:"iLen"` + } `json:"keybuf"` + Myacct []struct { + ArchievementInfo struct { + } `json:"archievementInfo"` + AuthInfo struct { + } `json:"authInfo"` + BindInfo []interface{} `json:"bindInfo"` + CoverEntranceFlag int `json:"coverEntranceFlag"` + CoverImgUrl string `json:"coverImgUrl"` + CoverUrl string `json:"coverUrl"` + ExtFlag int `json:"extFlag"` + ExtInfo struct { + BirthDay int `json:"birthDay"` + BirthMonth int `json:"birthMonth"` + BirthYear int `json:"birthYear"` + City string `json:"city"` + Country string `json:"country"` + Province string `json:"province"` + Sex int `json:"sex"` + } `json:"extInfo"` + FansCount int `json:"fansCount"` + FeedCount int `json:"feedCount"` + FollowFlag int `json:"followFlag"` + FollowTime int `json:"followTime"` + ForeignUserFlag int `json:"foreignUserFlag"` + FriendFollowCount int `json:"friendFollowCount"` + GuestInfo struct { + } `json:"guestInfo"` + HeadUrl string `json:"headUrl"` + LiveCoverImgUrl string `json:"liveCoverImgUrl"` + LiveInfo struct { + AnchorStatusFlag string `json:"anchorStatusFlag"` + LotterySetting struct { + } `json:"lotterySetting"` + MicSetting struct { + SettingFlag string `json:"settingFlag"` + SettingSwitchFlag string `json:"settingSwitchFlag"` + } `json:"micSetting"` + SwitchFlag int `json:"switchFlag"` + } `json:"liveInfo"` + LiveNoticeInfo struct { + } `json:"liveNoticeInfo"` + LiveStatus int `json:"liveStatus"` + LoggingoutWording string `json:"loggingoutWording"` + Menu []interface{} `json:"menu"` + MsgInfo struct { + } `json:"msgInfo"` + Nickname string `json:"nickname"` + OneTimeFlag int `json:"oneTimeFlag"` + OriginalEntranceFlag int `json:"originalEntranceFlag"` + OriginalFlag int `json:"originalFlag"` + OriginalInfo struct { + PostNeedCheckFlag int `json:"postNeedCheckFlag"` + PunishYearFlag int `json:"punishYearFlag"` + RestApplyOriginalCount int `json:"restApplyOriginalCount"` + RestPunishDay int `json:"restPunishDay"` + RestRepostCount int `json:"restRepostCount"` + } `json:"originalInfo"` + Seq string `json:"seq"` + Signature string `json:"signature"` + SpamStatus int `json:"spamStatus"` + UserFlag int `json:"userFlag"` + UserMode int `json:"userMode"` + Username string `json:"username"` + VestNickname string `json:"vestNickname"` + WxUsernameV5 string `json:"wxUsernameV5"` + } `json:"myacct"` + NextAliasModAvailableTime string `json:"nextAliasModAvailableTime"` + RetryDelaySecond int `json:"retryDelaySecond"` + RingtoneConfig struct { + } `json:"ringtoneConfig"` + SlideUpGuideConfig []interface{} `json:"slideUpGuideConfig"` + TabInfos []struct { + DisplayTabType int `json:"displayTabType"` + TabName string `json:"tabName"` + } `json:"tabInfos"` + TeenmodeSetting struct { + } `json:"teenmodeSetting"` + TeenmodeTipsConfig struct { + } `json:"teenmodeTipsConfig"` + UserNotCreatedFlag int `json:"userNotCreatedFlag"` + Userver int `json:"userver"` + UserverForH5 int `json:"userverForH5"` + WxPersonalizedSetting struct { + } `json:"wxPersonalizedSetting"` + WxUserAttr struct { + NotAvailableFlag int `json:"notAvailableFlag"` + Wording string `json:"wording"` + } `json:"wxUserAttr"` + WxUsernameForH5 string `json:"wxUsernameForH5"` +} + +type VideoMomentInitResponse struct { + Data VideoMomentInitResponseData `json:"data"` + Type int `json:"type"` +} + +// VideoMomentInit 视频号初始化 +func (w *WxApi) VideoMomentInit() (*VideoMomentInitResponseData, error) { + resp, err := w.internalCall(MtVideoMomentInitMsg, 120, MtVideoMomentInitMsg, nil, nil) + if err != nil { + return nil, err + } + var rdata VideoMomentInitResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type VideoMomentSearchRequest struct { + Query string `json:"query"` + LastBuff string `json:"last_buff"` + Scene int `json:"scene"` +} + +type VideoMomentSearchResponse struct { + Data interface{} `json:"data"` + Type int `json:"type"` +} + +// VideoMomentSearch 视频号搜索 +func (w *WxApi) VideoMomentSearch(request VideoMomentSearchRequest) (interface{}, error) { + resp, err := w.internalCall(MtVideoMomentSearchMsg, 120, MtVideoMomentSearchMsg, request, nil) + if err != nil { + return nil, err + } + var rdata VideoMomentSearchResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} + +type VideoMomentUserHomeRequest struct { + Username string `json:"username"` + LastBuff string `json:"last_buff"` +} + +type VideoMomentUserHomeResponse struct { + Data interface{} `json:"data"` + Type int `json:"type"` +} + +// VideoMomentUserHome 视频号用户主页 +func (w *WxApi) VideoMomentUserHome(request VideoMomentUserHomeRequest) (interface{}, error) { + resp, err := w.internalCall(MtVideoMomentUserHomeMsg, 120, MtVideoMomentUserHomeMsg, request, nil) + if err != nil { + return nil, err + } + var rdata VideoMomentUserHomeResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} + +type VideoMomentVideoDetailRequest struct { + ObjectId string `json:"object_id"` + ObjectNonceId string `json:"object_nonce_id"` + LastBuff string `json:"last_buff"` +} + +type VideoMomentVideoDetailResponse struct { + Data interface{} `json:"data"` + Type int `json:"type"` +} + +// VideoMomentVideoDetail 查看视频详细信息(包含评论) +func (w *WxApi) VideoMomentVideoDetail(request VideoMomentVideoDetailRequest) (interface{}, error) { + resp, err := w.internalCall(MtVideoMomentVideoDetailMsg, 120, MtVideoMomentVideoDetailMsg, request, nil) + if err != nil { + return nil, err + } + var rdata VideoMomentVideoDetailResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} + +type VideoMomentFollowRequest struct { + Username string `json:"username"` +} + +type VideoMomentFollowResponseData struct { + BaseResponse struct { + ErrMsg struct { + String string `json:"string"` + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + Contact struct { + ArchievementInfo struct { + } `json:"archievementInfo"` + AuthInfo struct { + AppName string `json:"appName"` + AuthGuarantor struct { + } `json:"authGuarantor"` + AuthIconType int `json:"authIconType"` + AuthIconUrl string `json:"authIconUrl"` + AuthProfession string `json:"authProfession"` + AuthVerifyIdentity int `json:"authVerifyIdentity"` + CustomerType int `json:"customerType"` + DetailLink string `json:"detailLink"` + RealName string `json:"realName"` + VerifyStatus int `json:"verifyStatus"` + } `json:"authInfo"` + BindInfo []interface{} `json:"bindInfo"` + CoverEntranceFlag int `json:"coverEntranceFlag"` + CoverImgUrl string `json:"coverImgUrl"` + CoverUrl string `json:"coverUrl"` + ExtFlag int `json:"extFlag"` + ExtInfo struct { + BirthDay int `json:"birthDay"` + BirthMonth int `json:"birthMonth"` + BirthYear int `json:"birthYear"` + City string `json:"city"` + Country string `json:"country"` + Province string `json:"province"` + Sex int `json:"sex"` + } `json:"extInfo"` + FansCount int `json:"fansCount"` + FeedCount int `json:"feedCount"` + FollowFlag int `json:"followFlag"` + FollowTime int `json:"followTime"` + ForeignUserFlag int `json:"foreignUserFlag"` + FriendFollowCount int `json:"friendFollowCount"` + GuestInfo struct { + } `json:"guestInfo"` + HeadUrl string `json:"headUrl"` + LiveCoverImgUrl string `json:"liveCoverImgUrl"` + LiveInfo struct { + AnchorStatusFlag string `json:"anchorStatusFlag"` + LotterySetting struct { + AttendType int `json:"attendType"` + SettingFlag string `json:"settingFlag"` + } `json:"lotterySetting"` + MicSetting struct { + SettingFlag string `json:"settingFlag"` + SettingSwitchFlag string `json:"settingSwitchFlag"` + } `json:"micSetting"` + SwitchFlag int `json:"switchFlag"` + } `json:"liveInfo"` + LiveNoticeInfo struct { + } `json:"liveNoticeInfo"` + LiveStatus int `json:"liveStatus"` + LoggingoutWording string `json:"loggingoutWording"` + Menu []interface{} `json:"menu"` + MsgInfo struct { + } `json:"msgInfo"` + Nickname string `json:"nickname"` + OneTimeFlag int `json:"oneTimeFlag"` + OriginalEntranceFlag int `json:"originalEntranceFlag"` + OriginalFlag int `json:"originalFlag"` + OriginalInfo struct { + } `json:"originalInfo"` + Seq int `json:"seq"` + Signature string `json:"signature"` + SpamStatus int `json:"spamStatus"` + UserFlag int `json:"userFlag"` + UserMode int `json:"userMode"` + Username string `json:"username"` + VestNickname string `json:"vestNickname"` + WxUsernameV5 string `json:"wxUsernameV5"` + } `json:"contact"` + LiveStatusFlag int `json:"liveStatusFlag"` +} + +type VideoMomentFollowResponse struct { + Data VideoMomentFollowResponseData `json:"data"` + Type int `json:"type"` +} + +// VideoMomentFollow 关注视频号 +func (w *WxApi) VideoMomentFollow(request VideoMomentFollowRequest) (*VideoMomentFollowResponseData, error) { + resp, err := w.internalCall(MtVideoMomentFollowMsg, 120, MtVideoMomentFollowMsg, request, nil) + if err != nil { + return nil, err + } + var rdata VideoMomentFollowResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type VideoMomentLikeRequest struct { + ObjectId string `json:"object_id"` + ObjectNonceId string `json:"object_nonce_id"` +} + +type VideoMomentLikeResponseData struct { + BaseResponse struct { + ErrMsg struct { + String string `json:"string"` + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + Likeid int `json:"likeid"` +} + +type VideoMomentLikeResponse struct { + Data VideoMomentLikeResponseData `json:"data"` + Type int `json:"type"` +} + +// VideoMomentLike 视频号点赞 +func (w *WxApi) VideoMomentLike(request VideoMomentLikeRequest) (*VideoMomentLikeResponseData, error) { + resp, err := w.internalCall(MtVideoMomentLikeMsg, 120, MtVideoMomentLikeMsg, request, nil) + if err != nil { + return nil, err + } + var rdata VideoMomentLikeResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type VideoMomentGetSessionIdRequest struct { + ToUsername string `json:"to_username"` + RoleType int `json:"roleType"` +} + +type VideoMomentGetSessionIdResponseData struct { + BaseResponse struct { + ErrMsg struct { + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + EnableAction int `json:"enableAction"` + SessionId string `json:"sessionId"` + SessionInfo struct { + EnableAction int `json:"enableAction"` + MsgExtInfo string `json:"msgExtInfo"` + RejectMsg int `json:"rejectMsg"` + SessionId string `json:"sessionId"` + ToUsername string `json:"toUsername"` + } `json:"sessionInfo"` + ToUsername string `json:"toUsername"` +} + +type VideoMomentGetSessionIdResponse struct { + Data VideoMomentGetSessionIdResponseData `json:"data"` + Type int `json:"type"` +} + +// VideoMomentGetSessionId 获取私信sessionId +func (w *WxApi) VideoMomentGetSessionId(request VideoMomentGetSessionIdRequest) (*VideoMomentGetSessionIdResponseData, error) { + resp, err := w.internalCall(MtVideoMomentGetSessionIdMsg, 120, MtVideoMomentGetSessionIdMsg, request, nil) + if err != nil { + return nil, err + } + var rdata VideoMomentGetSessionIdResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type VideoMomentSendMsgRequest struct { + ToUsername string `json:"to_username"` + SessionId string `json:"session_id"` + Content string `json:"content"` +} + +type VideoMomentSendMsgResponseData struct { + BaseResponse struct { + ErrMsg struct { + String string `json:"string"` + } `json:"errMsg"` + Ret int `json:"ret"` + } `json:"baseResponse"` + Newmsgid int `json:"newmsgid"` +} + +type VideoMomentSendMsgResponse struct { + Data VideoMomentSendMsgResponseData `json:"data"` + Type int `json:"type"` +} + +// VideoMomentSendMsg 发送私信消息 +func (w *WxApi) VideoMomentSendMsg(request VideoMomentSendMsgRequest) (*VideoMomentSendMsgResponseData, error) { + resp, err := w.internalCall(MtVideoMomentSendMsg, 120, MtVideoMomentSendMsg, request, nil) + if err != nil { + return nil, err + } + var rdata VideoMomentSendMsgResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} + +type VideoMomentCreateVirtualNickNameRequest struct { + Nickname string `json:"nickname"` + HeadimgUrl string `json:"headimg_url"` +} + +type VideoMomentCreateVirtualNickNameResponse struct { + Data interface{} `json:"data"` + Type int `json:"type"` +} + +// VideoMomentCreateVirtualNickName 创建虚拟昵称 +func (w *WxApi) VideoMomentCreateVirtualNickName(request VideoMomentCreateVirtualNickNameRequest) (interface{}, error) { + resp, err := w.internalCall(MtVideoMomentCreateVirtualNickNameMsg, 120, MtVideoMomentCreateVirtualNickNameMsg, request, nil) + if err != nil { + return nil, err + } + var rdata VideoMomentCreateVirtualNickNameResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} + +type VideoMomentSwitchVirtualNickNameRequest struct { + RoleType int `json:"role_type"` +} + +type VideoMomentSwitchVirtualNickNameResponse struct { + Data interface{} `json:"data"` + Type int `json:"type"` +} + +// VideoMomentSwitchVirtualNickName 切换虚拟昵称 +func (w *WxApi) VideoMomentSwitchVirtualNickName(request VideoMomentSwitchVirtualNickNameRequest) (interface{}, error) { + resp, err := w.internalCall(MtVideoMomentSwitchVirtualNickNameMsg, 120, MtVideoMomentSwitchVirtualNickNameMsg, request, nil) + if err != nil { + return nil, err + } + var rdata VideoMomentSwitchVirtualNickNameResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} + +// VideoMomentDeleteVirtualNickName 删除虚拟昵称 +func (w *WxApi) VideoMomentDeleteVirtualNickName() error { + _, err := w.internalCall(0, -1, MtVideoMomentDeleteVirtualNickNameMsg, map[string]interface{}{}, nil) + if err != nil { + return err + } + return nil +} diff --git a/core/callapi_voice.go b/core/callapi_voice.go new file mode 100644 index 0000000..5e17747 --- /dev/null +++ b/core/callapi_voice.go @@ -0,0 +1,36 @@ +package core + +import "github.com/goWxHook/goWxHook/utils/json" + +type VoiceToTextRequest struct { + Msgid string `json:"msgid"` +} + +type VoiceToTextResponseData struct { + FromWxid string `json:"from_wxid"` + Msgid string `json:"msgid"` + RoomWxid string `json:"room_wxid"` + Status int `json:"status"` + Text string `json:"text"` + ToWxid string `json:"to_wxid"` + WxType int `json:"wx_type"` +} + +type VoiceToTextResponse struct { + Data VoiceToTextResponseData `json:"data"` + Type int `json:"type"` +} + +// VoiceToText 语音转文字 +func (w *WxApi) VoiceToText(request VoiceToTextRequest) (*VoiceToTextResponseData, error) { + resp, err := w.internalCall(MtVoiceToTextMsg, 120, MtVoiceToTextMsg, request, nil) + if err != nil { + return nil, err + } + var rdata VoiceToTextResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} diff --git a/core/callapi_workwx.go b/core/callapi_workwx.go new file mode 100644 index 0000000..5c2968e --- /dev/null +++ b/core/callapi_workwx.go @@ -0,0 +1,89 @@ +package core + +import "github.com/goWxHook/goWxHook/utils/json" + +type GetWorkWxUserListResponseDataItem struct { + Avatar string `json:"avatar"` + Nickname string `json:"nickname"` + Sex int `json:"sex"` + Wxid string `json:"wxid"` +} + +type GetWorkWxUserListResponse struct { + Data []GetWorkWxUserListResponseDataItem `json:"data"` + Type int `json:"type"` +} + +// GetWorkWxUserList 获取企业微信用户列表 +func (w *WxApi) GetWorkWxUserList() ([]GetWorkWxUserListResponseDataItem, error) { + resp, err := w.internalCall(MtGetWorkWxUserListMsg, 20, MtGetWorkWxUserListMsg, nil, nil) + if err != nil { + return nil, err + } + var rdata GetWorkWxUserListResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} + +type GetWorkWxRoomListResponseDataItem struct { + Avatar string `json:"avatar"` + ManagerWxid string `json:"manager_wxid"` + Nickname string `json:"nickname"` + RoomWxid string `json:"room_wxid"` + TotalMember int `json:"total_member"` +} + +type GetWorkWxRoomListResponse struct { + Data []GetWorkWxRoomListResponseDataItem `json:"data"` + Type int `json:"type"` +} + +// GetWorkWxRoomList 获取企业微信群列表 +func (w *WxApi) GetWorkWxRoomList() ([]GetWorkWxRoomListResponseDataItem, error) { + resp, err := w.internalCall(MtGetWorkWxChatRoomMsg, 20, MtGetWorkWxChatRoomMsg, nil, nil) + if err != nil { + return nil, err + } + var rdata GetWorkWxRoomListResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return rdata.Data, nil +} + +type GetWorkWxChatRoomMemberRequest struct { + RoomWxid string `json:"room_wxid"` +} + +type GetWorkWxChatRoomMemberResponseData struct { + MemberList []struct { + Avatar string `json:"avatar"` + Nickname string `json:"nickname"` + Sex int `json:"sex"` + Wxid string `json:"wxid"` + } `json:"member_list"` + RoomWxid string `json:"room_wxid"` +} + +type GetWorkWxChatRoomMemberResponse struct { + Data GetWorkWxChatRoomMemberResponseData `json:"data"` + Type int `json:"type"` +} + +// GetWorkWxChatRoomMember 获取企业微信群成员列表 +func (w *WxApi) GetWorkWxChatRoomMember(request GetWorkWxChatRoomMemberRequest) (*GetWorkWxChatRoomMemberResponseData, error) { + resp, err := w.internalCall(MtGetWorkWxChatRoomMemberMsg, 20, MtGetWorkWxChatRoomMemberMsg, request, nil) + if err != nil { + return nil, err + } + var rdata GetWorkWxChatRoomMemberResponse + err = json.Unmarshal([]byte(resp), &rdata) + if err != nil { + return nil, WxError{-1, err.Error()} + } + return &rdata.Data, nil +} diff --git a/core/error.go b/core/error.go new file mode 100644 index 0000000..6935ba7 --- /dev/null +++ b/core/error.go @@ -0,0 +1,22 @@ +package core + +import "fmt" + +type WxError struct { + ErrorCode int // 错误码 + Message string // 错误信息 +} + +func (e WxError) Error() string { + return fmt.Sprintf("Error Code: %d, Message: %s", e.ErrorCode, e.Message) +} + +// Code Error 错误码 +func (e WxError) Code() int { + return e.ErrorCode +} + +// ErrorMsg Error 错误信息 +func (e WxError) ErrorMsg() int { + return e.ErrorMsg() +} diff --git a/docs/docs.go b/docs/docs.go new file mode 100644 index 0000000..9865952 --- /dev/null +++ b/docs/docs.go @@ -0,0 +1,8583 @@ +// Package docs Code generated by swaggo/swag. DO NOT EDIT +package docs + +import "github.com/swaggo/swag" + +const docTemplate = `{ + "schemes": {{ marshal .Schemes }}, + "swagger": "2.0", + "info": { + "description": "{{escape .Description}}", + "title": "{{.Title}}", + "contact": {}, + "version": "{{.Version}}" + }, + "host": "{{.Host}}", + "basePath": "{{.BasePath}}", + "paths": { + "/api/v1/cdn/download": { + "post": { + "description": "CDN下载接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN" + ], + "summary": "CDN下载", + "parameters": [ + { + "description": "下载数据", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNDownloadRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNDownloadResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/initial": { + "post": { + "description": "CDN初始化接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN" + ], + "summary": "CDN初始化", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNInitialResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/card": { + "post": { + "description": "发送名片消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送名片消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendCardMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendCardMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/card_link": { + "post": { + "description": "发送卡片链接消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送卡片链接消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendCardLinkMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendCardLinkMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/file": { + "post": { + "description": "发送文件消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送文件消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendFileMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendFileMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/gif": { + "post": { + "description": "发送GIF消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送GIF消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendGifMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendGifMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/gif_new": { + "post": { + "description": "发送GIF消息(新)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送GIF消息(新)", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendGifMsgNewRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendGifMsgNewResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/image": { + "post": { + "description": "发送图片消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送图片消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendImageMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendImageMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/location": { + "post": { + "description": "发送位置消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送位置消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendLocationMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendLocationMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/mini_program": { + "post": { + "description": "发送小程序消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送小程序消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendMiniProgramMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendMiniProgramMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/revoke": { + "post": { + "description": "发送撤回消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送撤回消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendRevokeMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendRevokeMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/text": { + "post": { + "description": "发送文本消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送文本消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendTextMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendTextMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/video": { + "post": { + "description": "发送视频消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送视频消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendVideoMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendVideoMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/video_number": { + "post": { + "description": "发送视频号消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送视频号消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendVideoMomentMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendVideoMomentMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/xml": { + "post": { + "description": "发送xml消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送xml消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendXmlMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendXmlMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/upload": { + "post": { + "description": "CDN上传接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN" + ], + "summary": "CDN上传", + "parameters": [ + { + "description": "上传数据", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNUploadRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNUploadResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/workwx/download": { + "post": { + "description": "企业微信CDN下载接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN" + ], + "summary": "企业微信CDN下载", + "parameters": [ + { + "description": "下载数据", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.WorkWxCdnDownloadRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.WorkWxCdnDownloadResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/collect/list": { + "get": { + "description": "获取收藏列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "收藏" + ], + "summary": "获取收藏列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetCollectListResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/collect/send": { + "post": { + "description": "发送收藏(旧)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "收藏" + ], + "summary": "发送收藏(旧)", + "parameters": [ + { + "description": "收藏信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendCollectRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/collect/send/msgid": { + "post": { + "description": "收藏指定消息(旧)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "收藏" + ], + "summary": "收藏指定消息(旧)", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendCollectMsgByMsgIdRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/accept/wc_pay/auto": { + "post": { + "description": "自动接收好友转账接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "自动接收好友转账", + "parameters": [ + { + "description": "自动接收好友转账", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AutoAcceptWCPayRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/accept": { + "post": { + "description": "通过好友申请接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "通过好友申请", + "parameters": [ + { + "description": "通过好友申请信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AcceptFriendRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/add": { + "post": { + "description": "通过群聊加好友-发送好友申请接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "通过群聊加好友-发送好友申请", + "parameters": [ + { + "description": "添加好友信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AddFriendRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/add/auto": { + "post": { + "description": "自动同意好友申请接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "自动同意好友申请", + "parameters": [ + { + "description": "自动加好友", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AutoAcceptAddFriendRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/add/search": { + "post": { + "description": "添加搜索微信用户为好友接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "添加搜索微信用户为好友", + "parameters": [ + { + "description": "添加搜索微信用户为好友信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AddSearchWxUserRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/card/auto": { + "post": { + "description": "自动接收名片接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "自动接收名片", + "parameters": [ + { + "description": "自动接收名片", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AutoAcceptCardRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/check/{wxid}": { + "post": { + "description": "检测好友状态(发送无痕清粉消息)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "检测好友状态(发送无痕清粉消息)", + "parameters": [ + { + "type": "string", + "description": "微信ID", + "name": "wxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/delete/{wxid}": { + "post": { + "description": "删除好友接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "删除好友", + "parameters": [ + { + "type": "string", + "description": "微信ID", + "name": "wxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/list": { + "get": { + "description": "获取好友列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "获取好友列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetFriendListResponseDateItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/friend/protocol/brief/{wxid}": { + "get": { + "description": "获取好友简要信息(协议)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "获取好友简要信息(协议)", + "parameters": [ + { + "type": "string", + "description": "微信ID", + "name": "wxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetFriendBriefInfoByProtocolResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/friend/protocol/detail": { + "post": { + "description": "批量获取好友详细信息(协议)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "批量获取好友详细信息(协议)", + "parameters": [ + { + "description": "微信ID列表", + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetFriendDetailInfoByProtocolResponseDataContactListItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/friend/protocol/detail/{wxid}": { + "get": { + "description": "获取微信好友详细信息(协议)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "获取微信好友详细信息(协议)", + "parameters": [ + { + "type": "string", + "description": "微信ID", + "name": "wxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetFriendDetailInfoByProtocolResponseDataContactListItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/friend/remark": { + "post": { + "description": "编辑好友备注接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "编辑好友备注", + "parameters": [ + { + "description": "好友备注信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.EditFriendRemarkRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/search": { + "get": { + "description": "搜索微信用户接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "搜索微信用户", + "parameters": [ + { + "type": "string", + "description": "搜索字符串", + "name": "keyword", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.SearchWxUserResponseData" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/friend/{wxid}": { + "get": { + "description": "获取单个好友信息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "获取单个好友信息", + "parameters": [ + { + "type": "string", + "description": "微信ID", + "name": "wxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetFriendListResponseDateItem" + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/public/list": { + "get": { + "description": "获取公众号列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "获取公众号列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetPublicUserListResponseData" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/accept/auto": { + "post": { + "description": "自动接受群邀请接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "自动接受群邀请", + "parameters": [ + { + "description": "自动接受群邀请", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AutoAcceptRoomRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/create": { + "post": { + "description": "创建群聊接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "创建群聊", + "parameters": [ + { + "description": "微信ID列表", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CreateRoomRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/delete": { + "post": { + "description": "退出群聊接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "退出群聊", + "parameters": [ + { + "description": "推出的群聊", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.DelChatRoomRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/friend/add": { + "post": { + "description": "添加群成员为好友接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "添加群成员为好友", + "parameters": [ + { + "description": "添加好友信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AddFriendRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/list": { + "get": { + "description": "获取群列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "获取群列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetChatRoomListResponseDataItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/member/delete": { + "post": { + "description": "踢除群成员接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "踢除群成员", + "parameters": [ + { + "description": "成员信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.DelChatRoomMemberRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/member/invite": { + "post": { + "description": "邀请好友进群接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "邀请好友进群", + "parameters": [ + { + "description": "邀请信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.InviteToRoomRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.InviteToRoomResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/member/list/{roomWxid}": { + "get": { + "description": "获取群成员列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "获取群成员列表", + "parameters": [ + { + "type": "string", + "description": "微信群ID", + "name": "roomWxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetChatRoomMemberListResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/member/nickname/show": { + "post": { + "description": "是否显示群成员昵称接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "是否显示群成员昵称", + "parameters": [ + { + "description": "昵称信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.RoomShowNickNameRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/mine/nickname/modify": { + "post": { + "description": "修改我在本群的昵称接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "修改我在本群的昵称", + "parameters": [ + { + "description": "昵称信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.EditRoomMineNickNameRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/name/modify": { + "post": { + "description": "修改群聊名称接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "修改群聊名称", + "parameters": [ + { + "description": "成员信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.EditChatRoomMemberRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/notice/modify": { + "post": { + "description": "修改群公告接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "修改群公告", + "parameters": [ + { + "description": "公告信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.EditChatRoomNoticeRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/protocol/create": { + "post": { + "description": "创建群聊(协议)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "创建群聊(协议)", + "parameters": [ + { + "description": "微信ID列表", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CreateRoomRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CreateChatRoomByProtocolResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/protocol/detail/{roomWxid}": { + "get": { + "description": "获取微信群详细信息(协议)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "获取微信群详细信息(协议)", + "parameters": [ + { + "type": "string", + "description": "微信群ID", + "name": "roomWxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetFriendDetailInfoByProtocolResponseDataContactListItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/protocol/invite/list/{roomWxid}": { + "get": { + "description": "获取群成员邀请关系(协议)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "获取群成员邀请关系(协议)", + "parameters": [ + { + "type": "string", + "description": "微信群ID", + "name": "roomWxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetRoomMemberInviteListResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/to_contact/save": { + "post": { + "description": "保存到/移出通讯录接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "保存到/移出通讯录", + "parameters": [ + { + "description": "昵称信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SaveRoomSaveToContactRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/live/enter": { + "post": { + "description": "进入直播间接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "直播" + ], + "summary": "进入直播间", + "parameters": [ + { + "description": "直播间信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.LiveEnterRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/live/get/change/info": { + "post": { + "description": "获取直播间变动信息(人气,实时发言等))接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "直播" + ], + "summary": "获取直播间变动信息(人气,实时发言等))", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/live/get/online/user": { + "post": { + "description": "获取直播间在线用户接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "直播" + ], + "summary": "获取直播间在线用户", + "parameters": [ + { + "description": "直播间信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.LiveGetOnlineUserRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/live/get/shelf": { + "post": { + "description": "获取直播间货架接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "直播" + ], + "summary": "获取直播间货架", + "parameters": [ + { + "description": "直播间信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.LiveGetShelfRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/live/send/msg": { + "post": { + "description": "发送直播间消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "直播" + ], + "summary": "发送直播间消息", + "parameters": [ + { + "description": "直播间信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.LiveSendMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/login/exit": { + "post": { + "description": "退出微信接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "退出微信", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/login/logout": { + "post": { + "description": "注销微信登录接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "注销微信登录", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/login/qrcode/refresh": { + "post": { + "description": "刷新登录二维码接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "刷新登录二维码", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.RefreshLoginQrCodeResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/login/userinfo": { + "get": { + "description": "获取登录用户信息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "获取登录用户信息", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetLoginUserInfoResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/login/version": { + "get": { + "description": "获取微信版本号接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "获取微信版本", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/register_msg_http_callback": { + "post": { + "description": "注册消息回调接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "注册消息回调", + "parameters": [ + { + "description": "回调", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.HttpCallBackRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/card": { + "post": { + "description": "发送名片消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送名片消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendCardMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/file": { + "post": { + "description": "发送文件消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送文件消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendFileMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/forward": { + "post": { + "description": "转发任意类型消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "转发任意类型消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.ForwardMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/git": { + "post": { + "description": "发送gif消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送gif消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendGifMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/image": { + "post": { + "description": "发送图片消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送图片消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendImageMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/link": { + "post": { + "description": "发送链接消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送链接消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendLinkMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/text": { + "post": { + "description": "发送文本消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送文本消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendTextMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/video": { + "post": { + "description": "发送视频文件消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送视频文件消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendVideoMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/xml": { + "post": { + "description": "发送XML消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送XML消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendXmlMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/mini/program/code": { + "post": { + "description": "获取小程序授权Code接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "小程序" + ], + "summary": "获取小程序授权Code", + "parameters": [ + { + "description": "小程序信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.GetMiniProgramCodeRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetMiniProgramCodeResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/moment/comment": { + "post": { + "description": "评论朋友圈接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "朋友圈" + ], + "summary": "评论朋友圈", + "parameters": [ + { + "description": "评论信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CommentMomentRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CommentMomentResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/moment/friend/list": { + "post": { + "description": "获取好友朋友圈接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "朋友圈" + ], + "summary": "获取好友朋友圈", + "parameters": [ + { + "description": "好友朋友圈信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.GetFriendMomentRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetFriendMomentResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/moment/like": { + "post": { + "description": "点赞朋友圈接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "朋友圈" + ], + "summary": "点赞朋友圈", + "parameters": [ + { + "description": "点赞信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.LikeMomentRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.LikeMomentResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/moment/list": { + "post": { + "description": "获取朋友圈接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "朋友圈" + ], + "summary": "获取朋友圈", + "parameters": [ + { + "description": "朋友圈信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.GetMomentRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": {} + } + } + ] + } + } + } + } + }, + "/api/v1/moment/send": { + "post": { + "description": "发送朋友圈接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "朋友圈" + ], + "summary": "发送朋友圈", + "parameters": [ + { + "description": "发送信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendMomentRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.SendMomentResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/moment/upload/image": { + "post": { + "description": "上传朋友圈图片接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "朋友圈" + ], + "summary": "上传朋友圈图片", + "parameters": [ + { + "description": "上传图片信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.UploadMomentImageRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.UploadMomentImageResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/other/decrypt_img": { + "post": { + "description": "解密图片接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "其他" + ], + "summary": "解密图片", + "parameters": [ + { + "description": "解密图片请求", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.DecryptImgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/other/get_a8_key": { + "post": { + "description": "获取A8Key接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "其他" + ], + "summary": "获取A8Key", + "parameters": [ + { + "description": "A8Key请求", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.GetA8KeyRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetA8KeyResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/tag/add": { + "post": { + "description": "添加标签接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "标签" + ], + "summary": "添加标签", + "parameters": [ + { + "description": "标签信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AddTagRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.AddTagResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/tag/add/user": { + "post": { + "description": "为用户添加标签接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "标签" + ], + "summary": "为用户添加标签", + "parameters": [ + { + "description": "标签信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AddTagToUserRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.AddTagToUserResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/tag/delete": { + "post": { + "description": "删除标签接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "标签" + ], + "summary": "删除标签", + "parameters": [ + { + "description": "标签信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.DeleteTagRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.DeleteTagResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/tag/list": { + "get": { + "description": "获取标签列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "标签" + ], + "summary": "获取标签列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetTagListResponseDataItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/tag/list/user": { + "post": { + "description": "获取用户标签列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "标签" + ], + "summary": "获取用户标签列表", + "parameters": [ + { + "description": "标签信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.GetTagListByWxidRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetTagListByWxidResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/tag/modify": { + "post": { + "description": "修改标签接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "标签" + ], + "summary": "修改标签", + "parameters": [ + { + "description": "标签信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.ModifyTagRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/ui/chat/msg/not/notify": { + "post": { + "description": "消息免打扰接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "界面" + ], + "summary": "消息免打扰", + "parameters": [ + { + "description": "消息免打扰", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.ChatMsgNotNotifyRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/ui/chat/session/top": { + "post": { + "description": "置顶会话接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "界面" + ], + "summary": "置顶会话", + "parameters": [ + { + "description": "会话", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.ChatSessionTopRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/ui/clear/chat/record": { + "post": { + "description": "清空聊天记录接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "界面" + ], + "summary": "清空聊天记录", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/ui/switch/session": { + "post": { + "description": "切换会话接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "界面" + ], + "summary": "切换会话", + "parameters": [ + { + "description": "会话", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SwitchSessionRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/video_moment/create/virtual_nickname": { + "post": { + "description": "创建虚拟昵称接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "创建虚拟昵称", + "parameters": [ + { + "description": "昵称信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentCreateVirtualNickNameRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/delete/virtual_nickname": { + "post": { + "description": "删除虚拟昵称接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "删除虚拟昵称", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/video_moment/follow": { + "post": { + "description": "关注视频号接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "关注视频号", + "parameters": [ + { + "description": "关注信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentFollowRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.VideoMomentFollowResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/get/session_id": { + "post": { + "description": "获取私信sessionId接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "获取私信sessionId", + "parameters": [ + { + "description": "sessionId信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentGetSessionIdRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.VideoMomentGetSessionIdResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/init": { + "post": { + "description": "视频号初始化接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "视频号初始化", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.VideoMomentInitResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/like": { + "post": { + "description": "点赞视频接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "点赞视频", + "parameters": [ + { + "description": "点赞信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentLikeRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.VideoMomentLikeResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/search": { + "post": { + "description": "搜索视频号接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "搜索视频号", + "parameters": [ + { + "description": "搜索信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentSearchRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/send/msg": { + "post": { + "description": "发送私信接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "发送私信", + "parameters": [ + { + "description": "发送信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentSendMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.VideoMomentSendMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/switch/virtual_nickname": { + "post": { + "description": "切换虚拟昵称接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "切换虚拟昵称", + "parameters": [ + { + "description": "昵称信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentSwitchVirtualNickNameRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/user/home": { + "post": { + "description": "视频号用户主页接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "视频号用户主页", + "parameters": [ + { + "description": "用户信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentUserHomeRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/video/detail": { + "post": { + "description": "查看视频详细信息(包含评论)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "查看视频详细信息(包含评论)", + "parameters": [ + { + "description": "视频信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentVideoDetailRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/voice/to/text": { + "post": { + "description": "语音转文字接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "语音转文字" + ], + "summary": "语音转文字", + "parameters": [ + { + "description": "语音信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VoiceToTextRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.VoiceToTextResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/workwx/room/list": { + "get": { + "description": "获取企业微信群列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "企业微信" + ], + "summary": "获取企业微信群列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetWorkWxRoomListResponseDataItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/workwx/room/member/list": { + "post": { + "description": "获取企业微信群成员列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "企业微信" + ], + "summary": "获取企业微信群成员列表", + "parameters": [ + { + "description": "群信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.GetWorkWxChatRoomMemberRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetWorkWxChatRoomMemberResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/workwx/user/list": { + "get": { + "description": "获取企业微信用户列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "企业微信" + ], + "summary": "获取企业微信用户列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetWorkWxUserListResponseDataItem" + } + } + } + } + ] + } + } + } + } + } + }, + "definitions": { + "api.CommonStringResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "data": { + "type": "string" + }, + "msg": { + "type": "string" + } + } + }, + "core.AcceptFriendRequest": { + "type": "object", + "properties": { + "encryptusername": { + "type": "string" + }, + "scene": { + "type": "integer" + }, + "ticket": { + "type": "string" + } + } + }, + "core.AddFriendRequest": { + "type": "object", + "properties": { + "remark": { + "type": "string" + }, + "room_wxid": { + "type": "string" + }, + "source_type": { + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + }, + "core.AddSearchWxUserRequest": { + "type": "object", + "properties": { + "remark": { + "type": "string" + }, + "v1": { + "type": "string" + }, + "v2": { + "type": "string" + } + } + }, + "core.AddTagRequest": { + "type": "object", + "properties": { + "label_name": { + "type": "string" + } + } + }, + "core.AddTagResponseData": { + "type": "object", + "properties": { + "label_id": { + "type": "integer" + }, + "label_name": { + "type": "string" + } + } + }, + "core.AddTagToUserRequest": { + "type": "object", + "properties": { + "labelid_list": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.AddTagToUserResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + } + } + }, + "core.AutoAcceptAddFriendRequest": { + "type": "object", + "properties": { + "auto": { + "description": "1自动同意 0取消自动同意", + "type": "integer" + } + } + }, + "core.AutoAcceptCardRequest": { + "type": "object", + "properties": { + "auto": { + "description": "1自动接收 0取消自动接收", + "type": "integer" + } + } + }, + "core.AutoAcceptRoomRequest": { + "type": "object", + "properties": { + "auto": { + "description": "0不自动 1自动", + "type": "integer" + } + } + }, + "core.AutoAcceptWCPayRequest": { + "type": "object", + "properties": { + "auto": { + "description": "1自动接收 0取消自动接收", + "type": "integer" + } + } + }, + "core.CDNDownloadRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "file_type": { + "type": "integer" + }, + "save_path": { + "type": "string" + } + } + }, + "core.CDNDownloadResponseData": { + "type": "object", + "properties": { + "error_code": { + "type": "integer" + }, + "file_id": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "save_path": { + "type": "string" + } + } + }, + "core.CDNInitialResponseData": { + "type": "object", + "properties": { + "status": { + "type": "integer" + } + } + }, + "core.CDNSendCardLinkMsgRequest": { + "type": "object", + "properties": { + "desc": { + "type": "string" + }, + "image_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "to_wxid": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "core.CDNSendCardLinkMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "fromUserName": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "toUserName": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "core.CDNSendCardMsgRequest": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "to_wxid": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "core.CDNSendCardMsgResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "count": { + "type": "integer" + }, + "msgResponseList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "clientMsgId": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "msgId": { + "type": "integer" + }, + "newMsgId": { + "type": "string" + }, + "ret": { + "type": "integer" + }, + "serverTime": { + "type": "integer" + }, + "toUserName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "type": { + "type": "integer" + } + } + } + } + } + }, + "core.CDNSendFileMsgRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_name": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendFileMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "fromUserName": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "toUserName": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "core.CDNSendGifMsgNewRequest": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendGifMsgNewResponseData": { + "type": "object", + "properties": { + "md5": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendGifMsgRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendGifMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "fromUserName": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "toUserName": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "core.CDNSendImageMsgRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "crc32": { + "type": "integer" + }, + "file_id": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "thumb_file_size": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendImageMsgResponseData": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "crc32": { + "type": "integer" + }, + "file_id": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "thumb_file_size": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendLocationMsgRequest": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "title": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendLocationMsgResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "count": { + "type": "integer" + }, + "msgResponseList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "clientMsgId": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "msgId": { + "type": "integer" + }, + "newMsgId": { + "type": "string" + }, + "ret": { + "type": "integer" + }, + "serverTime": { + "type": "integer" + }, + "toUserName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "type": { + "type": "integer" + } + } + } + } + } + }, + "core.CDNSendMiniProgramMsgRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "appicon": { + "type": "string" + }, + "appid": { + "type": "string" + }, + "appname": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "page_path": { + "type": "string" + }, + "title": { + "type": "string" + }, + "to_wxid": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "core.CDNSendMiniProgramMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "fromUserName": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "toUserName": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "core.CDNSendRevokeMsgRequest": { + "type": "object", + "properties": { + "client_msgid": {}, + "create_time": { + "type": "integer" + }, + "new_msgid": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendRevokeMsgResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "introduction": { + "type": "string" + }, + "sysWording": { + "type": "string" + } + } + }, + "core.CDNSendTextMsgRequest": { + "type": "object", + "properties": { + "at_all": { + "description": "群消息时候,1是at所有人", + "type": "integer" + }, + "at_list": { + "description": "群消息时候使用", + "type": "array", + "items": { + "type": "string" + } + }, + "content": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendTextMsgResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "count": { + "type": "integer" + }, + "msgResponseList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "clientMsgId": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "msgId": { + "type": "integer" + }, + "newMsgId": { + "type": "string" + }, + "ret": { + "type": "integer" + }, + "serverTime": { + "type": "integer" + }, + "toUserName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "type": { + "type": "integer" + } + } + } + } + } + }, + "core.CDNSendVideoMomentMsgRequest": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "object_nonce_id": { + "type": "string" + }, + "thumb_url": { + "type": "string" + }, + "to_wxid": { + "type": "string" + }, + "url": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "core.CDNSendVideoMomentMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "fromUserName": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "toUserName": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "core.CDNSendVideoMsgRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "thumb_file_size": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendVideoMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "rawAeskey": { + "type": "string" + }, + "rawVideoNeedReupload": { + "type": "boolean" + }, + "thumbStartPos": { + "type": "integer" + }, + "videoNeedReupload": { + "type": "boolean" + }, + "videoStartPos": { + "type": "integer" + } + } + }, + "core.CDNSendXmlMsgRequest": { + "type": "object", + "properties": { + "content": { + "description": "\"\u003cappmsg appid=\\\"wx6618f1cfc6c132f8\\\" sdkver=\\\"0\\\"\u003e\u003ctitle\u003e1658934822522.gif\u003c... ...\u003c/weappinfo\u003e\u003cwebsearch /\u003e\u003c/appmsg\u003e\",", + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendXmlMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "fromUserName": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "toUserName": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "core.CDNUploadRequest": { + "type": "object", + "properties": { + "file_path": { + "type": "string" + }, + "file_type": { + "type": "integer" + } + } + }, + "core.CDNUploadResponseData": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "crc32": { + "type": "integer" + }, + "error_code": { + "type": "integer" + }, + "file_id": { + "type": "string" + }, + "file_key": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_path": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "thumb_file_md5": { + "type": "string" + }, + "thumb_file_size": { + "type": "integer" + } + } + }, + "core.ChatMsgNotNotifyRequest": { + "type": "object", + "properties": { + "status": { + "description": "1开启 0关闭", + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + }, + "core.ChatSessionTopRequest": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + }, + "core.CommentMomentRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "object_id": { + "type": "string" + } + } + }, + "core.CommentMomentResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "snsObject": { + "type": "object", + "properties": { + "blackList": { + "type": "array", + "items": {} + }, + "blackListCount": { + "type": "integer" + }, + "commentCount": { + "type": "integer" + }, + "commentUserList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentFlag": { + "type": "integer" + }, + "commentId": { + "type": "integer" + }, + "commentId2": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "isNotRichText": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "replyCommentId": { + "type": "integer" + }, + "replyCommentId2": { + "type": "string" + }, + "replyUsername": { + "type": "string" + }, + "source": { + "type": "integer" + }, + "type": { + "type": "integer" + }, + "username": { + "type": "string" + } + } + } + }, + "commentUserListCount": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "extFlag": { + "type": "integer" + }, + "groupCount": { + "type": "integer" + }, + "groupList": { + "type": "array", + "items": {} + }, + "groupUser": { + "type": "array", + "items": {} + }, + "groupUserCount": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "isNotRichText": { + "type": "integer" + }, + "likeCount": { + "type": "integer" + }, + "likeFlag": { + "type": "integer" + }, + "likeUserList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentFlag": { + "type": "integer" + }, + "commentId": { + "type": "integer" + }, + "commentId2": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "isNotRichText": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "replyCommentId": { + "type": "integer" + }, + "replyCommentId2": { + "type": "string" + }, + "replyUsername": { + "type": "string" + }, + "source": { + "type": "integer" + }, + "type": { + "type": "integer" + }, + "username": { + "type": "string" + } + } + } + }, + "likeUserListCount": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "noChange": { + "type": "integer" + }, + "objectDesc": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "objectOperations": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "preDownloadInfo": { + "type": "object", + "properties": { + "noPreDownloadRange": { + "type": "string" + }, + "preDownloadNetType": { + "type": "integer" + }, + "preDownloadPercent": { + "type": "integer" + } + } + }, + "referId": { + "type": "string" + }, + "referUsername": { + "type": "string" + }, + "snsRedEnvelops": { + "type": "object", + "properties": { + "reportId": { + "type": "integer" + }, + "reportKey": { + "type": "integer" + }, + "resourceId": { + "type": "integer" + }, + "rewardCount": { + "type": "integer" + }, + "rewardUserList": { + "type": "array", + "items": {} + } + } + }, + "username": { + "type": "string" + }, + "weAppInfo": { + "type": "object", + "properties": { + "appId": { + "type": "integer" + }, + "mapPoiId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "score": { + "type": "integer" + }, + "showType": { + "type": "integer" + }, + "userName": { + "type": "string" + } + } + }, + "withUserCount": { + "type": "integer" + }, + "withUserList": { + "type": "array", + "items": {} + }, + "withUserListCount": { + "type": "integer" + } + } + } + } + }, + "core.CreateChatRoomByProtocolResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "bigHeadImgUrl": { + "type": "string" + }, + "chatRoomName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "imgBuf": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "memberCount": { + "type": "integer" + }, + "memberList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "city": { + "type": "string" + }, + "contactType": { + "type": "integer" + }, + "country": { + "type": "string" + }, + "memberName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "memberStatus": { + "type": "integer" + }, + "nickName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "personalCard": { + "type": "integer" + }, + "province": { + "type": "string" + }, + "pyInitial": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "quanPin": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "remark": { + "type": "object" + }, + "remarkPYInitial": { + "type": "object" + }, + "remarkQuanPin": { + "type": "object" + }, + "sex": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "verifyFlag": { + "type": "integer" + }, + "verifyInfo": { + "type": "string" + } + } + } + }, + "pyInitial": { + "type": "object" + }, + "quanPin": { + "type": "object" + }, + "smallHeadImgUrl": { + "type": "string" + }, + "topic": { + "type": "object" + } + } + }, + "core.CreateRoomRequest": { + "type": "object", + "properties": { + "wxids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "core.DecryptImgRequest": { + "type": "object", + "properties": { + "dest_file": { + "type": "string" + }, + "src_file": { + "type": "string" + } + } + }, + "core.DelChatRoomMemberRequest": { + "type": "object", + "properties": { + "member_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.DelChatRoomRequest": { + "type": "object", + "properties": { + "room_wxid": { + "type": "string" + } + } + }, + "core.DeleteTagRequest": { + "type": "object", + "properties": { + "label_id": { + "type": "integer" + } + } + }, + "core.DeleteTagResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + } + } + }, + "core.EditChatRoomMemberRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.EditChatRoomNoticeRequest": { + "type": "object", + "properties": { + "notice": { + "type": "string" + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.EditFriendRemarkRequest": { + "type": "object", + "properties": { + "remark": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.EditRoomMineNickNameRequest": { + "type": "object", + "properties": { + "nickname": { + "type": "string" + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.ForwardMsgRequest": { + "type": "object", + "properties": { + "msgid": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.GetA8KeyRequest": { + "type": "object", + "properties": { + "scene": { + "type": "integer" + }, + "url": { + "type": "string" + } + } + }, + "core.GetA8KeyResponseData": { + "type": "object", + "properties": { + "a8Key": { + "type": "string" + }, + "actionCode": { + "type": "integer" + }, + "antispamTicket": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "content": { + "type": "string" + }, + "cookie": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "deepLinkBitSet": { + "type": "object", + "properties": { + "bitValue": { + "type": "string" + } + } + }, + "fullUrl": { + "type": "string" + }, + "generalControlBitSet": { + "type": "object", + "properties": { + "bitValue": { + "type": "integer" + } + } + }, + "headImg": { + "type": "string" + }, + "httpHeaderCount": { + "type": "integer" + }, + "httpHeaderList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + }, + "jsapicontrolBytes": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "jsapipermission": { + "type": "object", + "properties": { + "bitValue": { + "type": "integer" + }, + "bitValue2": { + "type": "integer" + }, + "bitValue3": { + "type": "integer" + }, + "bitValue4": { + "type": "integer" + } + } + }, + "menuWording": { + "type": "string" + }, + "mid": { + "type": "string" + }, + "scopeCount": { + "type": "integer" + }, + "scopeList": { + "type": "array", + "items": {} + }, + "shareUrl": { + "type": "string" + }, + "ssid": { + "type": "string" + }, + "title": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "wording": { + "type": "string" + } + } + }, + "core.GetChatRoomListResponseDataItem": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "is_manager": { + "type": "integer" + }, + "manager_wxid": { + "type": "string" + }, + "member_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "nickname": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "total_member": { + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + }, + "core.GetChatRoomMemberListResponseData": { + "type": "object", + "properties": { + "extend": { + "type": "string" + }, + "group_wxid": { + "type": "string" + }, + "member_list": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "province": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "sex": { + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + } + }, + "total": { + "type": "integer" + } + } + }, + "core.GetCollectListResponseData": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from_user": { + "type": "string" + }, + "local_id": { + "type": "integer" + }, + "room_member": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "integer" + }, + "update_time": { + "type": "integer" + }, + "xml": { + "type": "string" + } + } + } + }, + "status": { + "type": "integer" + } + } + }, + "core.GetFriendBriefInfoByProtocolResponseData": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "province": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "sex": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "small_avatar": { + "type": "string" + }, + "sns_pic": { + "type": "string" + }, + "source_type": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "v1": { + "type": "string" + }, + "v2": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.GetFriendDetailInfoByProtocolResponseDataContactListItem": { + "type": "object", + "properties": { + "addContactScene": { + "type": "integer" + }, + "additionalContactList": { + "type": "object", + "properties": { + "linkedinContactItem": { + "type": "object" + } + } + }, + "albumBgImgId": { + "type": "string" + }, + "albumFlag": { + "type": "integer" + }, + "albumStyle": { + "type": "integer" + }, + "alias": { + "type": "string" + }, + "bigHeadImgUrl": { + "type": "string" + }, + "bitMask": { + "type": "integer" + }, + "bitVal": { + "type": "integer" + }, + "cardImgUrl": { + "type": "string" + }, + "chatRoomData": { + "type": "string" + }, + "chatRoomNotify": { + "type": "integer" + }, + "chatRoomOwner": { + "type": "string" + }, + "chatroomInfoVersion": { + "type": "integer" + }, + "chatroomMaxCount": { + "type": "integer" + }, + "chatroomType": { + "type": "integer" + }, + "chatroomVersion": { + "type": "integer" + }, + "city": { + "type": "string" + }, + "contactType": { + "type": "integer" + }, + "country": { + "type": "string" + }, + "customizedInfo": { + "type": "object", + "properties": { + "brandFlag": { + "type": "integer" + }, + "brandIconURL": { + "type": "string" + }, + "brandInfo": { + "type": "string" + }, + "externalInfo": { + "type": "string" + } + } + }, + "deleteFlag": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "domainList": { + "type": "object" + }, + "encryptUserName": { + "type": "string" + }, + "extInfo": { + "type": "string" + }, + "hasWeiXinHdHeadImg": { + "type": "integer" + }, + "headImgMd5": { + "type": "string" + }, + "idcardNum": { + "type": "string" + }, + "imgBuf": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "imgFlag": { + "type": "integer" + }, + "labelIdList": { + "type": "string" + }, + "level": { + "type": "integer" + }, + "mobileFullHash": { + "type": "string" + }, + "mobileHash": { + "type": "string" + }, + "myBrandList": { + "type": "string" + }, + "newChatroomData": { + "type": "object", + "properties": { + "chatRoomMemberList": { + "type": "array", + "items": {} + }, + "infoMask": { + "type": "integer" + }, + "memberCount": { + "type": "integer" + } + } + }, + "nickName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "personalCard": { + "type": "integer" + }, + "phoneNumListInfo": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "phoneNumList": { + "type": "array", + "items": {} + } + } + }, + "province": { + "type": "string" + }, + "pyInitial": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "quanPin": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "realName": { + "type": "string" + }, + "remark": { + "type": "object" + }, + "remarkPYInitial": { + "type": "object" + }, + "remarkQuanPin": { + "type": "object" + }, + "roomInfoCount": { + "type": "integer" + }, + "roomInfoList": { + "type": "array", + "items": {} + }, + "sex": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "smallHeadImgUrl": { + "type": "string" + }, + "snsUserInfo": { + "type": "object", + "properties": { + "snsBgImgId": { + "type": "string" + }, + "snsBgObjectId": { + "type": "string" + }, + "snsFlag": { + "type": "integer" + }, + "snsFlagEx": { + "type": "integer" + } + } + }, + "source": { + "type": "integer" + }, + "userName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "verifyContent": { + "type": "string" + }, + "verifyFlag": { + "type": "integer" + }, + "verifyInfo": { + "type": "string" + }, + "weiDianInfo": { + "type": "string" + }, + "weibo": { + "type": "string" + }, + "weiboFlag": { + "type": "integer" + }, + "weiboNickname": { + "type": "string" + } + } + }, + "core.GetFriendListResponseDateItem": { + "type": "object", + "properties": { + "account": { + "description": "微信账号,友情的直接连线", + "type": "string" + }, + "avatar": { + "description": "头像的风景画,好友的形象代言", + "type": "string" + }, + "city": { + "description": "都市的温馨角落,好友的日常坐标", + "type": "string" + }, + "country": { + "description": "国界的另一端,好友的远方故事", + "type": "string" + }, + "labelid_list": { + "description": "标签的彩虹桥,连接不同朋友圈的密码", + "type": "string" + }, + "nickname": { + "description": "昵称的诗篇,好友的个性签名", + "type": "string" + }, + "province": { + "description": "省份的风土人情,好友的地域色彩", + "type": "string" + }, + "remark": { + "description": "备注的小秘密,只有你知道的代号", + "type": "string" + }, + "sex": { + "description": "性别的罗盘,1为蓝海,2为红颜", + "type": "integer" + }, + "wxid": { + "description": "微信ID,好友的唯一坐标", + "type": "string" + } + } + }, + "core.GetFriendMomentRequest": { + "type": "object", + "properties": { + "first_page_md5": { + "type": "string" + }, + "max_id": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "core.GetFriendMomentResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "continueId": { + "type": "string" + }, + "firstPageMd5": { + "type": "string" + }, + "limitedId": { + "type": "string" + }, + "newRequestTime": { + "type": "integer" + }, + "objectCount": { + "type": "integer" + }, + "objectCountForSameMd5": { + "type": "integer" + }, + "objectList": { + "type": "array", + "items": {} + }, + "objectTotalCount": { + "type": "integer" + }, + "retTips": { + "type": "string" + }, + "serverConfig": { + "type": "object", + "properties": { + "copyAndPasteWordLimit": { + "type": "integer" + }, + "postMentionLimit": { + "type": "integer" + } + } + }, + "snsUserInfo": { + "type": "object", + "properties": { + "snsBgImgId": { + "type": "string" + }, + "snsBgObjectId": { + "type": "string" + }, + "snsFlag": { + "type": "integer" + }, + "snsFlagEx": { + "type": "integer" + } + } + } + } + }, + "core.GetLoginUserInfoResponseData": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "pid": { + "type": "integer" + }, + "unread_msg_count": { + "type": "integer" + }, + "wx_user_dir": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.GetMiniProgramCodeRequest": { + "type": "object", + "properties": { + "appid": { + "type": "string" + } + } + }, + "core.GetMiniProgramCodeResponseData": { + "type": "object", + "properties": { + "appIconUrl": { + "type": "string" + }, + "appName": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "code": { + "type": "string" + }, + "jsApiBaseResponse": { + "type": "object", + "properties": { + "errcode": { + "type": "integer" + }, + "errmsg": { + "type": "string" + } + } + }, + "liftSpan": { + "type": "integer" + }, + "openId": { + "type": "string" + }, + "scopeList": { + "type": "array", + "items": {} + }, + "sessionKey": { + "type": "string" + }, + "sessionTicket": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "core.GetMomentRequest": { + "type": "object", + "properties": { + "max_id": { + "type": "string" + } + } + }, + "core.GetPublicUserListResponseData": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.GetRoomMemberInviteListResponseData": { + "type": "object", + "properties": { + "member_list": { + "type": "array", + "items": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "flag": { + "type": "integer" + }, + "invite_by": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + } + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.GetTagListByWxidRequest": { + "type": "object", + "properties": { + "wxid": { + "type": "string" + } + } + }, + "core.GetTagListByWxidResponseData": { + "type": "object", + "properties": { + "labelid_list": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.GetTagListResponseDataItem": { + "type": "object", + "properties": { + "label_id": { + "type": "string" + }, + "label_name": { + "type": "string" + } + } + }, + "core.GetWorkWxChatRoomMemberRequest": { + "type": "object", + "properties": { + "room_wxid": { + "type": "string" + } + } + }, + "core.GetWorkWxChatRoomMemberResponseData": { + "type": "object", + "properties": { + "member_list": { + "type": "array", + "items": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "sex": { + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + } + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.GetWorkWxRoomListResponseDataItem": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "manager_wxid": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "room_wxid": { + "type": "string" + }, + "total_member": { + "type": "integer" + } + } + }, + "core.GetWorkWxUserListResponseDataItem": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "sex": { + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + }, + "core.HttpCallBackRequest": { + "type": "object", + "properties": { + "timeout": { + "description": "默认5秒", + "type": "integer" + }, + "url": { + "type": "string" + } + } + }, + "core.InviteToRoomRequest": { + "type": "object", + "properties": { + "member_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.InviteToRoomResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "memberCount": { + "type": "integer" + }, + "memberList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "city": { + "type": "string" + }, + "contactType": { + "type": "integer" + }, + "country": { + "type": "string" + }, + "memberName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "memberStatus": { + "type": "integer" + }, + "nickName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "personalCard": { + "type": "integer" + }, + "province": { + "type": "string" + }, + "pyInitial": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "quanPin": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "remark": { + "type": "object" + }, + "remarkPYInitial": { + "type": "object" + }, + "remarkQuanPin": { + "type": "object" + }, + "sex": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "verifyFlag": { + "type": "integer" + }, + "verifyInfo": { + "type": "string" + } + } + } + } + } + }, + "core.LikeMomentRequest": { + "type": "object", + "properties": { + "object_id": { + "type": "string" + } + } + }, + "core.LikeMomentResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "snsObject": { + "type": "object", + "properties": { + "blackList": { + "type": "array", + "items": {} + }, + "blackListCount": { + "type": "integer" + }, + "commentCount": { + "type": "integer" + }, + "commentUserList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentFlag": { + "type": "integer" + }, + "commentId": { + "type": "integer" + }, + "commentId2": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "isNotRichText": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "replyCommentId": { + "type": "integer" + }, + "replyCommentId2": { + "type": "string" + }, + "replyUsername": { + "type": "string" + }, + "source": { + "type": "integer" + }, + "type": { + "type": "integer" + }, + "username": { + "type": "string" + } + } + } + }, + "commentUserListCount": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "extFlag": { + "type": "integer" + }, + "groupCount": { + "type": "integer" + }, + "groupList": { + "type": "array", + "items": {} + }, + "groupUser": { + "type": "array", + "items": {} + }, + "groupUserCount": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "isNotRichText": { + "type": "integer" + }, + "likeCount": { + "type": "integer" + }, + "likeFlag": { + "type": "integer" + }, + "likeUserList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentFlag": { + "type": "integer" + }, + "commentId": { + "type": "integer" + }, + "commentId2": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "isNotRichText": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "replyCommentId": { + "type": "integer" + }, + "replyCommentId2": { + "type": "string" + }, + "replyUsername": { + "type": "string" + }, + "source": { + "type": "integer" + }, + "type": { + "type": "integer" + }, + "username": { + "type": "string" + } + } + } + }, + "likeUserListCount": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "noChange": { + "type": "integer" + }, + "objectDesc": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "objectOperations": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "preDownloadInfo": { + "type": "object", + "properties": { + "noPreDownloadRange": { + "type": "string" + }, + "preDownloadNetType": { + "type": "integer" + }, + "preDownloadPercent": { + "type": "integer" + } + } + }, + "referId": { + "type": "string" + }, + "referUsername": { + "type": "string" + }, + "snsRedEnvelops": { + "type": "object", + "properties": { + "reportId": { + "type": "integer" + }, + "reportKey": { + "type": "integer" + }, + "resourceId": { + "type": "integer" + }, + "rewardCount": { + "type": "integer" + }, + "rewardUserList": { + "type": "array", + "items": {} + } + } + }, + "username": { + "type": "string" + }, + "weAppInfo": { + "type": "object", + "properties": { + "appId": { + "type": "integer" + }, + "mapPoiId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "score": { + "type": "integer" + }, + "showType": { + "type": "integer" + }, + "userName": { + "type": "string" + } + } + }, + "withUserCount": { + "type": "integer" + }, + "withUserList": { + "type": "array", + "items": {} + }, + "withUserListCount": { + "type": "integer" + } + } + } + } + }, + "core.LiveEnterRequest": { + "type": "object", + "properties": { + "live_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "object_nonce_id": { + "type": "string" + } + } + }, + "core.LiveGetOnlineUserRequest": { + "type": "object", + "properties": { + "last_buff": { + "type": "string" + }, + "live_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "object_nonce_id": { + "type": "string" + } + } + }, + "core.LiveGetShelfRequest": { + "type": "object", + "properties": { + "live_username": { + "type": "string" + }, + "request_id": { + "type": "string" + } + } + }, + "core.LiveSendMsgRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + } + } + }, + "core.ModifyTagRequest": { + "type": "object", + "properties": { + "label_id": { + "type": "integer" + }, + "label_name": { + "type": "string" + } + } + }, + "core.RefreshLoginQrCodeResponseData": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "pid": { + "type": "integer" + }, + "qrcode": { + "type": "string" + } + } + }, + "core.RoomShowNickNameRequest": { + "type": "object", + "properties": { + "room_wxid": { + "type": "string" + }, + "status": { + "description": "1显示 0隐藏", + "type": "integer" + } + } + }, + "core.SaveRoomSaveToContactRequest": { + "type": "object", + "properties": { + "room_wxid": { + "type": "string" + }, + "status": { + "description": "1保存 2移出", + "type": "integer" + } + } + }, + "core.SearchWxUserResponseData": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "keyword": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "provice": { + "type": "string" + }, + "search": { + "type": "string" + }, + "sex": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "small_avatar": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "v1": { + "type": "string" + }, + "v2": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.SendCardMsgRequest": { + "type": "object", + "properties": { + "card_wxid": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendCollectMsgByMsgIdRequest": { + "type": "object", + "properties": { + "msgid": { + "type": "string" + } + } + }, + "core.SendCollectRequest": { + "type": "object", + "properties": { + "local_id": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendFileMsgRequest": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendGifMsgRequest": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendImageMsgRequest": { + "type": "object", + "properties": { + "file": { + "description": "例如 \"C:\\\\a.jpg\"", + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendLinkMsgRequest": { + "type": "object", + "properties": { + "desc": { + "type": "string" + }, + "image_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "to_wxid": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "core.SendMomentRequest": { + "type": "object", + "properties": { + "object_desc": { + "type": "string" + } + } + }, + "core.SendMomentResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "snsObject": { + "type": "object", + "properties": { + "blackList": { + "type": "array", + "items": {} + }, + "blackListCount": { + "type": "integer" + }, + "commentCount": { + "type": "integer" + }, + "commentUserList": { + "type": "array", + "items": {} + }, + "commentUserListCount": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "extFlag": { + "type": "integer" + }, + "groupCount": { + "type": "integer" + }, + "groupList": { + "type": "array", + "items": {} + }, + "groupUser": { + "type": "array", + "items": {} + }, + "groupUserCount": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "isNotRichText": { + "type": "integer" + }, + "likeCount": { + "type": "integer" + }, + "likeFlag": { + "type": "integer" + }, + "likeUserList": { + "type": "array", + "items": {} + }, + "likeUserListCount": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "noChange": { + "type": "integer" + }, + "objectDesc": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "objectOperations": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "preDownloadInfo": { + "type": "object", + "properties": { + "noPreDownloadRange": { + "type": "string" + }, + "preDownloadNetType": { + "type": "integer" + }, + "preDownloadPercent": { + "type": "integer" + } + } + }, + "referId": { + "type": "string" + }, + "referUsername": { + "type": "string" + }, + "snsRedEnvelops": { + "type": "object", + "properties": { + "reportId": { + "type": "integer" + }, + "reportKey": { + "type": "integer" + }, + "resourceId": { + "type": "integer" + }, + "rewardCount": { + "type": "integer" + }, + "rewardUserList": { + "type": "array", + "items": {} + } + } + }, + "username": { + "type": "string" + }, + "weAppInfo": { + "type": "object", + "properties": { + "appId": { + "type": "integer" + }, + "mapPoiId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "score": { + "type": "integer" + }, + "showType": { + "type": "integer" + }, + "userName": { + "type": "string" + } + } + }, + "withUserCount": { + "type": "integer" + }, + "withUserList": { + "type": "array", + "items": {} + }, + "withUserListCount": { + "type": "integer" + } + } + }, + "spamTips": { + "type": "string" + } + } + }, + "core.SendTextMsgRequest": { + "type": "object", + "properties": { + "at_list": { + "description": "群消息时候使用 \"notify@all\" @所有人", + "type": "array", + "items": { + "type": "string" + } + }, + "content": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendVideoMsgRequest": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendXmlMsgRequest": { + "type": "object", + "properties": { + "to_wxid": { + "type": "string" + }, + "xml": { + "type": "string" + } + } + }, + "core.SwitchSessionRequest": { + "type": "object", + "properties": { + "to_wxid": { + "type": "string" + } + } + }, + "core.UploadMomentImageRequest": { + "type": "object", + "properties": { + "path": { + "type": "string" + } + } + }, + "core.UploadMomentImageResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "bufferUrl": { + "type": "object", + "properties": { + "type": { + "type": "integer" + }, + "url": { + "type": "string" + } + } + }, + "clientId": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "startPos": { + "type": "integer" + }, + "thumbUrlCount": { + "type": "integer" + }, + "thumbUrls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "integer" + }, + "url": { + "type": "string" + } + } + } + }, + "totalLen": { + "type": "integer" + }, + "type": { + "type": "integer" + } + } + }, + "core.VideoMomentCreateVirtualNickNameRequest": { + "type": "object", + "properties": { + "headimg_url": { + "type": "string" + }, + "nickname": { + "type": "string" + } + } + }, + "core.VideoMomentFollowRequest": { + "type": "object", + "properties": { + "username": { + "type": "string" + } + } + }, + "core.VideoMomentFollowResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "contact": { + "type": "object", + "properties": { + "archievementInfo": { + "type": "object" + }, + "authInfo": { + "type": "object", + "properties": { + "appName": { + "type": "string" + }, + "authGuarantor": { + "type": "object" + }, + "authIconType": { + "type": "integer" + }, + "authIconUrl": { + "type": "string" + }, + "authProfession": { + "type": "string" + }, + "authVerifyIdentity": { + "type": "integer" + }, + "customerType": { + "type": "integer" + }, + "detailLink": { + "type": "string" + }, + "realName": { + "type": "string" + }, + "verifyStatus": { + "type": "integer" + } + } + }, + "bindInfo": { + "type": "array", + "items": {} + }, + "coverEntranceFlag": { + "type": "integer" + }, + "coverImgUrl": { + "type": "string" + }, + "coverUrl": { + "type": "string" + }, + "extFlag": { + "type": "integer" + }, + "extInfo": { + "type": "object", + "properties": { + "birthDay": { + "type": "integer" + }, + "birthMonth": { + "type": "integer" + }, + "birthYear": { + "type": "integer" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "province": { + "type": "string" + }, + "sex": { + "type": "integer" + } + } + }, + "fansCount": { + "type": "integer" + }, + "feedCount": { + "type": "integer" + }, + "followFlag": { + "type": "integer" + }, + "followTime": { + "type": "integer" + }, + "foreignUserFlag": { + "type": "integer" + }, + "friendFollowCount": { + "type": "integer" + }, + "guestInfo": { + "type": "object" + }, + "headUrl": { + "type": "string" + }, + "liveCoverImgUrl": { + "type": "string" + }, + "liveInfo": { + "type": "object", + "properties": { + "anchorStatusFlag": { + "type": "string" + }, + "lotterySetting": { + "type": "object", + "properties": { + "attendType": { + "type": "integer" + }, + "settingFlag": { + "type": "string" + } + } + }, + "micSetting": { + "type": "object", + "properties": { + "settingFlag": { + "type": "string" + }, + "settingSwitchFlag": { + "type": "string" + } + } + }, + "switchFlag": { + "type": "integer" + } + } + }, + "liveNoticeInfo": { + "type": "object" + }, + "liveStatus": { + "type": "integer" + }, + "loggingoutWording": { + "type": "string" + }, + "menu": { + "type": "array", + "items": {} + }, + "msgInfo": { + "type": "object" + }, + "nickname": { + "type": "string" + }, + "oneTimeFlag": { + "type": "integer" + }, + "originalEntranceFlag": { + "type": "integer" + }, + "originalFlag": { + "type": "integer" + }, + "originalInfo": { + "type": "object" + }, + "seq": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "spamStatus": { + "type": "integer" + }, + "userFlag": { + "type": "integer" + }, + "userMode": { + "type": "integer" + }, + "username": { + "type": "string" + }, + "vestNickname": { + "type": "string" + }, + "wxUsernameV5": { + "type": "string" + } + } + }, + "liveStatusFlag": { + "type": "integer" + } + } + }, + "core.VideoMomentGetSessionIdRequest": { + "type": "object", + "properties": { + "roleType": { + "type": "integer" + }, + "to_username": { + "type": "string" + } + } + }, + "core.VideoMomentGetSessionIdResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "enableAction": { + "type": "integer" + }, + "sessionId": { + "type": "string" + }, + "sessionInfo": { + "type": "object", + "properties": { + "enableAction": { + "type": "integer" + }, + "msgExtInfo": { + "type": "string" + }, + "rejectMsg": { + "type": "integer" + }, + "sessionId": { + "type": "string" + }, + "toUsername": { + "type": "string" + } + } + }, + "toUsername": { + "type": "string" + } + } + }, + "core.VideoMomentInitResponseData": { + "type": "object", + "properties": { + "aliasInfo": { + "type": "array", + "items": { + "type": "object", + "properties": { + "aliasMsgName": { + "type": "string" + }, + "aliasVersion": { + "type": "integer" + }, + "headImgUrl": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "roleType": { + "type": "integer" + } + } + } + }, + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "cmdlist": { + "type": "array", + "items": {} + }, + "continueFlag": { + "type": "integer" + }, + "currentAliasRoleType": { + "type": "integer" + }, + "finderUsernameList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "finderUsernameList": { + "type": "string" + } + } + } + }, + "keybuf": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "myacct": { + "type": "array", + "items": { + "type": "object", + "properties": { + "archievementInfo": { + "type": "object" + }, + "authInfo": { + "type": "object" + }, + "bindInfo": { + "type": "array", + "items": {} + }, + "coverEntranceFlag": { + "type": "integer" + }, + "coverImgUrl": { + "type": "string" + }, + "coverUrl": { + "type": "string" + }, + "extFlag": { + "type": "integer" + }, + "extInfo": { + "type": "object", + "properties": { + "birthDay": { + "type": "integer" + }, + "birthMonth": { + "type": "integer" + }, + "birthYear": { + "type": "integer" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "province": { + "type": "string" + }, + "sex": { + "type": "integer" + } + } + }, + "fansCount": { + "type": "integer" + }, + "feedCount": { + "type": "integer" + }, + "followFlag": { + "type": "integer" + }, + "followTime": { + "type": "integer" + }, + "foreignUserFlag": { + "type": "integer" + }, + "friendFollowCount": { + "type": "integer" + }, + "guestInfo": { + "type": "object" + }, + "headUrl": { + "type": "string" + }, + "liveCoverImgUrl": { + "type": "string" + }, + "liveInfo": { + "type": "object", + "properties": { + "anchorStatusFlag": { + "type": "string" + }, + "lotterySetting": { + "type": "object" + }, + "micSetting": { + "type": "object", + "properties": { + "settingFlag": { + "type": "string" + }, + "settingSwitchFlag": { + "type": "string" + } + } + }, + "switchFlag": { + "type": "integer" + } + } + }, + "liveNoticeInfo": { + "type": "object" + }, + "liveStatus": { + "type": "integer" + }, + "loggingoutWording": { + "type": "string" + }, + "menu": { + "type": "array", + "items": {} + }, + "msgInfo": { + "type": "object" + }, + "nickname": { + "type": "string" + }, + "oneTimeFlag": { + "type": "integer" + }, + "originalEntranceFlag": { + "type": "integer" + }, + "originalFlag": { + "type": "integer" + }, + "originalInfo": { + "type": "object", + "properties": { + "postNeedCheckFlag": { + "type": "integer" + }, + "punishYearFlag": { + "type": "integer" + }, + "restApplyOriginalCount": { + "type": "integer" + }, + "restPunishDay": { + "type": "integer" + }, + "restRepostCount": { + "type": "integer" + } + } + }, + "seq": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "spamStatus": { + "type": "integer" + }, + "userFlag": { + "type": "integer" + }, + "userMode": { + "type": "integer" + }, + "username": { + "type": "string" + }, + "vestNickname": { + "type": "string" + }, + "wxUsernameV5": { + "type": "string" + } + } + } + }, + "nextAliasModAvailableTime": { + "type": "string" + }, + "retryDelaySecond": { + "type": "integer" + }, + "ringtoneConfig": { + "type": "object" + }, + "slideUpGuideConfig": { + "type": "array", + "items": {} + }, + "tabInfos": { + "type": "array", + "items": { + "type": "object", + "properties": { + "displayTabType": { + "type": "integer" + }, + "tabName": { + "type": "string" + } + } + } + }, + "teenmodeSetting": { + "type": "object" + }, + "teenmodeTipsConfig": { + "type": "object" + }, + "userNotCreatedFlag": { + "type": "integer" + }, + "userver": { + "type": "integer" + }, + "userverForH5": { + "type": "integer" + }, + "wxPersonalizedSetting": { + "type": "object" + }, + "wxUserAttr": { + "type": "object", + "properties": { + "notAvailableFlag": { + "type": "integer" + }, + "wording": { + "type": "string" + } + } + }, + "wxUsernameForH5": { + "type": "string" + } + } + }, + "core.VideoMomentLikeRequest": { + "type": "object", + "properties": { + "object_id": { + "type": "string" + }, + "object_nonce_id": { + "type": "string" + } + } + }, + "core.VideoMomentLikeResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "likeid": { + "type": "integer" + } + } + }, + "core.VideoMomentSearchRequest": { + "type": "object", + "properties": { + "last_buff": { + "type": "string" + }, + "query": { + "type": "string" + }, + "scene": { + "type": "integer" + } + } + }, + "core.VideoMomentSendMsgRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "to_username": { + "type": "string" + } + } + }, + "core.VideoMomentSendMsgResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "newmsgid": { + "type": "integer" + } + } + }, + "core.VideoMomentSwitchVirtualNickNameRequest": { + "type": "object", + "properties": { + "role_type": { + "type": "integer" + } + } + }, + "core.VideoMomentUserHomeRequest": { + "type": "object", + "properties": { + "last_buff": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "core.VideoMomentVideoDetailRequest": { + "type": "object", + "properties": { + "last_buff": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "object_nonce_id": { + "type": "string" + } + } + }, + "core.VoiceToTextRequest": { + "type": "object", + "properties": { + "msgid": { + "type": "string" + } + } + }, + "core.VoiceToTextResponseData": { + "type": "object", + "properties": { + "from_wxid": { + "type": "string" + }, + "msgid": { + "type": "string" + }, + "room_wxid": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "text": { + "type": "string" + }, + "to_wxid": { + "type": "string" + }, + "wx_type": { + "type": "integer" + } + } + }, + "core.WorkWxCdnDownloadRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "auth_key": { + "type": "string" + }, + "save_path": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "core.WorkWxCdnDownloadResponseData": { + "type": "object", + "properties": { + "error_code": { + "type": "integer" + }, + "save_path": { + "type": "string" + } + } + } + } +}` + +// SwaggerInfo holds exported Swagger Info so clients can modify it +var SwaggerInfo = &swag.Spec{ + Version: "3.9.10.19", + Host: "", + BasePath: "", + Schemes: []string{}, + Title: "WxHelper API", + Description: "微信hook接口文档", + InfoInstanceName: "swagger", + SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", +} + +func init() { + swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) +} diff --git a/docs/swagger.json b/docs/swagger.json new file mode 100644 index 0000000..7e00f18 --- /dev/null +++ b/docs/swagger.json @@ -0,0 +1,8557 @@ +{ + "swagger": "2.0", + "info": { + "description": "微信hook接口文档", + "title": "WxHelper API", + "contact": {}, + "version": "3.9.10.19" + }, + "paths": { + "/api/v1/cdn/download": { + "post": { + "description": "CDN下载接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN" + ], + "summary": "CDN下载", + "parameters": [ + { + "description": "下载数据", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNDownloadRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNDownloadResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/initial": { + "post": { + "description": "CDN初始化接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN" + ], + "summary": "CDN初始化", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNInitialResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/card": { + "post": { + "description": "发送名片消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送名片消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendCardMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendCardMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/card_link": { + "post": { + "description": "发送卡片链接消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送卡片链接消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendCardLinkMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendCardLinkMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/file": { + "post": { + "description": "发送文件消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送文件消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendFileMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendFileMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/gif": { + "post": { + "description": "发送GIF消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送GIF消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendGifMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendGifMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/gif_new": { + "post": { + "description": "发送GIF消息(新)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送GIF消息(新)", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendGifMsgNewRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendGifMsgNewResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/image": { + "post": { + "description": "发送图片消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送图片消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendImageMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendImageMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/location": { + "post": { + "description": "发送位置消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送位置消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendLocationMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendLocationMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/mini_program": { + "post": { + "description": "发送小程序消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送小程序消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendMiniProgramMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendMiniProgramMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/revoke": { + "post": { + "description": "发送撤回消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送撤回消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendRevokeMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendRevokeMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/text": { + "post": { + "description": "发送文本消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送文本消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendTextMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendTextMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/video": { + "post": { + "description": "发送视频消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送视频消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendVideoMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendVideoMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/video_number": { + "post": { + "description": "发送视频号消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送视频号消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendVideoMomentMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendVideoMomentMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/send/xml": { + "post": { + "description": "发送xml消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN发送消息" + ], + "summary": "发送xml消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNSendXmlMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNSendXmlMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/upload": { + "post": { + "description": "CDN上传接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN" + ], + "summary": "CDN上传", + "parameters": [ + { + "description": "上传数据", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CDNUploadRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CDNUploadResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/cdn/workwx/download": { + "post": { + "description": "企业微信CDN下载接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "CDN" + ], + "summary": "企业微信CDN下载", + "parameters": [ + { + "description": "下载数据", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.WorkWxCdnDownloadRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.WorkWxCdnDownloadResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/collect/list": { + "get": { + "description": "获取收藏列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "收藏" + ], + "summary": "获取收藏列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetCollectListResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/collect/send": { + "post": { + "description": "发送收藏(旧)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "收藏" + ], + "summary": "发送收藏(旧)", + "parameters": [ + { + "description": "收藏信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendCollectRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/collect/send/msgid": { + "post": { + "description": "收藏指定消息(旧)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "收藏" + ], + "summary": "收藏指定消息(旧)", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendCollectMsgByMsgIdRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/accept/wc_pay/auto": { + "post": { + "description": "自动接收好友转账接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "自动接收好友转账", + "parameters": [ + { + "description": "自动接收好友转账", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AutoAcceptWCPayRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/accept": { + "post": { + "description": "通过好友申请接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "通过好友申请", + "parameters": [ + { + "description": "通过好友申请信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AcceptFriendRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/add": { + "post": { + "description": "通过群聊加好友-发送好友申请接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "通过群聊加好友-发送好友申请", + "parameters": [ + { + "description": "添加好友信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AddFriendRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/add/auto": { + "post": { + "description": "自动同意好友申请接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "自动同意好友申请", + "parameters": [ + { + "description": "自动加好友", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AutoAcceptAddFriendRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/add/search": { + "post": { + "description": "添加搜索微信用户为好友接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "添加搜索微信用户为好友", + "parameters": [ + { + "description": "添加搜索微信用户为好友信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AddSearchWxUserRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/card/auto": { + "post": { + "description": "自动接收名片接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "自动接收名片", + "parameters": [ + { + "description": "自动接收名片", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AutoAcceptCardRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/check/{wxid}": { + "post": { + "description": "检测好友状态(发送无痕清粉消息)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "检测好友状态(发送无痕清粉消息)", + "parameters": [ + { + "type": "string", + "description": "微信ID", + "name": "wxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/delete/{wxid}": { + "post": { + "description": "删除好友接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "删除好友", + "parameters": [ + { + "type": "string", + "description": "微信ID", + "name": "wxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/list": { + "get": { + "description": "获取好友列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "获取好友列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetFriendListResponseDateItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/friend/protocol/brief/{wxid}": { + "get": { + "description": "获取好友简要信息(协议)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "获取好友简要信息(协议)", + "parameters": [ + { + "type": "string", + "description": "微信ID", + "name": "wxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetFriendBriefInfoByProtocolResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/friend/protocol/detail": { + "post": { + "description": "批量获取好友详细信息(协议)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "批量获取好友详细信息(协议)", + "parameters": [ + { + "description": "微信ID列表", + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetFriendDetailInfoByProtocolResponseDataContactListItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/friend/protocol/detail/{wxid}": { + "get": { + "description": "获取微信好友详细信息(协议)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "获取微信好友详细信息(协议)", + "parameters": [ + { + "type": "string", + "description": "微信ID", + "name": "wxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetFriendDetailInfoByProtocolResponseDataContactListItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/friend/remark": { + "post": { + "description": "编辑好友备注接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "编辑好友备注", + "parameters": [ + { + "description": "好友备注信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.EditFriendRemarkRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/friend/search": { + "get": { + "description": "搜索微信用户接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "搜索微信用户", + "parameters": [ + { + "type": "string", + "description": "搜索字符串", + "name": "keyword", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.SearchWxUserResponseData" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/friend/{wxid}": { + "get": { + "description": "获取单个好友信息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "获取单个好友信息", + "parameters": [ + { + "type": "string", + "description": "微信ID", + "name": "wxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetFriendListResponseDateItem" + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/public/list": { + "get": { + "description": "获取公众号列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "联系人" + ], + "summary": "获取公众号列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetPublicUserListResponseData" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/accept/auto": { + "post": { + "description": "自动接受群邀请接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "自动接受群邀请", + "parameters": [ + { + "description": "自动接受群邀请", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AutoAcceptRoomRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/create": { + "post": { + "description": "创建群聊接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "创建群聊", + "parameters": [ + { + "description": "微信ID列表", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CreateRoomRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/delete": { + "post": { + "description": "退出群聊接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "退出群聊", + "parameters": [ + { + "description": "推出的群聊", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.DelChatRoomRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/friend/add": { + "post": { + "description": "添加群成员为好友接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "添加群成员为好友", + "parameters": [ + { + "description": "添加好友信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AddFriendRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/list": { + "get": { + "description": "获取群列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "获取群列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetChatRoomListResponseDataItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/member/delete": { + "post": { + "description": "踢除群成员接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "踢除群成员", + "parameters": [ + { + "description": "成员信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.DelChatRoomMemberRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/member/invite": { + "post": { + "description": "邀请好友进群接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "邀请好友进群", + "parameters": [ + { + "description": "邀请信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.InviteToRoomRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.InviteToRoomResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/member/list/{roomWxid}": { + "get": { + "description": "获取群成员列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "获取群成员列表", + "parameters": [ + { + "type": "string", + "description": "微信群ID", + "name": "roomWxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetChatRoomMemberListResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/member/nickname/show": { + "post": { + "description": "是否显示群成员昵称接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "是否显示群成员昵称", + "parameters": [ + { + "description": "昵称信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.RoomShowNickNameRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/mine/nickname/modify": { + "post": { + "description": "修改我在本群的昵称接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "修改我在本群的昵称", + "parameters": [ + { + "description": "昵称信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.EditRoomMineNickNameRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/name/modify": { + "post": { + "description": "修改群聊名称接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "修改群聊名称", + "parameters": [ + { + "description": "成员信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.EditChatRoomMemberRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/notice/modify": { + "post": { + "description": "修改群公告接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "修改群公告", + "parameters": [ + { + "description": "公告信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.EditChatRoomNoticeRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/contact/room/protocol/create": { + "post": { + "description": "创建群聊(协议)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "创建群聊(协议)", + "parameters": [ + { + "description": "微信ID列表", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CreateRoomRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CreateChatRoomByProtocolResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/protocol/detail/{roomWxid}": { + "get": { + "description": "获取微信群详细信息(协议)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "获取微信群详细信息(协议)", + "parameters": [ + { + "type": "string", + "description": "微信群ID", + "name": "roomWxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetFriendDetailInfoByProtocolResponseDataContactListItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/protocol/invite/list/{roomWxid}": { + "get": { + "description": "获取群成员邀请关系(协议)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "获取群成员邀请关系(协议)", + "parameters": [ + { + "type": "string", + "description": "微信群ID", + "name": "roomWxid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetRoomMemberInviteListResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/contact/room/to_contact/save": { + "post": { + "description": "保存到/移出通讯录接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "群管理" + ], + "summary": "保存到/移出通讯录", + "parameters": [ + { + "description": "昵称信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SaveRoomSaveToContactRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/live/enter": { + "post": { + "description": "进入直播间接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "直播" + ], + "summary": "进入直播间", + "parameters": [ + { + "description": "直播间信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.LiveEnterRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/live/get/change/info": { + "post": { + "description": "获取直播间变动信息(人气,实时发言等))接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "直播" + ], + "summary": "获取直播间变动信息(人气,实时发言等))", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/live/get/online/user": { + "post": { + "description": "获取直播间在线用户接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "直播" + ], + "summary": "获取直播间在线用户", + "parameters": [ + { + "description": "直播间信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.LiveGetOnlineUserRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/live/get/shelf": { + "post": { + "description": "获取直播间货架接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "直播" + ], + "summary": "获取直播间货架", + "parameters": [ + { + "description": "直播间信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.LiveGetShelfRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/live/send/msg": { + "post": { + "description": "发送直播间消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "直播" + ], + "summary": "发送直播间消息", + "parameters": [ + { + "description": "直播间信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.LiveSendMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/login/exit": { + "post": { + "description": "退出微信接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "退出微信", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/login/logout": { + "post": { + "description": "注销微信登录接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "注销微信登录", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/login/qrcode/refresh": { + "post": { + "description": "刷新登录二维码接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "刷新登录二维码", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.RefreshLoginQrCodeResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/login/userinfo": { + "get": { + "description": "获取登录用户信息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "获取登录用户信息", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetLoginUserInfoResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/login/version": { + "get": { + "description": "获取微信版本号接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "获取微信版本", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/register_msg_http_callback": { + "post": { + "description": "注册消息回调接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "注册消息回调", + "parameters": [ + { + "description": "回调", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.HttpCallBackRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/card": { + "post": { + "description": "发送名片消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送名片消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendCardMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/file": { + "post": { + "description": "发送文件消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送文件消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendFileMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/forward": { + "post": { + "description": "转发任意类型消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "转发任意类型消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.ForwardMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/git": { + "post": { + "description": "发送gif消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送gif消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendGifMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/image": { + "post": { + "description": "发送图片消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送图片消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendImageMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/link": { + "post": { + "description": "发送链接消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送链接消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendLinkMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/text": { + "post": { + "description": "发送文本消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送文本消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendTextMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/video": { + "post": { + "description": "发送视频文件消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送视频文件消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendVideoMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/message/send/xml": { + "post": { + "description": "发送XML消息接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "发送消息" + ], + "summary": "发送XML消息", + "parameters": [ + { + "description": "消息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendXmlMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/mini/program/code": { + "post": { + "description": "获取小程序授权Code接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "小程序" + ], + "summary": "获取小程序授权Code", + "parameters": [ + { + "description": "小程序信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.GetMiniProgramCodeRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetMiniProgramCodeResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/moment/comment": { + "post": { + "description": "评论朋友圈接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "朋友圈" + ], + "summary": "评论朋友圈", + "parameters": [ + { + "description": "评论信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.CommentMomentRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.CommentMomentResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/moment/friend/list": { + "post": { + "description": "获取好友朋友圈接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "朋友圈" + ], + "summary": "获取好友朋友圈", + "parameters": [ + { + "description": "好友朋友圈信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.GetFriendMomentRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetFriendMomentResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/moment/like": { + "post": { + "description": "点赞朋友圈接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "朋友圈" + ], + "summary": "点赞朋友圈", + "parameters": [ + { + "description": "点赞信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.LikeMomentRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.LikeMomentResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/moment/list": { + "post": { + "description": "获取朋友圈接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "朋友圈" + ], + "summary": "获取朋友圈", + "parameters": [ + { + "description": "朋友圈信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.GetMomentRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": {} + } + } + ] + } + } + } + } + }, + "/api/v1/moment/send": { + "post": { + "description": "发送朋友圈接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "朋友圈" + ], + "summary": "发送朋友圈", + "parameters": [ + { + "description": "发送信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SendMomentRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.SendMomentResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/moment/upload/image": { + "post": { + "description": "上传朋友圈图片接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "朋友圈" + ], + "summary": "上传朋友圈图片", + "parameters": [ + { + "description": "上传图片信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.UploadMomentImageRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.UploadMomentImageResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/other/decrypt_img": { + "post": { + "description": "解密图片接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "其他" + ], + "summary": "解密图片", + "parameters": [ + { + "description": "解密图片请求", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.DecryptImgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/other/get_a8_key": { + "post": { + "description": "获取A8Key接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "其他" + ], + "summary": "获取A8Key", + "parameters": [ + { + "description": "A8Key请求", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.GetA8KeyRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetA8KeyResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/tag/add": { + "post": { + "description": "添加标签接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "标签" + ], + "summary": "添加标签", + "parameters": [ + { + "description": "标签信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AddTagRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.AddTagResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/tag/add/user": { + "post": { + "description": "为用户添加标签接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "标签" + ], + "summary": "为用户添加标签", + "parameters": [ + { + "description": "标签信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.AddTagToUserRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.AddTagToUserResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/tag/delete": { + "post": { + "description": "删除标签接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "标签" + ], + "summary": "删除标签", + "parameters": [ + { + "description": "标签信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.DeleteTagRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.DeleteTagResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/tag/list": { + "get": { + "description": "获取标签列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "标签" + ], + "summary": "获取标签列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetTagListResponseDataItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/tag/list/user": { + "post": { + "description": "获取用户标签列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "标签" + ], + "summary": "获取用户标签列表", + "parameters": [ + { + "description": "标签信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.GetTagListByWxidRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetTagListByWxidResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/tag/modify": { + "post": { + "description": "修改标签接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "标签" + ], + "summary": "修改标签", + "parameters": [ + { + "description": "标签信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.ModifyTagRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/ui/chat/msg/not/notify": { + "post": { + "description": "消息免打扰接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "界面" + ], + "summary": "消息免打扰", + "parameters": [ + { + "description": "消息免打扰", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.ChatMsgNotNotifyRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/ui/chat/session/top": { + "post": { + "description": "置顶会话接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "界面" + ], + "summary": "置顶会话", + "parameters": [ + { + "description": "会话", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.ChatSessionTopRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/ui/clear/chat/record": { + "post": { + "description": "清空聊天记录接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "界面" + ], + "summary": "清空聊天记录", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/ui/switch/session": { + "post": { + "description": "切换会话接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "界面" + ], + "summary": "切换会话", + "parameters": [ + { + "description": "会话", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.SwitchSessionRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/video_moment/create/virtual_nickname": { + "post": { + "description": "创建虚拟昵称接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "创建虚拟昵称", + "parameters": [ + { + "description": "昵称信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentCreateVirtualNickNameRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/delete/virtual_nickname": { + "post": { + "description": "删除虚拟昵称接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "删除虚拟昵称", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "$ref": "#/definitions/api.CommonStringResponse" + } + } + } + } + }, + "/api/v1/video_moment/follow": { + "post": { + "description": "关注视频号接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "关注视频号", + "parameters": [ + { + "description": "关注信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentFollowRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.VideoMomentFollowResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/get/session_id": { + "post": { + "description": "获取私信sessionId接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "获取私信sessionId", + "parameters": [ + { + "description": "sessionId信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentGetSessionIdRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.VideoMomentGetSessionIdResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/init": { + "post": { + "description": "视频号初始化接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "视频号初始化", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.VideoMomentInitResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/like": { + "post": { + "description": "点赞视频接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "点赞视频", + "parameters": [ + { + "description": "点赞信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentLikeRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.VideoMomentLikeResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/search": { + "post": { + "description": "搜索视频号接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "搜索视频号", + "parameters": [ + { + "description": "搜索信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentSearchRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/send/msg": { + "post": { + "description": "发送私信接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "发送私信", + "parameters": [ + { + "description": "发送信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentSendMsgRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.VideoMomentSendMsgResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/switch/virtual_nickname": { + "post": { + "description": "切换虚拟昵称接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "切换虚拟昵称", + "parameters": [ + { + "description": "昵称信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentSwitchVirtualNickNameRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/user/home": { + "post": { + "description": "视频号用户主页接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "视频号用户主页", + "parameters": [ + { + "description": "用户信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentUserHomeRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/video_moment/video/detail": { + "post": { + "description": "查看视频详细信息(包含评论)接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "视频号" + ], + "summary": "查看视频详细信息(包含评论)", + "parameters": [ + { + "description": "视频信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VideoMomentVideoDetailRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "object" + } + } + } + ] + } + } + } + } + }, + "/api/v1/voice/to/text": { + "post": { + "description": "语音转文字接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "语音转文字" + ], + "summary": "语音转文字", + "parameters": [ + { + "description": "语音信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.VoiceToTextRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.VoiceToTextResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/workwx/room/list": { + "get": { + "description": "获取企业微信群列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "企业微信" + ], + "summary": "获取企业微信群列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetWorkWxRoomListResponseDataItem" + } + } + } + } + ] + } + } + } + } + }, + "/api/v1/workwx/room/member/list": { + "post": { + "description": "获取企业微信群成员列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "企业微信" + ], + "summary": "获取企业微信群成员列表", + "parameters": [ + { + "description": "群信息", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/core.GetWorkWxChatRoomMemberRequest" + } + } + ], + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "$ref": "#/definitions/core.GetWorkWxChatRoomMemberResponseData" + } + } + } + ] + } + } + } + } + }, + "/api/v1/workwx/user/list": { + "get": { + "description": "获取企业微信用户列表接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "企业微信" + ], + "summary": "获取企业微信用户列表", + "responses": { + "200": { + "description": "{\\\"code\\\":0, ....}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/api.CommonStringResponse" + }, + { + "type": "object", + "properties": { + "Data": { + "type": "array", + "items": { + "$ref": "#/definitions/core.GetWorkWxUserListResponseDataItem" + } + } + } + } + ] + } + } + } + } + } + }, + "definitions": { + "api.CommonStringResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "data": { + "type": "string" + }, + "msg": { + "type": "string" + } + } + }, + "core.AcceptFriendRequest": { + "type": "object", + "properties": { + "encryptusername": { + "type": "string" + }, + "scene": { + "type": "integer" + }, + "ticket": { + "type": "string" + } + } + }, + "core.AddFriendRequest": { + "type": "object", + "properties": { + "remark": { + "type": "string" + }, + "room_wxid": { + "type": "string" + }, + "source_type": { + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + }, + "core.AddSearchWxUserRequest": { + "type": "object", + "properties": { + "remark": { + "type": "string" + }, + "v1": { + "type": "string" + }, + "v2": { + "type": "string" + } + } + }, + "core.AddTagRequest": { + "type": "object", + "properties": { + "label_name": { + "type": "string" + } + } + }, + "core.AddTagResponseData": { + "type": "object", + "properties": { + "label_id": { + "type": "integer" + }, + "label_name": { + "type": "string" + } + } + }, + "core.AddTagToUserRequest": { + "type": "object", + "properties": { + "labelid_list": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.AddTagToUserResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + } + } + }, + "core.AutoAcceptAddFriendRequest": { + "type": "object", + "properties": { + "auto": { + "description": "1自动同意 0取消自动同意", + "type": "integer" + } + } + }, + "core.AutoAcceptCardRequest": { + "type": "object", + "properties": { + "auto": { + "description": "1自动接收 0取消自动接收", + "type": "integer" + } + } + }, + "core.AutoAcceptRoomRequest": { + "type": "object", + "properties": { + "auto": { + "description": "0不自动 1自动", + "type": "integer" + } + } + }, + "core.AutoAcceptWCPayRequest": { + "type": "object", + "properties": { + "auto": { + "description": "1自动接收 0取消自动接收", + "type": "integer" + } + } + }, + "core.CDNDownloadRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "file_type": { + "type": "integer" + }, + "save_path": { + "type": "string" + } + } + }, + "core.CDNDownloadResponseData": { + "type": "object", + "properties": { + "error_code": { + "type": "integer" + }, + "file_id": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "save_path": { + "type": "string" + } + } + }, + "core.CDNInitialResponseData": { + "type": "object", + "properties": { + "status": { + "type": "integer" + } + } + }, + "core.CDNSendCardLinkMsgRequest": { + "type": "object", + "properties": { + "desc": { + "type": "string" + }, + "image_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "to_wxid": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "core.CDNSendCardLinkMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "fromUserName": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "toUserName": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "core.CDNSendCardMsgRequest": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "to_wxid": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "core.CDNSendCardMsgResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "count": { + "type": "integer" + }, + "msgResponseList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "clientMsgId": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "msgId": { + "type": "integer" + }, + "newMsgId": { + "type": "string" + }, + "ret": { + "type": "integer" + }, + "serverTime": { + "type": "integer" + }, + "toUserName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "type": { + "type": "integer" + } + } + } + } + } + }, + "core.CDNSendFileMsgRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_name": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendFileMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "fromUserName": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "toUserName": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "core.CDNSendGifMsgNewRequest": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendGifMsgNewResponseData": { + "type": "object", + "properties": { + "md5": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendGifMsgRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendGifMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "fromUserName": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "toUserName": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "core.CDNSendImageMsgRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "crc32": { + "type": "integer" + }, + "file_id": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "thumb_file_size": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendImageMsgResponseData": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "crc32": { + "type": "integer" + }, + "file_id": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "thumb_file_size": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendLocationMsgRequest": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "title": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendLocationMsgResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "count": { + "type": "integer" + }, + "msgResponseList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "clientMsgId": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "msgId": { + "type": "integer" + }, + "newMsgId": { + "type": "string" + }, + "ret": { + "type": "integer" + }, + "serverTime": { + "type": "integer" + }, + "toUserName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "type": { + "type": "integer" + } + } + } + } + } + }, + "core.CDNSendMiniProgramMsgRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "appicon": { + "type": "string" + }, + "appid": { + "type": "string" + }, + "appname": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "page_path": { + "type": "string" + }, + "title": { + "type": "string" + }, + "to_wxid": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "core.CDNSendMiniProgramMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "fromUserName": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "toUserName": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "core.CDNSendRevokeMsgRequest": { + "type": "object", + "properties": { + "client_msgid": {}, + "create_time": { + "type": "integer" + }, + "new_msgid": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendRevokeMsgResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "introduction": { + "type": "string" + }, + "sysWording": { + "type": "string" + } + } + }, + "core.CDNSendTextMsgRequest": { + "type": "object", + "properties": { + "at_all": { + "description": "群消息时候,1是at所有人", + "type": "integer" + }, + "at_list": { + "description": "群消息时候使用", + "type": "array", + "items": { + "type": "string" + } + }, + "content": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendTextMsgResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "count": { + "type": "integer" + }, + "msgResponseList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "clientMsgId": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "msgId": { + "type": "integer" + }, + "newMsgId": { + "type": "string" + }, + "ret": { + "type": "integer" + }, + "serverTime": { + "type": "integer" + }, + "toUserName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "type": { + "type": "integer" + } + } + } + } + } + }, + "core.CDNSendVideoMomentMsgRequest": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "desc": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "object_nonce_id": { + "type": "string" + }, + "thumb_url": { + "type": "string" + }, + "to_wxid": { + "type": "string" + }, + "url": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "core.CDNSendVideoMomentMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "fromUserName": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "toUserName": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "core.CDNSendVideoMsgRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "thumb_file_size": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendVideoMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "rawAeskey": { + "type": "string" + }, + "rawVideoNeedReupload": { + "type": "boolean" + }, + "thumbStartPos": { + "type": "integer" + }, + "videoNeedReupload": { + "type": "boolean" + }, + "videoStartPos": { + "type": "integer" + } + } + }, + "core.CDNSendXmlMsgRequest": { + "type": "object", + "properties": { + "content": { + "description": "\"\u003cappmsg appid=\\\"wx6618f1cfc6c132f8\\\" sdkver=\\\"0\\\"\u003e\u003ctitle\u003e1658934822522.gif\u003c... ...\u003c/weappinfo\u003e\u003cwebsearch /\u003e\u003c/appmsg\u003e\",", + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.CDNSendXmlMsgResponseData": { + "type": "object", + "properties": { + "actionFlag": { + "type": "integer" + }, + "aeskey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "clientMsgId": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "fromUserName": { + "type": "string" + }, + "msgId": { + "type": "integer" + }, + "msgSource": { + "type": "string" + }, + "newMsgId": { + "type": "string" + }, + "toUserName": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "core.CDNUploadRequest": { + "type": "object", + "properties": { + "file_path": { + "type": "string" + }, + "file_type": { + "type": "integer" + } + } + }, + "core.CDNUploadResponseData": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "crc32": { + "type": "integer" + }, + "error_code": { + "type": "integer" + }, + "file_id": { + "type": "string" + }, + "file_key": { + "type": "string" + }, + "file_md5": { + "type": "string" + }, + "file_path": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "thumb_file_md5": { + "type": "string" + }, + "thumb_file_size": { + "type": "integer" + } + } + }, + "core.ChatMsgNotNotifyRequest": { + "type": "object", + "properties": { + "status": { + "description": "1开启 0关闭", + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + }, + "core.ChatSessionTopRequest": { + "type": "object", + "properties": { + "status": { + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + }, + "core.CommentMomentRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "object_id": { + "type": "string" + } + } + }, + "core.CommentMomentResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "snsObject": { + "type": "object", + "properties": { + "blackList": { + "type": "array", + "items": {} + }, + "blackListCount": { + "type": "integer" + }, + "commentCount": { + "type": "integer" + }, + "commentUserList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentFlag": { + "type": "integer" + }, + "commentId": { + "type": "integer" + }, + "commentId2": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "isNotRichText": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "replyCommentId": { + "type": "integer" + }, + "replyCommentId2": { + "type": "string" + }, + "replyUsername": { + "type": "string" + }, + "source": { + "type": "integer" + }, + "type": { + "type": "integer" + }, + "username": { + "type": "string" + } + } + } + }, + "commentUserListCount": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "extFlag": { + "type": "integer" + }, + "groupCount": { + "type": "integer" + }, + "groupList": { + "type": "array", + "items": {} + }, + "groupUser": { + "type": "array", + "items": {} + }, + "groupUserCount": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "isNotRichText": { + "type": "integer" + }, + "likeCount": { + "type": "integer" + }, + "likeFlag": { + "type": "integer" + }, + "likeUserList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentFlag": { + "type": "integer" + }, + "commentId": { + "type": "integer" + }, + "commentId2": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "isNotRichText": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "replyCommentId": { + "type": "integer" + }, + "replyCommentId2": { + "type": "string" + }, + "replyUsername": { + "type": "string" + }, + "source": { + "type": "integer" + }, + "type": { + "type": "integer" + }, + "username": { + "type": "string" + } + } + } + }, + "likeUserListCount": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "noChange": { + "type": "integer" + }, + "objectDesc": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "objectOperations": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "preDownloadInfo": { + "type": "object", + "properties": { + "noPreDownloadRange": { + "type": "string" + }, + "preDownloadNetType": { + "type": "integer" + }, + "preDownloadPercent": { + "type": "integer" + } + } + }, + "referId": { + "type": "string" + }, + "referUsername": { + "type": "string" + }, + "snsRedEnvelops": { + "type": "object", + "properties": { + "reportId": { + "type": "integer" + }, + "reportKey": { + "type": "integer" + }, + "resourceId": { + "type": "integer" + }, + "rewardCount": { + "type": "integer" + }, + "rewardUserList": { + "type": "array", + "items": {} + } + } + }, + "username": { + "type": "string" + }, + "weAppInfo": { + "type": "object", + "properties": { + "appId": { + "type": "integer" + }, + "mapPoiId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "score": { + "type": "integer" + }, + "showType": { + "type": "integer" + }, + "userName": { + "type": "string" + } + } + }, + "withUserCount": { + "type": "integer" + }, + "withUserList": { + "type": "array", + "items": {} + }, + "withUserListCount": { + "type": "integer" + } + } + } + } + }, + "core.CreateChatRoomByProtocolResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "bigHeadImgUrl": { + "type": "string" + }, + "chatRoomName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "imgBuf": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "memberCount": { + "type": "integer" + }, + "memberList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "city": { + "type": "string" + }, + "contactType": { + "type": "integer" + }, + "country": { + "type": "string" + }, + "memberName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "memberStatus": { + "type": "integer" + }, + "nickName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "personalCard": { + "type": "integer" + }, + "province": { + "type": "string" + }, + "pyInitial": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "quanPin": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "remark": { + "type": "object" + }, + "remarkPYInitial": { + "type": "object" + }, + "remarkQuanPin": { + "type": "object" + }, + "sex": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "verifyFlag": { + "type": "integer" + }, + "verifyInfo": { + "type": "string" + } + } + } + }, + "pyInitial": { + "type": "object" + }, + "quanPin": { + "type": "object" + }, + "smallHeadImgUrl": { + "type": "string" + }, + "topic": { + "type": "object" + } + } + }, + "core.CreateRoomRequest": { + "type": "object", + "properties": { + "wxids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "core.DecryptImgRequest": { + "type": "object", + "properties": { + "dest_file": { + "type": "string" + }, + "src_file": { + "type": "string" + } + } + }, + "core.DelChatRoomMemberRequest": { + "type": "object", + "properties": { + "member_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.DelChatRoomRequest": { + "type": "object", + "properties": { + "room_wxid": { + "type": "string" + } + } + }, + "core.DeleteTagRequest": { + "type": "object", + "properties": { + "label_id": { + "type": "integer" + } + } + }, + "core.DeleteTagResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + } + } + }, + "core.EditChatRoomMemberRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.EditChatRoomNoticeRequest": { + "type": "object", + "properties": { + "notice": { + "type": "string" + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.EditFriendRemarkRequest": { + "type": "object", + "properties": { + "remark": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.EditRoomMineNickNameRequest": { + "type": "object", + "properties": { + "nickname": { + "type": "string" + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.ForwardMsgRequest": { + "type": "object", + "properties": { + "msgid": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.GetA8KeyRequest": { + "type": "object", + "properties": { + "scene": { + "type": "integer" + }, + "url": { + "type": "string" + } + } + }, + "core.GetA8KeyResponseData": { + "type": "object", + "properties": { + "a8Key": { + "type": "string" + }, + "actionCode": { + "type": "integer" + }, + "antispamTicket": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "content": { + "type": "string" + }, + "cookie": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "deepLinkBitSet": { + "type": "object", + "properties": { + "bitValue": { + "type": "string" + } + } + }, + "fullUrl": { + "type": "string" + }, + "generalControlBitSet": { + "type": "object", + "properties": { + "bitValue": { + "type": "integer" + } + } + }, + "headImg": { + "type": "string" + }, + "httpHeaderCount": { + "type": "integer" + }, + "httpHeaderList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + }, + "jsapicontrolBytes": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "jsapipermission": { + "type": "object", + "properties": { + "bitValue": { + "type": "integer" + }, + "bitValue2": { + "type": "integer" + }, + "bitValue3": { + "type": "integer" + }, + "bitValue4": { + "type": "integer" + } + } + }, + "menuWording": { + "type": "string" + }, + "mid": { + "type": "string" + }, + "scopeCount": { + "type": "integer" + }, + "scopeList": { + "type": "array", + "items": {} + }, + "shareUrl": { + "type": "string" + }, + "ssid": { + "type": "string" + }, + "title": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "wording": { + "type": "string" + } + } + }, + "core.GetChatRoomListResponseDataItem": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "is_manager": { + "type": "integer" + }, + "manager_wxid": { + "type": "string" + }, + "member_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "nickname": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "total_member": { + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + }, + "core.GetChatRoomMemberListResponseData": { + "type": "object", + "properties": { + "extend": { + "type": "string" + }, + "group_wxid": { + "type": "string" + }, + "member_list": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "province": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "sex": { + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + } + }, + "total": { + "type": "integer" + } + } + }, + "core.GetCollectListResponseData": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from_user": { + "type": "string" + }, + "local_id": { + "type": "integer" + }, + "room_member": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "integer" + }, + "update_time": { + "type": "integer" + }, + "xml": { + "type": "string" + } + } + } + }, + "status": { + "type": "integer" + } + } + }, + "core.GetFriendBriefInfoByProtocolResponseData": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "province": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "sex": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "small_avatar": { + "type": "string" + }, + "sns_pic": { + "type": "string" + }, + "source_type": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "v1": { + "type": "string" + }, + "v2": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.GetFriendDetailInfoByProtocolResponseDataContactListItem": { + "type": "object", + "properties": { + "addContactScene": { + "type": "integer" + }, + "additionalContactList": { + "type": "object", + "properties": { + "linkedinContactItem": { + "type": "object" + } + } + }, + "albumBgImgId": { + "type": "string" + }, + "albumFlag": { + "type": "integer" + }, + "albumStyle": { + "type": "integer" + }, + "alias": { + "type": "string" + }, + "bigHeadImgUrl": { + "type": "string" + }, + "bitMask": { + "type": "integer" + }, + "bitVal": { + "type": "integer" + }, + "cardImgUrl": { + "type": "string" + }, + "chatRoomData": { + "type": "string" + }, + "chatRoomNotify": { + "type": "integer" + }, + "chatRoomOwner": { + "type": "string" + }, + "chatroomInfoVersion": { + "type": "integer" + }, + "chatroomMaxCount": { + "type": "integer" + }, + "chatroomType": { + "type": "integer" + }, + "chatroomVersion": { + "type": "integer" + }, + "city": { + "type": "string" + }, + "contactType": { + "type": "integer" + }, + "country": { + "type": "string" + }, + "customizedInfo": { + "type": "object", + "properties": { + "brandFlag": { + "type": "integer" + }, + "brandIconURL": { + "type": "string" + }, + "brandInfo": { + "type": "string" + }, + "externalInfo": { + "type": "string" + } + } + }, + "deleteFlag": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "domainList": { + "type": "object" + }, + "encryptUserName": { + "type": "string" + }, + "extInfo": { + "type": "string" + }, + "hasWeiXinHdHeadImg": { + "type": "integer" + }, + "headImgMd5": { + "type": "string" + }, + "idcardNum": { + "type": "string" + }, + "imgBuf": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "imgFlag": { + "type": "integer" + }, + "labelIdList": { + "type": "string" + }, + "level": { + "type": "integer" + }, + "mobileFullHash": { + "type": "string" + }, + "mobileHash": { + "type": "string" + }, + "myBrandList": { + "type": "string" + }, + "newChatroomData": { + "type": "object", + "properties": { + "chatRoomMemberList": { + "type": "array", + "items": {} + }, + "infoMask": { + "type": "integer" + }, + "memberCount": { + "type": "integer" + } + } + }, + "nickName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "personalCard": { + "type": "integer" + }, + "phoneNumListInfo": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "phoneNumList": { + "type": "array", + "items": {} + } + } + }, + "province": { + "type": "string" + }, + "pyInitial": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "quanPin": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "realName": { + "type": "string" + }, + "remark": { + "type": "object" + }, + "remarkPYInitial": { + "type": "object" + }, + "remarkQuanPin": { + "type": "object" + }, + "roomInfoCount": { + "type": "integer" + }, + "roomInfoList": { + "type": "array", + "items": {} + }, + "sex": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "smallHeadImgUrl": { + "type": "string" + }, + "snsUserInfo": { + "type": "object", + "properties": { + "snsBgImgId": { + "type": "string" + }, + "snsBgObjectId": { + "type": "string" + }, + "snsFlag": { + "type": "integer" + }, + "snsFlagEx": { + "type": "integer" + } + } + }, + "source": { + "type": "integer" + }, + "userName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "verifyContent": { + "type": "string" + }, + "verifyFlag": { + "type": "integer" + }, + "verifyInfo": { + "type": "string" + }, + "weiDianInfo": { + "type": "string" + }, + "weibo": { + "type": "string" + }, + "weiboFlag": { + "type": "integer" + }, + "weiboNickname": { + "type": "string" + } + } + }, + "core.GetFriendListResponseDateItem": { + "type": "object", + "properties": { + "account": { + "description": "微信账号,友情的直接连线", + "type": "string" + }, + "avatar": { + "description": "头像的风景画,好友的形象代言", + "type": "string" + }, + "city": { + "description": "都市的温馨角落,好友的日常坐标", + "type": "string" + }, + "country": { + "description": "国界的另一端,好友的远方故事", + "type": "string" + }, + "labelid_list": { + "description": "标签的彩虹桥,连接不同朋友圈的密码", + "type": "string" + }, + "nickname": { + "description": "昵称的诗篇,好友的个性签名", + "type": "string" + }, + "province": { + "description": "省份的风土人情,好友的地域色彩", + "type": "string" + }, + "remark": { + "description": "备注的小秘密,只有你知道的代号", + "type": "string" + }, + "sex": { + "description": "性别的罗盘,1为蓝海,2为红颜", + "type": "integer" + }, + "wxid": { + "description": "微信ID,好友的唯一坐标", + "type": "string" + } + } + }, + "core.GetFriendMomentRequest": { + "type": "object", + "properties": { + "first_page_md5": { + "type": "string" + }, + "max_id": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "core.GetFriendMomentResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "continueId": { + "type": "string" + }, + "firstPageMd5": { + "type": "string" + }, + "limitedId": { + "type": "string" + }, + "newRequestTime": { + "type": "integer" + }, + "objectCount": { + "type": "integer" + }, + "objectCountForSameMd5": { + "type": "integer" + }, + "objectList": { + "type": "array", + "items": {} + }, + "objectTotalCount": { + "type": "integer" + }, + "retTips": { + "type": "string" + }, + "serverConfig": { + "type": "object", + "properties": { + "copyAndPasteWordLimit": { + "type": "integer" + }, + "postMentionLimit": { + "type": "integer" + } + } + }, + "snsUserInfo": { + "type": "object", + "properties": { + "snsBgImgId": { + "type": "string" + }, + "snsBgObjectId": { + "type": "string" + }, + "snsFlag": { + "type": "integer" + }, + "snsFlagEx": { + "type": "integer" + } + } + } + } + }, + "core.GetLoginUserInfoResponseData": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "pid": { + "type": "integer" + }, + "unread_msg_count": { + "type": "integer" + }, + "wx_user_dir": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.GetMiniProgramCodeRequest": { + "type": "object", + "properties": { + "appid": { + "type": "string" + } + } + }, + "core.GetMiniProgramCodeResponseData": { + "type": "object", + "properties": { + "appIconUrl": { + "type": "string" + }, + "appName": { + "type": "string" + }, + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "code": { + "type": "string" + }, + "jsApiBaseResponse": { + "type": "object", + "properties": { + "errcode": { + "type": "integer" + }, + "errmsg": { + "type": "string" + } + } + }, + "liftSpan": { + "type": "integer" + }, + "openId": { + "type": "string" + }, + "scopeList": { + "type": "array", + "items": {} + }, + "sessionKey": { + "type": "string" + }, + "sessionTicket": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "core.GetMomentRequest": { + "type": "object", + "properties": { + "max_id": { + "type": "string" + } + } + }, + "core.GetPublicUserListResponseData": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.GetRoomMemberInviteListResponseData": { + "type": "object", + "properties": { + "member_list": { + "type": "array", + "items": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "flag": { + "type": "integer" + }, + "invite_by": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + } + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.GetTagListByWxidRequest": { + "type": "object", + "properties": { + "wxid": { + "type": "string" + } + } + }, + "core.GetTagListByWxidResponseData": { + "type": "object", + "properties": { + "labelid_list": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.GetTagListResponseDataItem": { + "type": "object", + "properties": { + "label_id": { + "type": "string" + }, + "label_name": { + "type": "string" + } + } + }, + "core.GetWorkWxChatRoomMemberRequest": { + "type": "object", + "properties": { + "room_wxid": { + "type": "string" + } + } + }, + "core.GetWorkWxChatRoomMemberResponseData": { + "type": "object", + "properties": { + "member_list": { + "type": "array", + "items": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "sex": { + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + } + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.GetWorkWxRoomListResponseDataItem": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "manager_wxid": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "room_wxid": { + "type": "string" + }, + "total_member": { + "type": "integer" + } + } + }, + "core.GetWorkWxUserListResponseDataItem": { + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "sex": { + "type": "integer" + }, + "wxid": { + "type": "string" + } + } + }, + "core.HttpCallBackRequest": { + "type": "object", + "properties": { + "timeout": { + "description": "默认5秒", + "type": "integer" + }, + "url": { + "type": "string" + } + } + }, + "core.InviteToRoomRequest": { + "type": "object", + "properties": { + "member_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "room_wxid": { + "type": "string" + } + } + }, + "core.InviteToRoomResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "memberCount": { + "type": "integer" + }, + "memberList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "city": { + "type": "string" + }, + "contactType": { + "type": "integer" + }, + "country": { + "type": "string" + }, + "memberName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "memberStatus": { + "type": "integer" + }, + "nickName": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "personalCard": { + "type": "integer" + }, + "province": { + "type": "string" + }, + "pyInitial": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "quanPin": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "remark": { + "type": "object" + }, + "remarkPYInitial": { + "type": "object" + }, + "remarkQuanPin": { + "type": "object" + }, + "sex": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "verifyFlag": { + "type": "integer" + }, + "verifyInfo": { + "type": "string" + } + } + } + } + } + }, + "core.LikeMomentRequest": { + "type": "object", + "properties": { + "object_id": { + "type": "string" + } + } + }, + "core.LikeMomentResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "snsObject": { + "type": "object", + "properties": { + "blackList": { + "type": "array", + "items": {} + }, + "blackListCount": { + "type": "integer" + }, + "commentCount": { + "type": "integer" + }, + "commentUserList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentFlag": { + "type": "integer" + }, + "commentId": { + "type": "integer" + }, + "commentId2": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "isNotRichText": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "replyCommentId": { + "type": "integer" + }, + "replyCommentId2": { + "type": "string" + }, + "replyUsername": { + "type": "string" + }, + "source": { + "type": "integer" + }, + "type": { + "type": "integer" + }, + "username": { + "type": "string" + } + } + } + }, + "commentUserListCount": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "extFlag": { + "type": "integer" + }, + "groupCount": { + "type": "integer" + }, + "groupList": { + "type": "array", + "items": {} + }, + "groupUser": { + "type": "array", + "items": {} + }, + "groupUserCount": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "isNotRichText": { + "type": "integer" + }, + "likeCount": { + "type": "integer" + }, + "likeFlag": { + "type": "integer" + }, + "likeUserList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "commentFlag": { + "type": "integer" + }, + "commentId": { + "type": "integer" + }, + "commentId2": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "isNotRichText": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "replyCommentId": { + "type": "integer" + }, + "replyCommentId2": { + "type": "string" + }, + "replyUsername": { + "type": "string" + }, + "source": { + "type": "integer" + }, + "type": { + "type": "integer" + }, + "username": { + "type": "string" + } + } + } + }, + "likeUserListCount": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "noChange": { + "type": "integer" + }, + "objectDesc": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "objectOperations": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "preDownloadInfo": { + "type": "object", + "properties": { + "noPreDownloadRange": { + "type": "string" + }, + "preDownloadNetType": { + "type": "integer" + }, + "preDownloadPercent": { + "type": "integer" + } + } + }, + "referId": { + "type": "string" + }, + "referUsername": { + "type": "string" + }, + "snsRedEnvelops": { + "type": "object", + "properties": { + "reportId": { + "type": "integer" + }, + "reportKey": { + "type": "integer" + }, + "resourceId": { + "type": "integer" + }, + "rewardCount": { + "type": "integer" + }, + "rewardUserList": { + "type": "array", + "items": {} + } + } + }, + "username": { + "type": "string" + }, + "weAppInfo": { + "type": "object", + "properties": { + "appId": { + "type": "integer" + }, + "mapPoiId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "score": { + "type": "integer" + }, + "showType": { + "type": "integer" + }, + "userName": { + "type": "string" + } + } + }, + "withUserCount": { + "type": "integer" + }, + "withUserList": { + "type": "array", + "items": {} + }, + "withUserListCount": { + "type": "integer" + } + } + } + } + }, + "core.LiveEnterRequest": { + "type": "object", + "properties": { + "live_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "object_nonce_id": { + "type": "string" + } + } + }, + "core.LiveGetOnlineUserRequest": { + "type": "object", + "properties": { + "last_buff": { + "type": "string" + }, + "live_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "object_nonce_id": { + "type": "string" + } + } + }, + "core.LiveGetShelfRequest": { + "type": "object", + "properties": { + "live_username": { + "type": "string" + }, + "request_id": { + "type": "string" + } + } + }, + "core.LiveSendMsgRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + } + } + }, + "core.ModifyTagRequest": { + "type": "object", + "properties": { + "label_id": { + "type": "integer" + }, + "label_name": { + "type": "string" + } + } + }, + "core.RefreshLoginQrCodeResponseData": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "pid": { + "type": "integer" + }, + "qrcode": { + "type": "string" + } + } + }, + "core.RoomShowNickNameRequest": { + "type": "object", + "properties": { + "room_wxid": { + "type": "string" + }, + "status": { + "description": "1显示 0隐藏", + "type": "integer" + } + } + }, + "core.SaveRoomSaveToContactRequest": { + "type": "object", + "properties": { + "room_wxid": { + "type": "string" + }, + "status": { + "description": "1保存 2移出", + "type": "integer" + } + } + }, + "core.SearchWxUserResponseData": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "keyword": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "provice": { + "type": "string" + }, + "search": { + "type": "string" + }, + "sex": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "small_avatar": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "v1": { + "type": "string" + }, + "v2": { + "type": "string" + }, + "wxid": { + "type": "string" + } + } + }, + "core.SendCardMsgRequest": { + "type": "object", + "properties": { + "card_wxid": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendCollectMsgByMsgIdRequest": { + "type": "object", + "properties": { + "msgid": { + "type": "string" + } + } + }, + "core.SendCollectRequest": { + "type": "object", + "properties": { + "local_id": { + "type": "integer" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendFileMsgRequest": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendGifMsgRequest": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendImageMsgRequest": { + "type": "object", + "properties": { + "file": { + "description": "例如 \"C:\\\\a.jpg\"", + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendLinkMsgRequest": { + "type": "object", + "properties": { + "desc": { + "type": "string" + }, + "image_url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "to_wxid": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "core.SendMomentRequest": { + "type": "object", + "properties": { + "object_desc": { + "type": "string" + } + } + }, + "core.SendMomentResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "snsObject": { + "type": "object", + "properties": { + "blackList": { + "type": "array", + "items": {} + }, + "blackListCount": { + "type": "integer" + }, + "commentCount": { + "type": "integer" + }, + "commentUserList": { + "type": "array", + "items": {} + }, + "commentUserListCount": { + "type": "integer" + }, + "createTime": { + "type": "integer" + }, + "deleteFlag": { + "type": "integer" + }, + "extFlag": { + "type": "integer" + }, + "groupCount": { + "type": "integer" + }, + "groupList": { + "type": "array", + "items": {} + }, + "groupUser": { + "type": "array", + "items": {} + }, + "groupUserCount": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "isNotRichText": { + "type": "integer" + }, + "likeCount": { + "type": "integer" + }, + "likeFlag": { + "type": "integer" + }, + "likeUserList": { + "type": "array", + "items": {} + }, + "likeUserListCount": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "noChange": { + "type": "integer" + }, + "objectDesc": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "objectOperations": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "preDownloadInfo": { + "type": "object", + "properties": { + "noPreDownloadRange": { + "type": "string" + }, + "preDownloadNetType": { + "type": "integer" + }, + "preDownloadPercent": { + "type": "integer" + } + } + }, + "referId": { + "type": "string" + }, + "referUsername": { + "type": "string" + }, + "snsRedEnvelops": { + "type": "object", + "properties": { + "reportId": { + "type": "integer" + }, + "reportKey": { + "type": "integer" + }, + "resourceId": { + "type": "integer" + }, + "rewardCount": { + "type": "integer" + }, + "rewardUserList": { + "type": "array", + "items": {} + } + } + }, + "username": { + "type": "string" + }, + "weAppInfo": { + "type": "object", + "properties": { + "appId": { + "type": "integer" + }, + "mapPoiId": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "score": { + "type": "integer" + }, + "showType": { + "type": "integer" + }, + "userName": { + "type": "string" + } + } + }, + "withUserCount": { + "type": "integer" + }, + "withUserList": { + "type": "array", + "items": {} + }, + "withUserListCount": { + "type": "integer" + } + } + }, + "spamTips": { + "type": "string" + } + } + }, + "core.SendTextMsgRequest": { + "type": "object", + "properties": { + "at_list": { + "description": "群消息时候使用 \"notify@all\" @所有人", + "type": "array", + "items": { + "type": "string" + } + }, + "content": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendVideoMsgRequest": { + "type": "object", + "properties": { + "file": { + "type": "string" + }, + "to_wxid": { + "type": "string" + } + } + }, + "core.SendXmlMsgRequest": { + "type": "object", + "properties": { + "to_wxid": { + "type": "string" + }, + "xml": { + "type": "string" + } + } + }, + "core.SwitchSessionRequest": { + "type": "object", + "properties": { + "to_wxid": { + "type": "string" + } + } + }, + "core.UploadMomentImageRequest": { + "type": "object", + "properties": { + "path": { + "type": "string" + } + } + }, + "core.UploadMomentImageResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "ret": { + "type": "integer" + } + } + }, + "bufferUrl": { + "type": "object", + "properties": { + "type": { + "type": "integer" + }, + "url": { + "type": "string" + } + } + }, + "clientId": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "startPos": { + "type": "integer" + }, + "thumbUrlCount": { + "type": "integer" + }, + "thumbUrls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "integer" + }, + "url": { + "type": "string" + } + } + } + }, + "totalLen": { + "type": "integer" + }, + "type": { + "type": "integer" + } + } + }, + "core.VideoMomentCreateVirtualNickNameRequest": { + "type": "object", + "properties": { + "headimg_url": { + "type": "string" + }, + "nickname": { + "type": "string" + } + } + }, + "core.VideoMomentFollowRequest": { + "type": "object", + "properties": { + "username": { + "type": "string" + } + } + }, + "core.VideoMomentFollowResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "contact": { + "type": "object", + "properties": { + "archievementInfo": { + "type": "object" + }, + "authInfo": { + "type": "object", + "properties": { + "appName": { + "type": "string" + }, + "authGuarantor": { + "type": "object" + }, + "authIconType": { + "type": "integer" + }, + "authIconUrl": { + "type": "string" + }, + "authProfession": { + "type": "string" + }, + "authVerifyIdentity": { + "type": "integer" + }, + "customerType": { + "type": "integer" + }, + "detailLink": { + "type": "string" + }, + "realName": { + "type": "string" + }, + "verifyStatus": { + "type": "integer" + } + } + }, + "bindInfo": { + "type": "array", + "items": {} + }, + "coverEntranceFlag": { + "type": "integer" + }, + "coverImgUrl": { + "type": "string" + }, + "coverUrl": { + "type": "string" + }, + "extFlag": { + "type": "integer" + }, + "extInfo": { + "type": "object", + "properties": { + "birthDay": { + "type": "integer" + }, + "birthMonth": { + "type": "integer" + }, + "birthYear": { + "type": "integer" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "province": { + "type": "string" + }, + "sex": { + "type": "integer" + } + } + }, + "fansCount": { + "type": "integer" + }, + "feedCount": { + "type": "integer" + }, + "followFlag": { + "type": "integer" + }, + "followTime": { + "type": "integer" + }, + "foreignUserFlag": { + "type": "integer" + }, + "friendFollowCount": { + "type": "integer" + }, + "guestInfo": { + "type": "object" + }, + "headUrl": { + "type": "string" + }, + "liveCoverImgUrl": { + "type": "string" + }, + "liveInfo": { + "type": "object", + "properties": { + "anchorStatusFlag": { + "type": "string" + }, + "lotterySetting": { + "type": "object", + "properties": { + "attendType": { + "type": "integer" + }, + "settingFlag": { + "type": "string" + } + } + }, + "micSetting": { + "type": "object", + "properties": { + "settingFlag": { + "type": "string" + }, + "settingSwitchFlag": { + "type": "string" + } + } + }, + "switchFlag": { + "type": "integer" + } + } + }, + "liveNoticeInfo": { + "type": "object" + }, + "liveStatus": { + "type": "integer" + }, + "loggingoutWording": { + "type": "string" + }, + "menu": { + "type": "array", + "items": {} + }, + "msgInfo": { + "type": "object" + }, + "nickname": { + "type": "string" + }, + "oneTimeFlag": { + "type": "integer" + }, + "originalEntranceFlag": { + "type": "integer" + }, + "originalFlag": { + "type": "integer" + }, + "originalInfo": { + "type": "object" + }, + "seq": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "spamStatus": { + "type": "integer" + }, + "userFlag": { + "type": "integer" + }, + "userMode": { + "type": "integer" + }, + "username": { + "type": "string" + }, + "vestNickname": { + "type": "string" + }, + "wxUsernameV5": { + "type": "string" + } + } + }, + "liveStatusFlag": { + "type": "integer" + } + } + }, + "core.VideoMomentGetSessionIdRequest": { + "type": "object", + "properties": { + "roleType": { + "type": "integer" + }, + "to_username": { + "type": "string" + } + } + }, + "core.VideoMomentGetSessionIdResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object" + }, + "ret": { + "type": "integer" + } + } + }, + "enableAction": { + "type": "integer" + }, + "sessionId": { + "type": "string" + }, + "sessionInfo": { + "type": "object", + "properties": { + "enableAction": { + "type": "integer" + }, + "msgExtInfo": { + "type": "string" + }, + "rejectMsg": { + "type": "integer" + }, + "sessionId": { + "type": "string" + }, + "toUsername": { + "type": "string" + } + } + }, + "toUsername": { + "type": "string" + } + } + }, + "core.VideoMomentInitResponseData": { + "type": "object", + "properties": { + "aliasInfo": { + "type": "array", + "items": { + "type": "object", + "properties": { + "aliasMsgName": { + "type": "string" + }, + "aliasVersion": { + "type": "integer" + }, + "headImgUrl": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "roleType": { + "type": "integer" + } + } + } + }, + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "cmdlist": { + "type": "array", + "items": {} + }, + "continueFlag": { + "type": "integer" + }, + "currentAliasRoleType": { + "type": "integer" + }, + "finderUsernameList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "finderUsernameList": { + "type": "string" + } + } + } + }, + "keybuf": { + "type": "object", + "properties": { + "buffer": { + "type": "string" + }, + "iLen": { + "type": "integer" + } + } + }, + "myacct": { + "type": "array", + "items": { + "type": "object", + "properties": { + "archievementInfo": { + "type": "object" + }, + "authInfo": { + "type": "object" + }, + "bindInfo": { + "type": "array", + "items": {} + }, + "coverEntranceFlag": { + "type": "integer" + }, + "coverImgUrl": { + "type": "string" + }, + "coverUrl": { + "type": "string" + }, + "extFlag": { + "type": "integer" + }, + "extInfo": { + "type": "object", + "properties": { + "birthDay": { + "type": "integer" + }, + "birthMonth": { + "type": "integer" + }, + "birthYear": { + "type": "integer" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "province": { + "type": "string" + }, + "sex": { + "type": "integer" + } + } + }, + "fansCount": { + "type": "integer" + }, + "feedCount": { + "type": "integer" + }, + "followFlag": { + "type": "integer" + }, + "followTime": { + "type": "integer" + }, + "foreignUserFlag": { + "type": "integer" + }, + "friendFollowCount": { + "type": "integer" + }, + "guestInfo": { + "type": "object" + }, + "headUrl": { + "type": "string" + }, + "liveCoverImgUrl": { + "type": "string" + }, + "liveInfo": { + "type": "object", + "properties": { + "anchorStatusFlag": { + "type": "string" + }, + "lotterySetting": { + "type": "object" + }, + "micSetting": { + "type": "object", + "properties": { + "settingFlag": { + "type": "string" + }, + "settingSwitchFlag": { + "type": "string" + } + } + }, + "switchFlag": { + "type": "integer" + } + } + }, + "liveNoticeInfo": { + "type": "object" + }, + "liveStatus": { + "type": "integer" + }, + "loggingoutWording": { + "type": "string" + }, + "menu": { + "type": "array", + "items": {} + }, + "msgInfo": { + "type": "object" + }, + "nickname": { + "type": "string" + }, + "oneTimeFlag": { + "type": "integer" + }, + "originalEntranceFlag": { + "type": "integer" + }, + "originalFlag": { + "type": "integer" + }, + "originalInfo": { + "type": "object", + "properties": { + "postNeedCheckFlag": { + "type": "integer" + }, + "punishYearFlag": { + "type": "integer" + }, + "restApplyOriginalCount": { + "type": "integer" + }, + "restPunishDay": { + "type": "integer" + }, + "restRepostCount": { + "type": "integer" + } + } + }, + "seq": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "spamStatus": { + "type": "integer" + }, + "userFlag": { + "type": "integer" + }, + "userMode": { + "type": "integer" + }, + "username": { + "type": "string" + }, + "vestNickname": { + "type": "string" + }, + "wxUsernameV5": { + "type": "string" + } + } + } + }, + "nextAliasModAvailableTime": { + "type": "string" + }, + "retryDelaySecond": { + "type": "integer" + }, + "ringtoneConfig": { + "type": "object" + }, + "slideUpGuideConfig": { + "type": "array", + "items": {} + }, + "tabInfos": { + "type": "array", + "items": { + "type": "object", + "properties": { + "displayTabType": { + "type": "integer" + }, + "tabName": { + "type": "string" + } + } + } + }, + "teenmodeSetting": { + "type": "object" + }, + "teenmodeTipsConfig": { + "type": "object" + }, + "userNotCreatedFlag": { + "type": "integer" + }, + "userver": { + "type": "integer" + }, + "userverForH5": { + "type": "integer" + }, + "wxPersonalizedSetting": { + "type": "object" + }, + "wxUserAttr": { + "type": "object", + "properties": { + "notAvailableFlag": { + "type": "integer" + }, + "wording": { + "type": "string" + } + } + }, + "wxUsernameForH5": { + "type": "string" + } + } + }, + "core.VideoMomentLikeRequest": { + "type": "object", + "properties": { + "object_id": { + "type": "string" + }, + "object_nonce_id": { + "type": "string" + } + } + }, + "core.VideoMomentLikeResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "likeid": { + "type": "integer" + } + } + }, + "core.VideoMomentSearchRequest": { + "type": "object", + "properties": { + "last_buff": { + "type": "string" + }, + "query": { + "type": "string" + }, + "scene": { + "type": "integer" + } + } + }, + "core.VideoMomentSendMsgRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "to_username": { + "type": "string" + } + } + }, + "core.VideoMomentSendMsgResponseData": { + "type": "object", + "properties": { + "baseResponse": { + "type": "object", + "properties": { + "errMsg": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + } + }, + "ret": { + "type": "integer" + } + } + }, + "newmsgid": { + "type": "integer" + } + } + }, + "core.VideoMomentSwitchVirtualNickNameRequest": { + "type": "object", + "properties": { + "role_type": { + "type": "integer" + } + } + }, + "core.VideoMomentUserHomeRequest": { + "type": "object", + "properties": { + "last_buff": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "core.VideoMomentVideoDetailRequest": { + "type": "object", + "properties": { + "last_buff": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "object_nonce_id": { + "type": "string" + } + } + }, + "core.VoiceToTextRequest": { + "type": "object", + "properties": { + "msgid": { + "type": "string" + } + } + }, + "core.VoiceToTextResponseData": { + "type": "object", + "properties": { + "from_wxid": { + "type": "string" + }, + "msgid": { + "type": "string" + }, + "room_wxid": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "text": { + "type": "string" + }, + "to_wxid": { + "type": "string" + }, + "wx_type": { + "type": "integer" + } + } + }, + "core.WorkWxCdnDownloadRequest": { + "type": "object", + "properties": { + "aes_key": { + "type": "string" + }, + "auth_key": { + "type": "string" + }, + "save_path": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "core.WorkWxCdnDownloadResponseData": { + "type": "object", + "properties": { + "error_code": { + "type": "integer" + }, + "save_path": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/docs/swagger.yaml b/docs/swagger.yaml new file mode 100644 index 0000000..132f139 --- /dev/null +++ b/docs/swagger.yaml @@ -0,0 +1,5390 @@ +definitions: + api.CommonStringResponse: + properties: + code: + type: integer + data: + type: string + msg: + type: string + type: object + core.AcceptFriendRequest: + properties: + encryptusername: + type: string + scene: + type: integer + ticket: + type: string + type: object + core.AddFriendRequest: + properties: + remark: + type: string + room_wxid: + type: string + source_type: + type: integer + wxid: + type: string + type: object + core.AddSearchWxUserRequest: + properties: + remark: + type: string + v1: + type: string + v2: + type: string + type: object + core.AddTagRequest: + properties: + label_name: + type: string + type: object + core.AddTagResponseData: + properties: + label_id: + type: integer + label_name: + type: string + type: object + core.AddTagToUserRequest: + properties: + labelid_list: + type: string + wxid: + type: string + type: object + core.AddTagToUserResponseData: + properties: + baseResponse: + properties: + errMsg: + properties: + string: + type: string + type: object + ret: + type: integer + type: object + type: object + core.AutoAcceptAddFriendRequest: + properties: + auto: + description: 1自动同意 0取消自动同意 + type: integer + type: object + core.AutoAcceptCardRequest: + properties: + auto: + description: 1自动接收 0取消自动接收 + type: integer + type: object + core.AutoAcceptRoomRequest: + properties: + auto: + description: 0不自动 1自动 + type: integer + type: object + core.AutoAcceptWCPayRequest: + properties: + auto: + description: 1自动接收 0取消自动接收 + type: integer + type: object + core.CDNDownloadRequest: + properties: + aes_key: + type: string + file_id: + type: string + file_type: + type: integer + save_path: + type: string + type: object + core.CDNDownloadResponseData: + properties: + error_code: + type: integer + file_id: + type: string + file_size: + type: integer + save_path: + type: string + type: object + core.CDNInitialResponseData: + properties: + status: + type: integer + type: object + core.CDNSendCardLinkMsgRequest: + properties: + desc: + type: string + image_url: + type: string + title: + type: string + to_wxid: + type: string + url: + type: string + type: object + core.CDNSendCardLinkMsgResponseData: + properties: + actionFlag: + type: integer + aeskey: + type: string + appId: + type: string + baseResponse: + properties: + errMsg: + type: object + ret: + type: integer + type: object + clientMsgId: + type: string + createTime: + type: integer + fromUserName: + type: string + msgId: + type: integer + msgSource: + type: string + newMsgId: + type: string + toUserName: + type: string + type: + type: integer + type: object + core.CDNSendCardMsgRequest: + properties: + avatar: + type: string + nickname: + type: string + to_wxid: + type: string + username: + type: string + type: object + core.CDNSendCardMsgResponseData: + properties: + baseResponse: + properties: + ret: + type: integer + type: object + count: + type: integer + msgResponseList: + items: + properties: + clientMsgId: + type: integer + createTime: + type: integer + msgId: + type: integer + newMsgId: + type: string + ret: + type: integer + serverTime: + type: integer + toUserName: + properties: + string: + type: string + type: object + type: + type: integer + type: object + type: array + type: object + core.CDNSendFileMsgRequest: + properties: + aes_key: + type: string + file_id: + type: string + file_md5: + type: string + file_name: + type: string + file_size: + type: integer + to_wxid: + type: string + type: object + core.CDNSendFileMsgResponseData: + properties: + actionFlag: + type: integer + aeskey: + type: string + appId: + type: string + baseResponse: + properties: + ret: + type: integer + type: object + clientMsgId: + type: string + createTime: + type: integer + fromUserName: + type: string + msgId: + type: integer + msgSource: + type: string + newMsgId: + type: string + toUserName: + type: string + type: + type: integer + type: object + core.CDNSendGifMsgNewRequest: + properties: + path: + type: string + to_wxid: + type: string + type: object + core.CDNSendGifMsgNewResponseData: + properties: + md5: + type: string + size: + type: integer + to_wxid: + type: string + type: object + core.CDNSendGifMsgRequest: + properties: + aes_key: + type: string + file_id: + type: string + file_md5: + type: string + file_size: + type: integer + to_wxid: + type: string + type: object + core.CDNSendGifMsgResponseData: + properties: + actionFlag: + type: integer + aeskey: + type: string + appId: + type: string + baseResponse: + properties: + ret: + type: integer + type: object + clientMsgId: + type: string + createTime: + type: integer + fromUserName: + type: string + msgId: + type: integer + msgSource: + type: string + newMsgId: + type: string + toUserName: + type: string + type: + type: integer + type: object + core.CDNSendImageMsgRequest: + properties: + aes_key: + type: string + crc32: + type: integer + file_id: + type: string + file_md5: + type: string + file_size: + type: integer + thumb_file_size: + type: integer + to_wxid: + type: string + type: object + core.CDNSendImageMsgResponseData: + properties: + aes_key: + type: string + crc32: + type: integer + file_id: + type: string + file_md5: + type: string + file_size: + type: integer + thumb_file_size: + type: integer + to_wxid: + type: string + type: object + core.CDNSendLocationMsgRequest: + properties: + address: + type: string + latitude: + type: number + longitude: + type: number + title: + type: string + to_wxid: + type: string + type: object + core.CDNSendLocationMsgResponseData: + properties: + baseResponse: + properties: + ret: + type: integer + type: object + count: + type: integer + msgResponseList: + items: + properties: + clientMsgId: + type: integer + createTime: + type: integer + msgId: + type: integer + newMsgId: + type: string + ret: + type: integer + serverTime: + type: integer + toUserName: + properties: + string: + type: string + type: object + type: + type: integer + type: object + type: array + type: object + core.CDNSendMiniProgramMsgRequest: + properties: + aes_key: + type: string + appicon: + type: string + appid: + type: string + appname: + type: string + file_id: + type: string + file_md5: + type: string + file_size: + type: integer + page_path: + type: string + title: + type: string + to_wxid: + type: string + username: + type: string + type: object + core.CDNSendMiniProgramMsgResponseData: + properties: + actionFlag: + type: integer + aeskey: + type: string + appId: + type: string + baseResponse: + properties: + ret: + type: integer + type: object + clientMsgId: + type: string + createTime: + type: integer + fromUserName: + type: string + msgId: + type: integer + msgSource: + type: string + newMsgId: + type: string + toUserName: + type: string + type: + type: integer + type: object + core.CDNSendRevokeMsgRequest: + properties: + client_msgid: {} + create_time: + type: integer + new_msgid: + type: string + to_wxid: + type: string + type: object + core.CDNSendRevokeMsgResponseData: + properties: + baseResponse: + properties: + ret: + type: integer + type: object + introduction: + type: string + sysWording: + type: string + type: object + core.CDNSendTextMsgRequest: + properties: + at_all: + description: 群消息时候,1是at所有人 + type: integer + at_list: + description: 群消息时候使用 + items: + type: string + type: array + content: + type: string + to_wxid: + type: string + type: object + core.CDNSendTextMsgResponseData: + properties: + baseResponse: + properties: + ret: + type: integer + type: object + count: + type: integer + msgResponseList: + items: + properties: + clientMsgId: + type: integer + createTime: + type: integer + msgId: + type: integer + newMsgId: + type: string + ret: + type: integer + serverTime: + type: integer + toUserName: + properties: + string: + type: string + type: object + type: + type: integer + type: object + type: array + type: object + core.CDNSendVideoMomentMsgRequest: + properties: + avatar: + type: string + desc: + type: string + nickname: + type: string + object_id: + type: string + object_nonce_id: + type: string + thumb_url: + type: string + to_wxid: + type: string + url: + type: string + username: + type: string + type: object + core.CDNSendVideoMomentMsgResponseData: + properties: + actionFlag: + type: integer + aeskey: + type: string + appId: + type: string + baseResponse: + properties: + ret: + type: integer + type: object + clientMsgId: + type: string + createTime: + type: integer + fromUserName: + type: string + msgId: + type: integer + msgSource: + type: string + newMsgId: + type: string + toUserName: + type: string + type: + type: integer + type: object + core.CDNSendVideoMsgRequest: + properties: + aes_key: + type: string + file_id: + type: string + file_md5: + type: string + file_size: + type: integer + thumb_file_size: + type: integer + to_wxid: + type: string + type: object + core.CDNSendVideoMsgResponseData: + properties: + actionFlag: + type: integer + aeskey: + type: string + baseResponse: + properties: + ret: + type: integer + type: object + clientMsgId: + type: string + msgId: + type: integer + msgSource: + type: string + newMsgId: + type: string + rawAeskey: + type: string + rawVideoNeedReupload: + type: boolean + thumbStartPos: + type: integer + videoNeedReupload: + type: boolean + videoStartPos: + type: integer + type: object + core.CDNSendXmlMsgRequest: + properties: + content: + description: '"<appmsg appid=\"wx6618f1cfc6c132f8\" sdkver=\"0\"><title>1658934822522.gif<... + ...</weappinfo><websearch /></appmsg>",' + type: string + to_wxid: + type: string + type: object + core.CDNSendXmlMsgResponseData: + properties: + actionFlag: + type: integer + aeskey: + type: string + appId: + type: string + baseResponse: + properties: + ret: + type: integer + type: object + clientMsgId: + type: string + createTime: + type: integer + fromUserName: + type: string + msgId: + type: integer + msgSource: + type: string + newMsgId: + type: string + toUserName: + type: string + type: + type: integer + type: object + core.CDNUploadRequest: + properties: + file_path: + type: string + file_type: + type: integer + type: object + core.CDNUploadResponseData: + properties: + aes_key: + type: string + crc32: + type: integer + error_code: + type: integer + file_id: + type: string + file_key: + type: string + file_md5: + type: string + file_path: + type: string + file_size: + type: integer + thumb_file_md5: + type: string + thumb_file_size: + type: integer + type: object + core.ChatMsgNotNotifyRequest: + properties: + status: + description: 1开启 0关闭 + type: integer + wxid: + type: string + type: object + core.ChatSessionTopRequest: + properties: + status: + type: integer + wxid: + type: string + type: object + core.CommentMomentRequest: + properties: + content: + type: string + object_id: + type: string + type: object + core.CommentMomentResponseData: + properties: + baseResponse: + properties: + errMsg: + type: object + ret: + type: integer + type: object + snsObject: + properties: + blackList: + items: {} + type: array + blackListCount: + type: integer + commentCount: + type: integer + commentUserList: + items: + properties: + commentFlag: + type: integer + commentId: + type: integer + commentId2: + type: string + content: + type: string + createTime: + type: integer + deleteFlag: + type: integer + isNotRichText: + type: integer + nickname: + type: string + replyCommentId: + type: integer + replyCommentId2: + type: string + replyUsername: + type: string + source: + type: integer + type: + type: integer + username: + type: string + type: object + type: array + commentUserListCount: + type: integer + createTime: + type: integer + deleteFlag: + type: integer + extFlag: + type: integer + groupCount: + type: integer + groupList: + items: {} + type: array + groupUser: + items: {} + type: array + groupUserCount: + type: integer + id: + type: string + isNotRichText: + type: integer + likeCount: + type: integer + likeFlag: + type: integer + likeUserList: + items: + properties: + commentFlag: + type: integer + commentId: + type: integer + commentId2: + type: string + content: + type: string + createTime: + type: integer + deleteFlag: + type: integer + isNotRichText: + type: integer + nickname: + type: string + replyCommentId: + type: integer + replyCommentId2: + type: string + replyUsername: + type: string + source: + type: integer + type: + type: integer + username: + type: string + type: object + type: array + likeUserListCount: + type: integer + nickname: + type: string + noChange: + type: integer + objectDesc: + properties: + buffer: + type: string + iLen: + type: integer + type: object + objectOperations: + properties: + buffer: + type: string + iLen: + type: integer + type: object + preDownloadInfo: + properties: + noPreDownloadRange: + type: string + preDownloadNetType: + type: integer + preDownloadPercent: + type: integer + type: object + referId: + type: string + referUsername: + type: string + snsRedEnvelops: + properties: + reportId: + type: integer + reportKey: + type: integer + resourceId: + type: integer + rewardCount: + type: integer + rewardUserList: + items: {} + type: array + type: object + username: + type: string + weAppInfo: + properties: + appId: + type: integer + mapPoiId: + type: string + redirectUrl: + type: string + score: + type: integer + showType: + type: integer + userName: + type: string + type: object + withUserCount: + type: integer + withUserList: + items: {} + type: array + withUserListCount: + type: integer + type: object + type: object + core.CreateChatRoomByProtocolResponseData: + properties: + baseResponse: + properties: + errMsg: + properties: + string: + type: string + type: object + ret: + type: integer + type: object + bigHeadImgUrl: + type: string + chatRoomName: + properties: + string: + type: string + type: object + imgBuf: + properties: + buffer: + type: string + iLen: + type: integer + type: object + memberCount: + type: integer + memberList: + items: + properties: + city: + type: string + contactType: + type: integer + country: + type: string + memberName: + properties: + string: + type: string + type: object + memberStatus: + type: integer + nickName: + properties: + string: + type: string + type: object + personalCard: + type: integer + province: + type: string + pyInitial: + properties: + string: + type: string + type: object + quanPin: + properties: + string: + type: string + type: object + remark: + type: object + remarkPYInitial: + type: object + remarkQuanPin: + type: object + sex: + type: integer + signature: + type: string + verifyFlag: + type: integer + verifyInfo: + type: string + type: object + type: array + pyInitial: + type: object + quanPin: + type: object + smallHeadImgUrl: + type: string + topic: + type: object + type: object + core.CreateRoomRequest: + properties: + wxids: + items: + type: string + type: array + type: object + core.DecryptImgRequest: + properties: + dest_file: + type: string + src_file: + type: string + type: object + core.DelChatRoomMemberRequest: + properties: + member_list: + items: + type: string + type: array + room_wxid: + type: string + type: object + core.DelChatRoomRequest: + properties: + room_wxid: + type: string + type: object + core.DeleteTagRequest: + properties: + label_id: + type: integer + type: object + core.DeleteTagResponseData: + properties: + baseResponse: + properties: + errMsg: + type: object + ret: + type: integer + type: object + type: object + core.EditChatRoomMemberRequest: + properties: + name: + type: string + room_wxid: + type: string + type: object + core.EditChatRoomNoticeRequest: + properties: + notice: + type: string + room_wxid: + type: string + type: object + core.EditFriendRemarkRequest: + properties: + remark: + type: string + wxid: + type: string + type: object + core.EditRoomMineNickNameRequest: + properties: + nickname: + type: string + room_wxid: + type: string + type: object + core.ForwardMsgRequest: + properties: + msgid: + type: string + to_wxid: + type: string + type: object + core.GetA8KeyRequest: + properties: + scene: + type: integer + url: + type: string + type: object + core.GetA8KeyResponseData: + properties: + a8Key: + type: string + actionCode: + type: integer + antispamTicket: + type: string + baseResponse: + properties: + errMsg: + type: object + ret: + type: integer + type: object + content: + type: string + cookie: + properties: + buffer: + type: string + iLen: + type: integer + type: object + deepLinkBitSet: + properties: + bitValue: + type: string + type: object + fullUrl: + type: string + generalControlBitSet: + properties: + bitValue: + type: integer + type: object + headImg: + type: string + httpHeaderCount: + type: integer + httpHeaderList: + items: + properties: + key: + type: string + value: + type: string + type: object + type: array + jsapicontrolBytes: + properties: + buffer: + type: string + iLen: + type: integer + type: object + jsapipermission: + properties: + bitValue: + type: integer + bitValue2: + type: integer + bitValue3: + type: integer + bitValue4: + type: integer + type: object + menuWording: + type: string + mid: + type: string + scopeCount: + type: integer + scopeList: + items: {} + type: array + shareUrl: + type: string + ssid: + type: string + title: + type: string + userName: + type: string + wording: + type: string + type: object + core.GetChatRoomListResponseDataItem: + properties: + avatar: + type: string + is_manager: + type: integer + manager_wxid: + type: string + member_list: + items: + type: string + type: array + nickname: + type: string + remark: + type: string + total_member: + type: integer + wxid: + type: string + type: object + core.GetChatRoomMemberListResponseData: + properties: + extend: + type: string + group_wxid: + type: string + member_list: + items: + properties: + account: + type: string + avatar: + type: string + city: + type: string + country: + type: string + display_name: + type: string + nickname: + type: string + province: + type: string + remark: + type: string + sex: + type: integer + wxid: + type: string + type: object + type: array + total: + type: integer + type: object + core.GetCollectListResponseData: + properties: + items: + items: + properties: + from_user: + type: string + local_id: + type: integer + room_member: + type: string + title: + type: string + type: + type: integer + update_time: + type: integer + xml: + type: string + type: object + type: array + status: + type: integer + type: object + core.GetFriendBriefInfoByProtocolResponseData: + properties: + account: + type: string + avatar: + type: string + city: + type: string + country: + type: string + nickname: + type: string + province: + type: string + remark: + type: string + sex: + type: integer + signature: + type: string + small_avatar: + type: string + sns_pic: + type: string + source_type: + type: integer + status: + type: integer + v1: + type: string + v2: + type: string + wxid: + type: string + type: object + core.GetFriendDetailInfoByProtocolResponseDataContactListItem: + properties: + addContactScene: + type: integer + additionalContactList: + properties: + linkedinContactItem: + type: object + type: object + albumBgImgId: + type: string + albumFlag: + type: integer + albumStyle: + type: integer + alias: + type: string + bigHeadImgUrl: + type: string + bitMask: + type: integer + bitVal: + type: integer + cardImgUrl: + type: string + chatRoomData: + type: string + chatRoomNotify: + type: integer + chatRoomOwner: + type: string + chatroomInfoVersion: + type: integer + chatroomMaxCount: + type: integer + chatroomType: + type: integer + chatroomVersion: + type: integer + city: + type: string + contactType: + type: integer + country: + type: string + customizedInfo: + properties: + brandFlag: + type: integer + brandIconURL: + type: string + brandInfo: + type: string + externalInfo: + type: string + type: object + deleteFlag: + type: integer + description: + type: string + domainList: + type: object + encryptUserName: + type: string + extInfo: + type: string + hasWeiXinHdHeadImg: + type: integer + headImgMd5: + type: string + idcardNum: + type: string + imgBuf: + properties: + buffer: + type: string + iLen: + type: integer + type: object + imgFlag: + type: integer + labelIdList: + type: string + level: + type: integer + mobileFullHash: + type: string + mobileHash: + type: string + myBrandList: + type: string + newChatroomData: + properties: + chatRoomMemberList: + items: {} + type: array + infoMask: + type: integer + memberCount: + type: integer + type: object + nickName: + properties: + string: + type: string + type: object + personalCard: + type: integer + phoneNumListInfo: + properties: + count: + type: integer + phoneNumList: + items: {} + type: array + type: object + province: + type: string + pyInitial: + properties: + string: + type: string + type: object + quanPin: + properties: + string: + type: string + type: object + realName: + type: string + remark: + type: object + remarkPYInitial: + type: object + remarkQuanPin: + type: object + roomInfoCount: + type: integer + roomInfoList: + items: {} + type: array + sex: + type: integer + signature: + type: string + smallHeadImgUrl: + type: string + snsUserInfo: + properties: + snsBgImgId: + type: string + snsBgObjectId: + type: string + snsFlag: + type: integer + snsFlagEx: + type: integer + type: object + source: + type: integer + userName: + properties: + string: + type: string + type: object + verifyContent: + type: string + verifyFlag: + type: integer + verifyInfo: + type: string + weiDianInfo: + type: string + weibo: + type: string + weiboFlag: + type: integer + weiboNickname: + type: string + type: object + core.GetFriendListResponseDateItem: + properties: + account: + description: 微信账号,友情的直接连线 + type: string + avatar: + description: 头像的风景画,好友的形象代言 + type: string + city: + description: 都市的温馨角落,好友的日常坐标 + type: string + country: + description: 国界的另一端,好友的远方故事 + type: string + labelid_list: + description: 标签的彩虹桥,连接不同朋友圈的密码 + type: string + nickname: + description: 昵称的诗篇,好友的个性签名 + type: string + province: + description: 省份的风土人情,好友的地域色彩 + type: string + remark: + description: 备注的小秘密,只有你知道的代号 + type: string + sex: + description: 性别的罗盘,1为蓝海,2为红颜 + type: integer + wxid: + description: 微信ID,好友的唯一坐标 + type: string + type: object + core.GetFriendMomentRequest: + properties: + first_page_md5: + type: string + max_id: + type: string + username: + type: string + type: object + core.GetFriendMomentResponseData: + properties: + baseResponse: + properties: + errMsg: + type: object + ret: + type: integer + type: object + continueId: + type: string + firstPageMd5: + type: string + limitedId: + type: string + newRequestTime: + type: integer + objectCount: + type: integer + objectCountForSameMd5: + type: integer + objectList: + items: {} + type: array + objectTotalCount: + type: integer + retTips: + type: string + serverConfig: + properties: + copyAndPasteWordLimit: + type: integer + postMentionLimit: + type: integer + type: object + snsUserInfo: + properties: + snsBgImgId: + type: string + snsBgObjectId: + type: string + snsFlag: + type: integer + snsFlagEx: + type: integer + type: object + type: object + core.GetLoginUserInfoResponseData: + properties: + account: + type: string + avatar: + type: string + nickname: + type: string + phone: + type: string + pid: + type: integer + unread_msg_count: + type: integer + wx_user_dir: + type: string + wxid: + type: string + type: object + core.GetMiniProgramCodeRequest: + properties: + appid: + type: string + type: object + core.GetMiniProgramCodeResponseData: + properties: + appIconUrl: + type: string + appName: + type: string + baseResponse: + properties: + errMsg: + properties: + string: + type: string + type: object + ret: + type: integer + type: object + code: + type: string + jsApiBaseResponse: + properties: + errcode: + type: integer + errmsg: + type: string + type: object + liftSpan: + type: integer + openId: + type: string + scopeList: + items: {} + type: array + sessionKey: + type: string + sessionTicket: + type: string + signature: + type: string + state: + type: string + type: object + core.GetMomentRequest: + properties: + max_id: + type: string + type: object + core.GetPublicUserListResponseData: + properties: + avatar: + type: string + nickname: + type: string + wxid: + type: string + type: object + core.GetRoomMemberInviteListResponseData: + properties: + member_list: + items: + properties: + avatar: + type: string + flag: + type: integer + invite_by: + type: string + nickname: + type: string + wxid: + type: string + type: object + type: array + room_wxid: + type: string + type: object + core.GetTagListByWxidRequest: + properties: + wxid: + type: string + type: object + core.GetTagListByWxidResponseData: + properties: + labelid_list: + type: string + wxid: + type: string + type: object + core.GetTagListResponseDataItem: + properties: + label_id: + type: string + label_name: + type: string + type: object + core.GetWorkWxChatRoomMemberRequest: + properties: + room_wxid: + type: string + type: object + core.GetWorkWxChatRoomMemberResponseData: + properties: + member_list: + items: + properties: + avatar: + type: string + nickname: + type: string + sex: + type: integer + wxid: + type: string + type: object + type: array + room_wxid: + type: string + type: object + core.GetWorkWxRoomListResponseDataItem: + properties: + avatar: + type: string + manager_wxid: + type: string + nickname: + type: string + room_wxid: + type: string + total_member: + type: integer + type: object + core.GetWorkWxUserListResponseDataItem: + properties: + avatar: + type: string + nickname: + type: string + sex: + type: integer + wxid: + type: string + type: object + core.HttpCallBackRequest: + properties: + timeout: + description: 默认5秒 + type: integer + url: + type: string + type: object + core.InviteToRoomRequest: + properties: + member_list: + items: + type: string + type: array + room_wxid: + type: string + type: object + core.InviteToRoomResponseData: + properties: + baseResponse: + properties: + errMsg: + properties: + string: + type: string + type: object + ret: + type: integer + type: object + memberCount: + type: integer + memberList: + items: + properties: + city: + type: string + contactType: + type: integer + country: + type: string + memberName: + properties: + string: + type: string + type: object + memberStatus: + type: integer + nickName: + properties: + string: + type: string + type: object + personalCard: + type: integer + province: + type: string + pyInitial: + properties: + string: + type: string + type: object + quanPin: + properties: + string: + type: string + type: object + remark: + type: object + remarkPYInitial: + type: object + remarkQuanPin: + type: object + sex: + type: integer + signature: + type: string + verifyFlag: + type: integer + verifyInfo: + type: string + type: object + type: array + type: object + core.LikeMomentRequest: + properties: + object_id: + type: string + type: object + core.LikeMomentResponseData: + properties: + baseResponse: + properties: + errMsg: + type: object + ret: + type: integer + type: object + snsObject: + properties: + blackList: + items: {} + type: array + blackListCount: + type: integer + commentCount: + type: integer + commentUserList: + items: + properties: + commentFlag: + type: integer + commentId: + type: integer + commentId2: + type: string + content: + type: string + createTime: + type: integer + deleteFlag: + type: integer + isNotRichText: + type: integer + nickname: + type: string + replyCommentId: + type: integer + replyCommentId2: + type: string + replyUsername: + type: string + source: + type: integer + type: + type: integer + username: + type: string + type: object + type: array + commentUserListCount: + type: integer + createTime: + type: integer + deleteFlag: + type: integer + extFlag: + type: integer + groupCount: + type: integer + groupList: + items: {} + type: array + groupUser: + items: {} + type: array + groupUserCount: + type: integer + id: + type: string + isNotRichText: + type: integer + likeCount: + type: integer + likeFlag: + type: integer + likeUserList: + items: + properties: + commentFlag: + type: integer + commentId: + type: integer + commentId2: + type: string + content: + type: string + createTime: + type: integer + deleteFlag: + type: integer + isNotRichText: + type: integer + nickname: + type: string + replyCommentId: + type: integer + replyCommentId2: + type: string + replyUsername: + type: string + source: + type: integer + type: + type: integer + username: + type: string + type: object + type: array + likeUserListCount: + type: integer + nickname: + type: string + noChange: + type: integer + objectDesc: + properties: + buffer: + type: string + iLen: + type: integer + type: object + objectOperations: + properties: + buffer: + type: string + iLen: + type: integer + type: object + preDownloadInfo: + properties: + noPreDownloadRange: + type: string + preDownloadNetType: + type: integer + preDownloadPercent: + type: integer + type: object + referId: + type: string + referUsername: + type: string + snsRedEnvelops: + properties: + reportId: + type: integer + reportKey: + type: integer + resourceId: + type: integer + rewardCount: + type: integer + rewardUserList: + items: {} + type: array + type: object + username: + type: string + weAppInfo: + properties: + appId: + type: integer + mapPoiId: + type: string + redirectUrl: + type: string + score: + type: integer + showType: + type: integer + userName: + type: string + type: object + withUserCount: + type: integer + withUserList: + items: {} + type: array + withUserListCount: + type: integer + type: object + type: object + core.LiveEnterRequest: + properties: + live_id: + type: string + object_id: + type: string + object_nonce_id: + type: string + type: object + core.LiveGetOnlineUserRequest: + properties: + last_buff: + type: string + live_id: + type: string + object_id: + type: string + object_nonce_id: + type: string + type: object + core.LiveGetShelfRequest: + properties: + live_username: + type: string + request_id: + type: string + type: object + core.LiveSendMsgRequest: + properties: + content: + type: string + type: object + core.ModifyTagRequest: + properties: + label_id: + type: integer + label_name: + type: string + type: object + core.RefreshLoginQrCodeResponseData: + properties: + file: + type: string + pid: + type: integer + qrcode: + type: string + type: object + core.RoomShowNickNameRequest: + properties: + room_wxid: + type: string + status: + description: 1显示 0隐藏 + type: integer + type: object + core.SaveRoomSaveToContactRequest: + properties: + room_wxid: + type: string + status: + description: 1保存 2移出 + type: integer + type: object + core.SearchWxUserResponseData: + properties: + account: + type: string + avatar: + type: string + city: + type: string + country: + type: string + keyword: + type: string + nickname: + type: string + provice: + type: string + search: + type: string + sex: + type: integer + signature: + type: string + small_avatar: + type: string + status: + type: integer + v1: + type: string + v2: + type: string + wxid: + type: string + type: object + core.SendCardMsgRequest: + properties: + card_wxid: + type: string + to_wxid: + type: string + type: object + core.SendCollectMsgByMsgIdRequest: + properties: + msgid: + type: string + type: object + core.SendCollectRequest: + properties: + local_id: + type: integer + to_wxid: + type: string + type: object + core.SendFileMsgRequest: + properties: + file: + type: string + to_wxid: + type: string + type: object + core.SendGifMsgRequest: + properties: + file: + type: string + to_wxid: + type: string + type: object + core.SendImageMsgRequest: + properties: + file: + description: 例如 "C:\\a.jpg" + type: string + to_wxid: + type: string + type: object + core.SendLinkMsgRequest: + properties: + desc: + type: string + image_url: + type: string + title: + type: string + to_wxid: + type: string + url: + type: string + type: object + core.SendMomentRequest: + properties: + object_desc: + type: string + type: object + core.SendMomentResponseData: + properties: + baseResponse: + properties: + errMsg: + type: object + ret: + type: integer + type: object + snsObject: + properties: + blackList: + items: {} + type: array + blackListCount: + type: integer + commentCount: + type: integer + commentUserList: + items: {} + type: array + commentUserListCount: + type: integer + createTime: + type: integer + deleteFlag: + type: integer + extFlag: + type: integer + groupCount: + type: integer + groupList: + items: {} + type: array + groupUser: + items: {} + type: array + groupUserCount: + type: integer + id: + type: string + isNotRichText: + type: integer + likeCount: + type: integer + likeFlag: + type: integer + likeUserList: + items: {} + type: array + likeUserListCount: + type: integer + nickname: + type: string + noChange: + type: integer + objectDesc: + properties: + buffer: + type: string + iLen: + type: integer + type: object + objectOperations: + properties: + buffer: + type: string + iLen: + type: integer + type: object + preDownloadInfo: + properties: + noPreDownloadRange: + type: string + preDownloadNetType: + type: integer + preDownloadPercent: + type: integer + type: object + referId: + type: string + referUsername: + type: string + snsRedEnvelops: + properties: + reportId: + type: integer + reportKey: + type: integer + resourceId: + type: integer + rewardCount: + type: integer + rewardUserList: + items: {} + type: array + type: object + username: + type: string + weAppInfo: + properties: + appId: + type: integer + mapPoiId: + type: string + redirectUrl: + type: string + score: + type: integer + showType: + type: integer + userName: + type: string + type: object + withUserCount: + type: integer + withUserList: + items: {} + type: array + withUserListCount: + type: integer + type: object + spamTips: + type: string + type: object + core.SendTextMsgRequest: + properties: + at_list: + description: 群消息时候使用 "notify@all" @所有人 + items: + type: string + type: array + content: + type: string + to_wxid: + type: string + type: object + core.SendVideoMsgRequest: + properties: + file: + type: string + to_wxid: + type: string + type: object + core.SendXmlMsgRequest: + properties: + to_wxid: + type: string + xml: + type: string + type: object + core.SwitchSessionRequest: + properties: + to_wxid: + type: string + type: object + core.UploadMomentImageRequest: + properties: + path: + type: string + type: object + core.UploadMomentImageResponseData: + properties: + baseResponse: + properties: + ret: + type: integer + type: object + bufferUrl: + properties: + type: + type: integer + url: + type: string + type: object + clientId: + type: string + id: + type: integer + startPos: + type: integer + thumbUrlCount: + type: integer + thumbUrls: + items: + properties: + type: + type: integer + url: + type: string + type: object + type: array + totalLen: + type: integer + type: + type: integer + type: object + core.VideoMomentCreateVirtualNickNameRequest: + properties: + headimg_url: + type: string + nickname: + type: string + type: object + core.VideoMomentFollowRequest: + properties: + username: + type: string + type: object + core.VideoMomentFollowResponseData: + properties: + baseResponse: + properties: + errMsg: + properties: + string: + type: string + type: object + ret: + type: integer + type: object + contact: + properties: + archievementInfo: + type: object + authInfo: + properties: + appName: + type: string + authGuarantor: + type: object + authIconType: + type: integer + authIconUrl: + type: string + authProfession: + type: string + authVerifyIdentity: + type: integer + customerType: + type: integer + detailLink: + type: string + realName: + type: string + verifyStatus: + type: integer + type: object + bindInfo: + items: {} + type: array + coverEntranceFlag: + type: integer + coverImgUrl: + type: string + coverUrl: + type: string + extFlag: + type: integer + extInfo: + properties: + birthDay: + type: integer + birthMonth: + type: integer + birthYear: + type: integer + city: + type: string + country: + type: string + province: + type: string + sex: + type: integer + type: object + fansCount: + type: integer + feedCount: + type: integer + followFlag: + type: integer + followTime: + type: integer + foreignUserFlag: + type: integer + friendFollowCount: + type: integer + guestInfo: + type: object + headUrl: + type: string + liveCoverImgUrl: + type: string + liveInfo: + properties: + anchorStatusFlag: + type: string + lotterySetting: + properties: + attendType: + type: integer + settingFlag: + type: string + type: object + micSetting: + properties: + settingFlag: + type: string + settingSwitchFlag: + type: string + type: object + switchFlag: + type: integer + type: object + liveNoticeInfo: + type: object + liveStatus: + type: integer + loggingoutWording: + type: string + menu: + items: {} + type: array + msgInfo: + type: object + nickname: + type: string + oneTimeFlag: + type: integer + originalEntranceFlag: + type: integer + originalFlag: + type: integer + originalInfo: + type: object + seq: + type: integer + signature: + type: string + spamStatus: + type: integer + userFlag: + type: integer + userMode: + type: integer + username: + type: string + vestNickname: + type: string + wxUsernameV5: + type: string + type: object + liveStatusFlag: + type: integer + type: object + core.VideoMomentGetSessionIdRequest: + properties: + roleType: + type: integer + to_username: + type: string + type: object + core.VideoMomentGetSessionIdResponseData: + properties: + baseResponse: + properties: + errMsg: + type: object + ret: + type: integer + type: object + enableAction: + type: integer + sessionId: + type: string + sessionInfo: + properties: + enableAction: + type: integer + msgExtInfo: + type: string + rejectMsg: + type: integer + sessionId: + type: string + toUsername: + type: string + type: object + toUsername: + type: string + type: object + core.VideoMomentInitResponseData: + properties: + aliasInfo: + items: + properties: + aliasMsgName: + type: string + aliasVersion: + type: integer + headImgUrl: + type: string + nickname: + type: string + roleType: + type: integer + type: object + type: array + baseResponse: + properties: + errMsg: + properties: + string: + type: string + type: object + ret: + type: integer + type: object + cmdlist: + items: {} + type: array + continueFlag: + type: integer + currentAliasRoleType: + type: integer + finderUsernameList: + items: + properties: + finderUsernameList: + type: string + type: object + type: array + keybuf: + properties: + buffer: + type: string + iLen: + type: integer + type: object + myacct: + items: + properties: + archievementInfo: + type: object + authInfo: + type: object + bindInfo: + items: {} + type: array + coverEntranceFlag: + type: integer + coverImgUrl: + type: string + coverUrl: + type: string + extFlag: + type: integer + extInfo: + properties: + birthDay: + type: integer + birthMonth: + type: integer + birthYear: + type: integer + city: + type: string + country: + type: string + province: + type: string + sex: + type: integer + type: object + fansCount: + type: integer + feedCount: + type: integer + followFlag: + type: integer + followTime: + type: integer + foreignUserFlag: + type: integer + friendFollowCount: + type: integer + guestInfo: + type: object + headUrl: + type: string + liveCoverImgUrl: + type: string + liveInfo: + properties: + anchorStatusFlag: + type: string + lotterySetting: + type: object + micSetting: + properties: + settingFlag: + type: string + settingSwitchFlag: + type: string + type: object + switchFlag: + type: integer + type: object + liveNoticeInfo: + type: object + liveStatus: + type: integer + loggingoutWording: + type: string + menu: + items: {} + type: array + msgInfo: + type: object + nickname: + type: string + oneTimeFlag: + type: integer + originalEntranceFlag: + type: integer + originalFlag: + type: integer + originalInfo: + properties: + postNeedCheckFlag: + type: integer + punishYearFlag: + type: integer + restApplyOriginalCount: + type: integer + restPunishDay: + type: integer + restRepostCount: + type: integer + type: object + seq: + type: string + signature: + type: string + spamStatus: + type: integer + userFlag: + type: integer + userMode: + type: integer + username: + type: string + vestNickname: + type: string + wxUsernameV5: + type: string + type: object + type: array + nextAliasModAvailableTime: + type: string + retryDelaySecond: + type: integer + ringtoneConfig: + type: object + slideUpGuideConfig: + items: {} + type: array + tabInfos: + items: + properties: + displayTabType: + type: integer + tabName: + type: string + type: object + type: array + teenmodeSetting: + type: object + teenmodeTipsConfig: + type: object + userNotCreatedFlag: + type: integer + userver: + type: integer + userverForH5: + type: integer + wxPersonalizedSetting: + type: object + wxUserAttr: + properties: + notAvailableFlag: + type: integer + wording: + type: string + type: object + wxUsernameForH5: + type: string + type: object + core.VideoMomentLikeRequest: + properties: + object_id: + type: string + object_nonce_id: + type: string + type: object + core.VideoMomentLikeResponseData: + properties: + baseResponse: + properties: + errMsg: + properties: + string: + type: string + type: object + ret: + type: integer + type: object + likeid: + type: integer + type: object + core.VideoMomentSearchRequest: + properties: + last_buff: + type: string + query: + type: string + scene: + type: integer + type: object + core.VideoMomentSendMsgRequest: + properties: + content: + type: string + session_id: + type: string + to_username: + type: string + type: object + core.VideoMomentSendMsgResponseData: + properties: + baseResponse: + properties: + errMsg: + properties: + string: + type: string + type: object + ret: + type: integer + type: object + newmsgid: + type: integer + type: object + core.VideoMomentSwitchVirtualNickNameRequest: + properties: + role_type: + type: integer + type: object + core.VideoMomentUserHomeRequest: + properties: + last_buff: + type: string + username: + type: string + type: object + core.VideoMomentVideoDetailRequest: + properties: + last_buff: + type: string + object_id: + type: string + object_nonce_id: + type: string + type: object + core.VoiceToTextRequest: + properties: + msgid: + type: string + type: object + core.VoiceToTextResponseData: + properties: + from_wxid: + type: string + msgid: + type: string + room_wxid: + type: string + status: + type: integer + text: + type: string + to_wxid: + type: string + wx_type: + type: integer + type: object + core.WorkWxCdnDownloadRequest: + properties: + aes_key: + type: string + auth_key: + type: string + save_path: + type: string + url: + type: string + type: object + core.WorkWxCdnDownloadResponseData: + properties: + error_code: + type: integer + save_path: + type: string + type: object +info: + contact: {} + description: 微信hook接口文档 + title: WxHelper API + version: 3.9.10.19 +paths: + /api/v1/cdn/download: + post: + consumes: + - application/json + description: CDN下载接口 + parameters: + - description: 下载数据 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNDownloadRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNDownloadResponseData' + type: object + summary: CDN下载 + tags: + - CDN + /api/v1/cdn/initial: + post: + consumes: + - application/json + description: CDN初始化接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNInitialResponseData' + type: object + summary: CDN初始化 + tags: + - CDN + /api/v1/cdn/send/card: + post: + consumes: + - application/json + description: 发送名片消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendCardMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendCardMsgResponseData' + type: object + summary: 发送名片消息 + tags: + - CDN发送消息 + /api/v1/cdn/send/card_link: + post: + consumes: + - application/json + description: 发送卡片链接消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendCardLinkMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendCardLinkMsgResponseData' + type: object + summary: 发送卡片链接消息 + tags: + - CDN发送消息 + /api/v1/cdn/send/file: + post: + consumes: + - application/json + description: 发送文件消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendFileMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendFileMsgResponseData' + type: object + summary: 发送文件消息 + tags: + - CDN发送消息 + /api/v1/cdn/send/gif: + post: + consumes: + - application/json + description: 发送GIF消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendGifMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendGifMsgResponseData' + type: object + summary: 发送GIF消息 + tags: + - CDN发送消息 + /api/v1/cdn/send/gif_new: + post: + consumes: + - application/json + description: 发送GIF消息(新)接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendGifMsgNewRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendGifMsgNewResponseData' + type: object + summary: 发送GIF消息(新) + tags: + - CDN发送消息 + /api/v1/cdn/send/image: + post: + consumes: + - application/json + description: 发送图片消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendImageMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendImageMsgResponseData' + type: object + summary: 发送图片消息 + tags: + - CDN发送消息 + /api/v1/cdn/send/location: + post: + consumes: + - application/json + description: 发送位置消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendLocationMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendLocationMsgResponseData' + type: object + summary: 发送位置消息 + tags: + - CDN发送消息 + /api/v1/cdn/send/mini_program: + post: + consumes: + - application/json + description: 发送小程序消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendMiniProgramMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendMiniProgramMsgResponseData' + type: object + summary: 发送小程序消息 + tags: + - CDN发送消息 + /api/v1/cdn/send/revoke: + post: + consumes: + - application/json + description: 发送撤回消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendRevokeMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendRevokeMsgResponseData' + type: object + summary: 发送撤回消息 + tags: + - CDN发送消息 + /api/v1/cdn/send/text: + post: + consumes: + - application/json + description: 发送文本消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendTextMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendTextMsgResponseData' + type: object + summary: 发送文本消息 + tags: + - CDN发送消息 + /api/v1/cdn/send/video: + post: + consumes: + - application/json + description: 发送视频消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendVideoMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendVideoMsgResponseData' + type: object + summary: 发送视频消息 + tags: + - CDN发送消息 + /api/v1/cdn/send/video_number: + post: + consumes: + - application/json + description: 发送视频号消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendVideoMomentMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendVideoMomentMsgResponseData' + type: object + summary: 发送视频号消息 + tags: + - CDN发送消息 + /api/v1/cdn/send/xml: + post: + consumes: + - application/json + description: 发送xml消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNSendXmlMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNSendXmlMsgResponseData' + type: object + summary: 发送xml消息 + tags: + - CDN发送消息 + /api/v1/cdn/upload: + post: + consumes: + - application/json + description: CDN上传接口 + parameters: + - description: 上传数据 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CDNUploadRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CDNUploadResponseData' + type: object + summary: CDN上传 + tags: + - CDN + /api/v1/cdn/workwx/download: + post: + consumes: + - application/json + description: 企业微信CDN下载接口 + parameters: + - description: 下载数据 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.WorkWxCdnDownloadRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.WorkWxCdnDownloadResponseData' + type: object + summary: 企业微信CDN下载 + tags: + - CDN + /api/v1/collect/list: + get: + consumes: + - application/json + description: 获取收藏列表接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.GetCollectListResponseData' + type: object + summary: 获取收藏列表 + tags: + - 收藏 + /api/v1/collect/send: + post: + consumes: + - application/json + description: 发送收藏(旧)接口 + parameters: + - description: 收藏信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SendCollectRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 发送收藏(旧) + tags: + - 收藏 + /api/v1/collect/send/msgid: + post: + consumes: + - application/json + description: 收藏指定消息(旧)接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SendCollectMsgByMsgIdRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 收藏指定消息(旧) + tags: + - 收藏 + /api/v1/contact/accept/wc_pay/auto: + post: + consumes: + - application/json + description: 自动接收好友转账接口 + parameters: + - description: 自动接收好友转账 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.AutoAcceptWCPayRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 自动接收好友转账 + tags: + - 联系人 + /api/v1/contact/friend/{wxid}: + get: + consumes: + - application/json + description: 获取单个好友信息接口 + parameters: + - description: 微信ID + in: path + name: wxid + required: true + type: string + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.GetFriendListResponseDateItem' + type: object + summary: 获取单个好友信息 + tags: + - 联系人 + /api/v1/contact/friend/accept: + post: + consumes: + - application/json + description: 通过好友申请接口 + parameters: + - description: 通过好友申请信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.AcceptFriendRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 通过好友申请 + tags: + - 联系人 + /api/v1/contact/friend/add: + post: + consumes: + - application/json + description: 通过群聊加好友-发送好友申请接口 + parameters: + - description: 添加好友信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.AddFriendRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 通过群聊加好友-发送好友申请 + tags: + - 联系人 + /api/v1/contact/friend/add/auto: + post: + consumes: + - application/json + description: 自动同意好友申请接口 + parameters: + - description: 自动加好友 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.AutoAcceptAddFriendRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 自动同意好友申请 + tags: + - 联系人 + /api/v1/contact/friend/add/search: + post: + consumes: + - application/json + description: 添加搜索微信用户为好友接口 + parameters: + - description: 添加搜索微信用户为好友信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.AddSearchWxUserRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 添加搜索微信用户为好友 + tags: + - 联系人 + /api/v1/contact/friend/card/auto: + post: + consumes: + - application/json + description: 自动接收名片接口 + parameters: + - description: 自动接收名片 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.AutoAcceptCardRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 自动接收名片 + tags: + - 联系人 + /api/v1/contact/friend/check/{wxid}: + post: + consumes: + - application/json + description: 检测好友状态(发送无痕清粉消息)接口 + parameters: + - description: 微信ID + in: path + name: wxid + required: true + type: string + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 检测好友状态(发送无痕清粉消息) + tags: + - 联系人 + /api/v1/contact/friend/delete/{wxid}: + post: + consumes: + - application/json + description: 删除好友接口 + parameters: + - description: 微信ID + in: path + name: wxid + required: true + type: string + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 删除好友 + tags: + - 联系人 + /api/v1/contact/friend/list: + get: + consumes: + - application/json + description: 获取好友列表接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + items: + $ref: '#/definitions/core.GetFriendListResponseDateItem' + type: array + type: object + summary: 获取好友列表 + tags: + - 联系人 + /api/v1/contact/friend/protocol/brief/{wxid}: + get: + consumes: + - application/json + description: 获取好友简要信息(协议)接口 + parameters: + - description: 微信ID + in: path + name: wxid + required: true + type: string + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.GetFriendBriefInfoByProtocolResponseData' + type: object + summary: 获取好友简要信息(协议) + tags: + - 联系人 + /api/v1/contact/friend/protocol/detail: + post: + consumes: + - application/json + description: 批量获取好友详细信息(协议)接口 + parameters: + - description: 微信ID列表 + in: body + name: body + required: true + schema: + items: + type: string + type: array + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + items: + $ref: '#/definitions/core.GetFriendDetailInfoByProtocolResponseDataContactListItem' + type: array + type: object + summary: 批量获取好友详细信息(协议) + tags: + - 联系人 + /api/v1/contact/friend/protocol/detail/{wxid}: + get: + consumes: + - application/json + description: 获取微信好友详细信息(协议)接口 + parameters: + - description: 微信ID + in: path + name: wxid + required: true + type: string + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + items: + $ref: '#/definitions/core.GetFriendDetailInfoByProtocolResponseDataContactListItem' + type: array + type: object + summary: 获取微信好友详细信息(协议) + tags: + - 联系人 + /api/v1/contact/friend/remark: + post: + consumes: + - application/json + description: 编辑好友备注接口 + parameters: + - description: 好友备注信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.EditFriendRemarkRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 编辑好友备注 + tags: + - 联系人 + /api/v1/contact/friend/search: + get: + consumes: + - application/json + description: 搜索微信用户接口 + parameters: + - description: 搜索字符串 + in: query + name: keyword + required: true + type: string + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + items: + $ref: '#/definitions/core.SearchWxUserResponseData' + type: array + type: object + summary: 搜索微信用户 + tags: + - 联系人 + /api/v1/contact/public/list: + get: + consumes: + - application/json + description: 获取公众号列表接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + items: + $ref: '#/definitions/core.GetPublicUserListResponseData' + type: array + type: object + summary: 获取公众号列表 + tags: + - 联系人 + /api/v1/contact/room/accept/auto: + post: + consumes: + - application/json + description: 自动接受群邀请接口 + parameters: + - description: 自动接受群邀请 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.AutoAcceptRoomRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 自动接受群邀请 + tags: + - 群管理 + /api/v1/contact/room/create: + post: + consumes: + - application/json + description: 创建群聊接口 + parameters: + - description: 微信ID列表 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CreateRoomRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 创建群聊 + tags: + - 群管理 + /api/v1/contact/room/delete: + post: + consumes: + - application/json + description: 退出群聊接口 + parameters: + - description: 推出的群聊 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.DelChatRoomRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 退出群聊 + tags: + - 群管理 + /api/v1/contact/room/friend/add: + post: + consumes: + - application/json + description: 添加群成员为好友接口 + parameters: + - description: 添加好友信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.AddFriendRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 添加群成员为好友 + tags: + - 群管理 + /api/v1/contact/room/list: + get: + consumes: + - application/json + description: 获取群列表接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + items: + $ref: '#/definitions/core.GetChatRoomListResponseDataItem' + type: array + type: object + summary: 获取群列表 + tags: + - 群管理 + /api/v1/contact/room/member/delete: + post: + consumes: + - application/json + description: 踢除群成员接口 + parameters: + - description: 成员信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.DelChatRoomMemberRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 踢除群成员 + tags: + - 群管理 + /api/v1/contact/room/member/invite: + post: + consumes: + - application/json + description: 邀请好友进群接口 + parameters: + - description: 邀请信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.InviteToRoomRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.InviteToRoomResponseData' + type: object + summary: 邀请好友进群 + tags: + - 群管理 + /api/v1/contact/room/member/list/{roomWxid}: + get: + consumes: + - application/json + description: 获取群成员列表接口 + parameters: + - description: 微信群ID + in: path + name: roomWxid + required: true + type: string + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.GetChatRoomMemberListResponseData' + type: object + summary: 获取群成员列表 + tags: + - 群管理 + /api/v1/contact/room/member/nickname/show: + post: + consumes: + - application/json + description: 是否显示群成员昵称接口 + parameters: + - description: 昵称信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.RoomShowNickNameRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 是否显示群成员昵称 + tags: + - 群管理 + /api/v1/contact/room/mine/nickname/modify: + post: + consumes: + - application/json + description: 修改我在本群的昵称接口 + parameters: + - description: 昵称信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.EditRoomMineNickNameRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 修改我在本群的昵称 + tags: + - 群管理 + /api/v1/contact/room/name/modify: + post: + consumes: + - application/json + description: 修改群聊名称接口 + parameters: + - description: 成员信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.EditChatRoomMemberRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 修改群聊名称 + tags: + - 群管理 + /api/v1/contact/room/notice/modify: + post: + consumes: + - application/json + description: 修改群公告接口 + parameters: + - description: 公告信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.EditChatRoomNoticeRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 修改群公告 + tags: + - 群管理 + /api/v1/contact/room/protocol/create: + post: + consumes: + - application/json + description: 创建群聊(协议)接口 + parameters: + - description: 微信ID列表 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CreateRoomRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CreateChatRoomByProtocolResponseData' + type: object + summary: 创建群聊(协议) + tags: + - 群管理 + /api/v1/contact/room/protocol/detail/{roomWxid}: + get: + consumes: + - application/json + description: 获取微信群详细信息(协议)接口 + parameters: + - description: 微信群ID + in: path + name: roomWxid + required: true + type: string + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + items: + $ref: '#/definitions/core.GetFriendDetailInfoByProtocolResponseDataContactListItem' + type: array + type: object + summary: 获取微信群详细信息(协议) + tags: + - 群管理 + /api/v1/contact/room/protocol/invite/list/{roomWxid}: + get: + consumes: + - application/json + description: 获取群成员邀请关系(协议)接口 + parameters: + - description: 微信群ID + in: path + name: roomWxid + required: true + type: string + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.GetRoomMemberInviteListResponseData' + type: object + summary: 获取群成员邀请关系(协议) + tags: + - 群管理 + /api/v1/contact/room/to_contact/save: + post: + consumes: + - application/json + description: 保存到/移出通讯录接口 + parameters: + - description: 昵称信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SaveRoomSaveToContactRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 保存到/移出通讯录 + tags: + - 群管理 + /api/v1/live/enter: + post: + consumes: + - application/json + description: 进入直播间接口 + parameters: + - description: 直播间信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.LiveEnterRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 进入直播间 + tags: + - 直播 + /api/v1/live/get/change/info: + post: + consumes: + - application/json + description: 获取直播间变动信息(人气,实时发言等))接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + type: object + type: object + summary: 获取直播间变动信息(人气,实时发言等)) + tags: + - 直播 + /api/v1/live/get/online/user: + post: + consumes: + - application/json + description: 获取直播间在线用户接口 + parameters: + - description: 直播间信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.LiveGetOnlineUserRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + type: object + type: object + summary: 获取直播间在线用户 + tags: + - 直播 + /api/v1/live/get/shelf: + post: + consumes: + - application/json + description: 获取直播间货架接口 + parameters: + - description: 直播间信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.LiveGetShelfRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + type: object + type: object + summary: 获取直播间货架 + tags: + - 直播 + /api/v1/live/send/msg: + post: + consumes: + - application/json + description: 发送直播间消息接口 + parameters: + - description: 直播间信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.LiveSendMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 发送直播间消息 + tags: + - 直播 + /api/v1/login/exit: + post: + consumes: + - application/json + description: 退出微信接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 退出微信 + tags: + - 登录 + /api/v1/login/logout: + post: + consumes: + - application/json + description: 注销微信登录接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 注销微信登录 + tags: + - 登录 + /api/v1/login/qrcode/refresh: + post: + consumes: + - application/json + description: 刷新登录二维码接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.RefreshLoginQrCodeResponseData' + type: object + summary: 刷新登录二维码 + tags: + - 登录 + /api/v1/login/userinfo: + get: + consumes: + - application/json + description: 获取登录用户信息接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.GetLoginUserInfoResponseData' + type: object + summary: 获取登录用户信息 + tags: + - 登录 + /api/v1/login/version: + get: + consumes: + - application/json + description: 获取微信版本号接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 获取微信版本 + tags: + - 登录 + /api/v1/message/register_msg_http_callback: + post: + consumes: + - application/json + description: 注册消息回调接口 + parameters: + - description: 回调 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.HttpCallBackRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 注册消息回调 + tags: + - 发送消息 + /api/v1/message/send/card: + post: + consumes: + - application/json + description: 发送名片消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SendCardMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 发送名片消息 + tags: + - 发送消息 + /api/v1/message/send/file: + post: + consumes: + - application/json + description: 发送文件消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SendFileMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 发送文件消息 + tags: + - 发送消息 + /api/v1/message/send/forward: + post: + consumes: + - application/json + description: 转发任意类型消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.ForwardMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 转发任意类型消息 + tags: + - 发送消息 + /api/v1/message/send/git: + post: + consumes: + - application/json + description: 发送gif消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SendGifMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 发送gif消息 + tags: + - 发送消息 + /api/v1/message/send/image: + post: + consumes: + - application/json + description: 发送图片消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SendImageMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 发送图片消息 + tags: + - 发送消息 + /api/v1/message/send/link: + post: + consumes: + - application/json + description: 发送链接消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SendLinkMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 发送链接消息 + tags: + - 发送消息 + /api/v1/message/send/text: + post: + consumes: + - application/json + description: 发送文本消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SendTextMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 发送文本消息 + tags: + - 发送消息 + /api/v1/message/send/video: + post: + consumes: + - application/json + description: 发送视频文件消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SendVideoMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 发送视频文件消息 + tags: + - 发送消息 + /api/v1/message/send/xml: + post: + consumes: + - application/json + description: 发送XML消息接口 + parameters: + - description: 消息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SendXmlMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 发送XML消息 + tags: + - 发送消息 + /api/v1/mini/program/code: + post: + consumes: + - application/json + description: 获取小程序授权Code接口 + parameters: + - description: 小程序信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.GetMiniProgramCodeRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.GetMiniProgramCodeResponseData' + type: object + summary: 获取小程序授权Code + tags: + - 小程序 + /api/v1/moment/comment: + post: + consumes: + - application/json + description: 评论朋友圈接口 + parameters: + - description: 评论信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.CommentMomentRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.CommentMomentResponseData' + type: object + summary: 评论朋友圈 + tags: + - 朋友圈 + /api/v1/moment/friend/list: + post: + consumes: + - application/json + description: 获取好友朋友圈接口 + parameters: + - description: 好友朋友圈信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.GetFriendMomentRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.GetFriendMomentResponseData' + type: object + summary: 获取好友朋友圈 + tags: + - 朋友圈 + /api/v1/moment/like: + post: + consumes: + - application/json + description: 点赞朋友圈接口 + parameters: + - description: 点赞信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.LikeMomentRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.LikeMomentResponseData' + type: object + summary: 点赞朋友圈 + tags: + - 朋友圈 + /api/v1/moment/list: + post: + consumes: + - application/json + description: 获取朋友圈接口 + parameters: + - description: 朋友圈信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.GetMomentRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: {} + type: object + summary: 获取朋友圈 + tags: + - 朋友圈 + /api/v1/moment/send: + post: + consumes: + - application/json + description: 发送朋友圈接口 + parameters: + - description: 发送信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SendMomentRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.SendMomentResponseData' + type: object + summary: 发送朋友圈 + tags: + - 朋友圈 + /api/v1/moment/upload/image: + post: + consumes: + - application/json + description: 上传朋友圈图片接口 + parameters: + - description: 上传图片信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.UploadMomentImageRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.UploadMomentImageResponseData' + type: object + summary: 上传朋友圈图片 + tags: + - 朋友圈 + /api/v1/other/decrypt_img: + post: + consumes: + - application/json + description: 解密图片接口 + parameters: + - description: 解密图片请求 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.DecryptImgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 解密图片 + tags: + - 其他 + /api/v1/other/get_a8_key: + post: + consumes: + - application/json + description: 获取A8Key接口 + parameters: + - description: A8Key请求 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.GetA8KeyRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.GetA8KeyResponseData' + type: object + summary: 获取A8Key + tags: + - 其他 + /api/v1/tag/add: + post: + consumes: + - application/json + description: 添加标签接口 + parameters: + - description: 标签信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.AddTagRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.AddTagResponseData' + type: object + summary: 添加标签 + tags: + - 标签 + /api/v1/tag/add/user: + post: + consumes: + - application/json + description: 为用户添加标签接口 + parameters: + - description: 标签信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.AddTagToUserRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.AddTagToUserResponseData' + type: object + summary: 为用户添加标签 + tags: + - 标签 + /api/v1/tag/delete: + post: + consumes: + - application/json + description: 删除标签接口 + parameters: + - description: 标签信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.DeleteTagRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.DeleteTagResponseData' + type: object + summary: 删除标签 + tags: + - 标签 + /api/v1/tag/list: + get: + consumes: + - application/json + description: 获取标签列表接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + items: + $ref: '#/definitions/core.GetTagListResponseDataItem' + type: array + type: object + summary: 获取标签列表 + tags: + - 标签 + /api/v1/tag/list/user: + post: + consumes: + - application/json + description: 获取用户标签列表接口 + parameters: + - description: 标签信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.GetTagListByWxidRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.GetTagListByWxidResponseData' + type: object + summary: 获取用户标签列表 + tags: + - 标签 + /api/v1/tag/modify: + post: + consumes: + - application/json + description: 修改标签接口 + parameters: + - description: 标签信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.ModifyTagRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 修改标签 + tags: + - 标签 + /api/v1/ui/chat/msg/not/notify: + post: + consumes: + - application/json + description: 消息免打扰接口 + parameters: + - description: 消息免打扰 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.ChatMsgNotNotifyRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 消息免打扰 + tags: + - 界面 + /api/v1/ui/chat/session/top: + post: + consumes: + - application/json + description: 置顶会话接口 + parameters: + - description: 会话 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.ChatSessionTopRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 置顶会话 + tags: + - 界面 + /api/v1/ui/clear/chat/record: + post: + consumes: + - application/json + description: 清空聊天记录接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 清空聊天记录 + tags: + - 界面 + /api/v1/ui/switch/session: + post: + consumes: + - application/json + description: 切换会话接口 + parameters: + - description: 会话 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.SwitchSessionRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 切换会话 + tags: + - 界面 + /api/v1/video_moment/create/virtual_nickname: + post: + consumes: + - application/json + description: 创建虚拟昵称接口 + parameters: + - description: 昵称信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.VideoMomentCreateVirtualNickNameRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + type: object + type: object + summary: 创建虚拟昵称 + tags: + - 视频号 + /api/v1/video_moment/delete/virtual_nickname: + post: + consumes: + - application/json + description: 删除虚拟昵称接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + $ref: '#/definitions/api.CommonStringResponse' + summary: 删除虚拟昵称 + tags: + - 视频号 + /api/v1/video_moment/follow: + post: + consumes: + - application/json + description: 关注视频号接口 + parameters: + - description: 关注信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.VideoMomentFollowRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.VideoMomentFollowResponseData' + type: object + summary: 关注视频号 + tags: + - 视频号 + /api/v1/video_moment/get/session_id: + post: + consumes: + - application/json + description: 获取私信sessionId接口 + parameters: + - description: sessionId信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.VideoMomentGetSessionIdRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.VideoMomentGetSessionIdResponseData' + type: object + summary: 获取私信sessionId + tags: + - 视频号 + /api/v1/video_moment/init: + post: + consumes: + - application/json + description: 视频号初始化接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.VideoMomentInitResponseData' + type: object + summary: 视频号初始化 + tags: + - 视频号 + /api/v1/video_moment/like: + post: + consumes: + - application/json + description: 点赞视频接口 + parameters: + - description: 点赞信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.VideoMomentLikeRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.VideoMomentLikeResponseData' + type: object + summary: 点赞视频 + tags: + - 视频号 + /api/v1/video_moment/search: + post: + consumes: + - application/json + description: 搜索视频号接口 + parameters: + - description: 搜索信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.VideoMomentSearchRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + type: object + type: object + summary: 搜索视频号 + tags: + - 视频号 + /api/v1/video_moment/send/msg: + post: + consumes: + - application/json + description: 发送私信接口 + parameters: + - description: 发送信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.VideoMomentSendMsgRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.VideoMomentSendMsgResponseData' + type: object + summary: 发送私信 + tags: + - 视频号 + /api/v1/video_moment/switch/virtual_nickname: + post: + consumes: + - application/json + description: 切换虚拟昵称接口 + parameters: + - description: 昵称信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.VideoMomentSwitchVirtualNickNameRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + type: object + type: object + summary: 切换虚拟昵称 + tags: + - 视频号 + /api/v1/video_moment/user/home: + post: + consumes: + - application/json + description: 视频号用户主页接口 + parameters: + - description: 用户信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.VideoMomentUserHomeRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + type: object + type: object + summary: 视频号用户主页 + tags: + - 视频号 + /api/v1/video_moment/video/detail: + post: + consumes: + - application/json + description: 查看视频详细信息(包含评论)接口 + parameters: + - description: 视频信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.VideoMomentVideoDetailRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + type: object + type: object + summary: 查看视频详细信息(包含评论) + tags: + - 视频号 + /api/v1/voice/to/text: + post: + consumes: + - application/json + description: 语音转文字接口 + parameters: + - description: 语音信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.VoiceToTextRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.VoiceToTextResponseData' + type: object + summary: 语音转文字 + tags: + - 语音转文字 + /api/v1/workwx/room/list: + get: + consumes: + - application/json + description: 获取企业微信群列表接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + items: + $ref: '#/definitions/core.GetWorkWxRoomListResponseDataItem' + type: array + type: object + summary: 获取企业微信群列表 + tags: + - 企业微信 + /api/v1/workwx/room/member/list: + post: + consumes: + - application/json + description: 获取企业微信群成员列表接口 + parameters: + - description: 群信息 + in: body + name: body + required: true + schema: + $ref: '#/definitions/core.GetWorkWxChatRoomMemberRequest' + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + $ref: '#/definitions/core.GetWorkWxChatRoomMemberResponseData' + type: object + summary: 获取企业微信群成员列表 + tags: + - 企业微信 + /api/v1/workwx/user/list: + get: + consumes: + - application/json + description: 获取企业微信用户列表接口 + produces: + - application/json + responses: + "200": + description: '{\"code\":0, ....}' + schema: + allOf: + - $ref: '#/definitions/api.CommonStringResponse' + - properties: + Data: + items: + $ref: '#/definitions/core.GetWorkWxUserListResponseDataItem' + type: array + type: object + summary: 获取企业微信用户列表 + tags: + - 企业微信 +swagger: "2.0" diff --git a/ecode/HP_Socket.ec b/ecode/HP_Socket.ec new file mode 100644 index 0000000..4a943f5 Binary files /dev/null and b/ecode/HP_Socket.ec differ diff --git a/ecode/callexe.bak b/ecode/callexe.bak new file mode 100644 index 0000000..d4ec90b Binary files /dev/null and b/ecode/callexe.bak differ diff --git a/ecode/callexe.e b/ecode/callexe.e new file mode 100644 index 0000000..33896b2 Binary files /dev/null and b/ecode/callexe.e differ diff --git a/ecode/zyJson2.6.ec b/ecode/zyJson2.6.ec new file mode 100644 index 0000000..89f357f Binary files /dev/null and b/ecode/zyJson2.6.ec differ diff --git a/ecode/精易模块[v10.2.5].ec b/ecode/精易模块[v10.2.5].ec new file mode 100644 index 0000000..e0841fa Binary files /dev/null and b/ecode/精易模块[v10.2.5].ec differ diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..1c392e6 --- /dev/null +++ b/go.mod @@ -0,0 +1,48 @@ +module github.com/goWxHook/goWxHook + +go 1.22.2 + +require ( + github.com/gin-contrib/pprof v1.5.0 + github.com/gin-gonic/gin v1.10.0 + github.com/json-iterator/go v1.1.12 + github.com/swaggo/files v1.0.1 + github.com/swaggo/gin-swagger v1.6.0 + github.com/swaggo/swag v1.16.3 +) + +require ( + github.com/KyleBanks/depth v1.2.1 // indirect + github.com/bytedance/sonic v1.11.6 // indirect + github.com/bytedance/sonic/loader v0.1.1 // indirect + github.com/cloudwego/base64x v0.1.4 // indirect + github.com/cloudwego/iasm v0.2.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.3 // indirect + github.com/gin-contrib/sse v0.1.0 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/spec v0.20.9 // indirect + github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.20.0 // indirect + github.com/goccy/go-json v0.10.2 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/klauspost/cpuid/v2 v2.2.7 // indirect + github.com/leodido/go-urn v1.4.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/ugorji/go/codec v1.2.12 // indirect + golang.org/x/arch v0.8.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + golang.org/x/tools v0.8.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..e797ba5 --- /dev/null +++ b/go.sum @@ -0,0 +1,168 @@ +github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= +github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= +github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= +github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= +github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= +github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= +github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= +github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk= +github.com/gin-contrib/pprof v1.5.0 h1:E/Oy7g+kNw94KfdCy3bZxQFtyDnAX2V7axRS7sNYVrU= +github.com/gin-contrib/pprof v1.5.0/go.mod h1:GqFL6LerKoCQ/RSWnkYczkTJ+tOAUVN/8sbnEtaqOKs= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= +github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/spec v0.20.9 h1:xnlYNQAwKd2VQRRfwTEI0DcK+2cbuvI/0c7jx3gA8/8= +github.com/go-openapi/spec v0.20.9/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= +github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= +github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg= +github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M= +github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo= +github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg= +github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= +golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/main.go b/main.go new file mode 100644 index 0000000..a14997d --- /dev/null +++ b/main.go @@ -0,0 +1,51 @@ +package main + +import ( + "flag" + "github.com/goWxHook/goWxHook/api" + WXHook "github.com/goWxHook/goWxHook/core" + "log/slog" + "time" +) + +var ( + webPort int + debug bool +) + +func init() { + flag.IntVar(&webPort, "port", 19088, "web端口") + flag.BoolVar(&debug, "debug", false, "debug模式") + flag.Parse() +} + +// @title WxHelper API +// @version 3.9.10.19 +// @description 微信hook接口文档 +func main() { + err := WXHook.WxModuleInit(webPort, debug) + if err != nil { + panic(err) + } + wxApi := WXHook.WxApi{ + // 消息10秒无应答就超时 + TimeOut: 10, // 上传大文件时记得手动拉长超时 + } + + // 启动web服务 + go func() { + _ = api.NewWebApi(&wxApi, webPort).StartWebApi() + }() + + // 注入微信 + uinfo, err := wxApi.InjectWeChat() + if err != nil { + panic(err) + } + // 登录完成 + slog.Info("登录完成", "微信号", uinfo.Wxid, "昵称", uinfo.Nickname, "用户目录", uinfo.WxUserDir) + // 保活检测 + for wxApi.Ping() == nil { + time.Sleep(5 * time.Second) + } +} diff --git a/resource/res.go b/resource/res.go new file mode 100644 index 0000000..7c8ad01 --- /dev/null +++ b/resource/res.go @@ -0,0 +1,19 @@ +package resource + +import ( + _ "embed" +) + +var ( + //go:embed Helper_3.9.10.19.dll + HelperDll []byte + + //go:embed Loader_3.9.10.19.dll + LoaderDll []byte + + //go:embed callexe.exe + CallExe []byte + + //go:embed HPSocket4C.dll + HPSocket4C []byte +) diff --git a/test/test_init.go b/test/test_init.go new file mode 100644 index 0000000..c8accda --- /dev/null +++ b/test/test_init.go @@ -0,0 +1,44 @@ +package main + +import ( + "fmt" + WXHook "github.com/goWxHook/goWxHook/core" + "time" +) + +func main() { + err := WXHook.WxModuleInit(21100, true) + if err != nil { + panic(err) + } + wxApi := WXHook.WxApi{ + // 消息10秒无应答就超时 + TimeOut: 10, // 上传大文件时记得手动拉长超时 + } + fmt.Println(wxApi.GetUserWeChatVersion()) + + // 注入微信 + uinfo, err := wxApi.InjectWeChat() + if err != nil { + panic(err) + } + // 登录完成 + fmt.Println(uinfo) + //wxid_80buxyrw347m12 + //rlist, err := wxApi.GetRoomMember(1, "17736246691@chatroom") + //fmt.Println(rlist, err) + lists, err := wxApi.GetFriendList() + if err != nil { + fmt.Println(err) + return + } + fmt.Println(lists) + + // 保活检测 + for wxApi.Ping() == nil { + time.Sleep(5 * time.Second) + } + + fmt.Println("exit") + +} diff --git a/utils/file.go b/utils/file.go new file mode 100644 index 0000000..3f86a6d --- /dev/null +++ b/utils/file.go @@ -0,0 +1,21 @@ +package utils + +import "os" + +func FileExists(path string) bool { + _, err := os.Lstat(path) + if os.IsNotExist(err) { + return false + } + return err == nil +} + +func WriteFile(path string, data []byte) error { + file, err := os.Create(path) + if err != nil { + return err + } + defer file.Close() + _, err = file.Write(data) + return err +} diff --git a/utils/http.go b/utils/http.go new file mode 100644 index 0000000..d4b585b --- /dev/null +++ b/utils/http.go @@ -0,0 +1 @@ +package utils diff --git a/utils/json/json.go b/utils/json/json.go new file mode 100644 index 0000000..600e5e2 --- /dev/null +++ b/utils/json/json.go @@ -0,0 +1,72 @@ +package json + +import ( + jsoniter "github.com/json-iterator/go" + "reflect" +) + +// var json = jsoniter.ConfigFastest +var json = jsoniter.Config{ + EscapeHTML: false, + SortMapKeys: true, + MarshalFloatWith6Digits: true, // will lose precession + ObjectFieldMustBeSimpleString: true, // do not unescape object field +}.Froze() + +//goland:noinspection GoUnusedGlobalVariable +var ( + Get = json.Get + Marshal = json.Marshal + Unmarshal = json.Unmarshal + UnmarshalFromString = json.UnmarshalFromString + MarshalIndent = json.MarshalIndent + NewDecoder = json.NewDecoder + NewEncoder = json.NewEncoder +) + +// MarshalToString JSON编码为字符串 +// + +func MarshalToString(v interface{}) string { + s, err := jsoniter.MarshalToString(v) + if err != nil { + return "" + } + return s +} + +func Struct2MapByKeepFieldName(obj interface{}) map[string]interface{} { + t := reflect.TypeOf(obj) + v := reflect.ValueOf(obj) + + var data = make(map[string]interface{}) + for i := 0; i < t.NumField(); i++ { + data[t.Field(i).Name] = v.Field(i).Interface() + } + return data +} + +func Struct2MapByJsonName(obj interface{}) (map[string]interface{}, error) { + marshal, err := json.Marshal(obj) + if err != nil { + return nil, err + } + var data map[string]interface{} + err = json.Unmarshal(marshal, &data) + if err != nil { + return nil, err + } + return data, nil +} + +func MapToStruct(m map[string]interface{}, o interface{}) error { + marshal, err := json.Marshal(m) + if err != nil { + return err + } + err = json.Unmarshal(marshal, o) + if err != nil { + return err + } + return nil +} diff --git a/utils/map.go b/utils/map.go new file mode 100644 index 0000000..6f03939 --- /dev/null +++ b/utils/map.go @@ -0,0 +1,107 @@ +package utils + +import "sync" + +type Key interface { + int | int32 | int64 | string +} + +type SafeMap[K Key, V any] struct { + m map[K]V + lock sync.RWMutex +} + +func NewSafeMap[K Key, V any]() *SafeMap[K, V] { + return &SafeMap[K, V]{ + m: make(map[K]V), + } +} + +func (sm *SafeMap[K, V]) Set(key K, value V) { + sm.lock.Lock() + defer sm.lock.Unlock() + sm.m[key] = value +} + +func (sm *SafeMap[K, V]) Get(key K) (V, bool) { + sm.lock.RLock() + defer sm.lock.RUnlock() + value, ok := sm.m[key] + return value, ok +} + +func (sm *SafeMap[K, V]) GetWithSetDefault(key K, defaultValue V) V { + sm.lock.Lock() + defer sm.lock.Unlock() + if value, ok := sm.m[key]; ok { + return value + } + sm.m[key] = defaultValue + return defaultValue +} + +func (sm *SafeMap[K, V]) Delete(key K) { + sm.lock.Lock() + defer sm.lock.Unlock() + delete(sm.m, key) +} + +func (sm *SafeMap[K, V]) Range(f func(key K, value V) bool) { + sm.lock.RLock() + defer sm.lock.RUnlock() + for k, v := range sm.m { + if !f(k, v) { + break + } + } +} + +func (sm *SafeMap[K, V]) Len() int { + sm.lock.RLock() + defer sm.lock.RUnlock() + return len(sm.m) +} + +func (sm *SafeMap[K, V]) Keys() []K { + sm.lock.RLock() + defer sm.lock.RUnlock() + keys := make([]K, 0, len(sm.m)) + for k := range sm.m { + keys = append(keys, k) + } + return keys +} + +func (sm *SafeMap[K, V]) Values() []V { + sm.lock.RLock() + defer sm.lock.RUnlock() + values := make([]V, 0, len(sm.m)) + for _, v := range sm.m { + values = append(values, v) + } + return values +} + +func (sm *SafeMap[K, V]) Clear() { + sm.lock.Lock() + defer sm.lock.Unlock() + sm.m = make(map[K]V) +} + +func (sm *SafeMap[K, V]) Copy() map[K]V { + sm.lock.RLock() + defer sm.lock.RUnlock() + m := make(map[K]V, len(sm.m)) + for k, v := range sm.m { + m[k] = v + } + return m +} + +func (sm *SafeMap[K, V]) Merge(m map[K]V) { + sm.lock.Lock() + defer sm.lock.Unlock() + for k, v := range m { + sm.m[k] = v + } +} diff --git a/utils/response.go b/utils/response.go new file mode 100644 index 0000000..e15a69e --- /dev/null +++ b/utils/response.go @@ -0,0 +1,30 @@ +package utils + +import ( + "github.com/gin-gonic/gin" + "net/http" +) + +type Response struct { + Code int `json:"code"` // if request is success + Msg string `json:"msg"` + Data interface{} `json:"data"` // response data +} + +func ResponseOK(c *gin.Context, errMsg string, data interface{}) { + c.JSON(http.StatusOK, Response{ + Code: 0, + Msg: errMsg, + Data: data, + }) + return +} + +func ResponseError(c *gin.Context, errMsg string, data interface{}) { + c.JSON(http.StatusOK, Response{ + Code: 400, + Msg: errMsg, + Data: data, + }) + return +} diff --git a/utils/tcp/port.go b/utils/tcp/port.go new file mode 100644 index 0000000..938256d --- /dev/null +++ b/utils/tcp/port.go @@ -0,0 +1,24 @@ +package tcp + +import ( + "fmt" + "net" + "time" +) + +// CheckPortConnection 检测端口是否监听 +func CheckPortConnection(ip string, port int) bool { + conn, err := net.DialTimeout("tcp", fmt.Sprintf("%s:%d", ip, port), 3*time.Second) + if err != nil { + return false + } else { + if conn != nil { + defer func(conn net.Conn) { + _ = conn.Close() + }(conn) + return true + } else { + return false + } + } +} diff --git a/utils/u.go b/utils/u.go new file mode 100644 index 0000000..26764be --- /dev/null +++ b/utils/u.go @@ -0,0 +1,8 @@ +package utils + +func Ifs[T any](a bool, b, c T) T { + if a { + return b + } + return c +}