xybot/group/api.go
2025-04-17 14:59:55 +08:00

25 lines
990 B
Go

package group
import "github.com/go-resty/resty/v2"
type API interface {
AddChatroomMember(chatroom string, inviteWxId string) (err error) // 添加群聊成员(群聊最多40人)
InviteChatroomMember(chatroom string, inviteWxIds []string) (err error) // 邀请群聊成员(群聊大于40人)
GetChatroomInfo(chatroom string) (info GetChatroomInfoResponse, err error) // 获取群聊详情 这个接口不建议用,没多大卵用
GetChatroomInfoNoAnnounce(chatroom []string) (info []ChatroomInfoItem, err error) // 获取群聊详情(不包含群公告)
GetChatroomMemberDetail(chatroom string) (members []ChatRoomMemberItem, err error) // 获取群聊成员详情
GetChatroomQRCode(chatroom string) (imgBase64Str, notify 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,
}
}