🔥 移除发送好友请求接口及相关实现
This commit is contained in:
parent
6bb7a8f271
commit
a9bec3b019
@ -3,7 +3,6 @@ package friend
|
|||||||
import "github.com/go-resty/resty/v2"
|
import "github.com/go-resty/resty/v2"
|
||||||
|
|
||||||
type API interface {
|
type API interface {
|
||||||
SendFriendRequest(scene int, v1, v2, verifyContent string) (username string, err error) // 发送好友请求
|
|
||||||
AcceptFriend(scene int, v1, v2 string) (err error) // 接受好友请求
|
AcceptFriend(scene int, v1, v2 string) (err error) // 接受好友请求
|
||||||
GetContact(wxIds []string) (contactList []ContactListItem, err error) // 通过wxid获取联系人详情
|
GetContact(wxIds []string) (contactList []ContactListItem, err error) // 通过wxid获取联系人详情
|
||||||
GetContractDetail(wxIds []string) (contactList []ContactListItem, err error) // 获取联系人详情
|
GetContractDetail(wxIds []string) (contactList []ContactListItem, err error) // 获取联系人详情
|
||||||
|
@ -7,36 +7,6 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SendFriendRequest
|
|
||||||
// @description: 发送好友请求
|
|
||||||
// @receiver s
|
|
||||||
// @param scene
|
|
||||||
// @param v1
|
|
||||||
// @param v2
|
|
||||||
// @param verifyContent
|
|
||||||
// @return username
|
|
||||||
// @return err
|
|
||||||
func (s service) SendFriendRequest(scene int, v1, v2, verifyContent string) (username string, err error) {
|
|
||||||
if err = base.PreCheck(s.wxId); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
var result base.Response[base.EmptyResponse]
|
|
||||||
_, err = s.client.R().
|
|
||||||
SetResult(&result).
|
|
||||||
SetBody(map[string]any{
|
|
||||||
"Wxid": s.wxId,
|
|
||||||
"Scene": scene,
|
|
||||||
"V1": v1,
|
|
||||||
"V2": v2,
|
|
||||||
"VerifyContent": verifyContent,
|
|
||||||
}).Post("/SendFriendRequest")
|
|
||||||
if err = result.CheckError(err); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// AcceptFriend
|
// AcceptFriend
|
||||||
// @description: 接受好友请求
|
// @description: 接受好友请求
|
||||||
// @receiver s
|
// @receiver s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user