package group

import (
	"gitee.ltd/lxh/xybot/core"
	"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
	robotInfo *core.RobotInfo
}

func New(client *resty.Client, robotInfo *core.RobotInfo) API {
	return &service{client: client, robotInfo: robotInfo}
}