24 lines
822 B
Go
24 lines
822 B
Go
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) // 获取联系人列表
|
|
}
|
|
|
|
type service struct {
|
|
client *resty.Client
|
|
wxId string
|
|
}
|
|
|
|
func New(client *resty.Client, wxId string) API {
|
|
return &service{
|
|
client: client,
|
|
wxId: wxId,
|
|
}
|
|
}
|