diff --git a/friend/api.go b/friend/api.go index 73161b4..ebdcc10 100644 --- a/friend/api.go +++ b/friend/api.go @@ -3,11 +3,10 @@ package friend import "github.com/go-resty/resty/v2" type API interface { - SendFriendRequest(scene int, v1, v2, verifyContent string) (username string, err error) // 发送好友请求 - AcceptFriend(scene int, v1, v2 string) (err error) // 接受好友请求 - GetContact(wxIds []string) (contactList []ContactListItem, err error) // 通过wxid获取联系人详情 - GetContractDetail(wxIds []string) (contactList []ContactListItem, err error) // 获取联系人详情 - GetContractList(clearSystemAccount bool) (wxIds []string, err error) // 获取联系人列表 + AcceptFriend(scene int, v1, v2 string) (err error) // 接受好友请求 + GetContact(wxIds []string) (contactList []ContactListItem, err error) // 通过wxid获取联系人详情 + GetContractDetail(wxIds []string) (contactList []ContactListItem, err error) // 获取联系人详情 + GetContractList(clearSystemAccount bool) (wxIds []string, err error) // 获取联系人列表 } type service struct { diff --git a/friend/impl.go b/friend/impl.go index 7a751c9..8f6899c 100644 --- a/friend/impl.go +++ b/friend/impl.go @@ -7,36 +7,6 @@ import ( "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 // @description: 接受好友请求 // @receiver s