Documentation ¶
Index ¶
- Constants
- type Kf
- func (kf *Kf) AddKf(msgRequest KfOperResponse) (msgResponse *KfOperResponse, err error)
- func (kf *Kf) DeleteKf(msgRequest KfOperResponse) (msgResponse *KfOperResponse, err error)
- func (kf *Kf) KfList(msgRequest KfOperResponse, action string) (msgResponse *KfOperResponse, err error)
- func (kf *Kf) Send(msgRequest KfSendMsgRequest) (msgResponse *KfSendMsgResponse, err error)
- func (kf *Kf) SendTextMsg(toUser string, content string) (msgResponse *KfSendMsgResponse, err error)
- func (kf *Kf) UpdateKf(msgRequest KfOperResponse) (msgResponse *KfOperResponse, err error)
- type KfListResponse
- type KfOperRequest
- type KfOperResponse
- type KfSendMsgRequest
- type KfSendMsgResponse
Constants ¶
View Source
const (
KfOperURL = "https://api.weixin.qq.com/customservice/kfaccount"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kf ¶
客服管理
func NewCustomerServer ¶
func (*Kf) AddKf ¶
func (kf *Kf) AddKf(msgRequest KfOperResponse) (msgResponse *KfOperResponse, err error)
增加客服
func (*Kf) DeleteKf ¶
func (kf *Kf) DeleteKf(msgRequest KfOperResponse) (msgResponse *KfOperResponse, err error)
删除客服
func (*Kf) KfList ¶
func (kf *Kf) KfList(msgRequest KfOperResponse, action string) (msgResponse *KfOperResponse, err error)
获取客服列表
func (*Kf) Send ¶
func (kf *Kf) Send(msgRequest KfSendMsgRequest) (msgResponse *KfSendMsgResponse, err error)
发送自定义多媒体消息给客户
func (*Kf) SendTextMsg ¶
func (kf *Kf) SendTextMsg(toUser string, content string) (msgResponse *KfSendMsgResponse, err error)
发送文本信息给客户
func (*Kf) UpdateKf ¶
func (kf *Kf) UpdateKf(msgRequest KfOperResponse) (msgResponse *KfOperResponse, err error)
修改客服
type KfListResponse ¶
type KfListResponse struct { wechatutil.CommonError KfList []struct { KfAccount string `json:"kf_account"` // 完整客服账号,格式为:账号前缀@公众号微信号 KfNick string `json:"kf_nick"` // 客服昵称 KfId string `json:"kf_id"` // 客服工号 KfHeadImgUrl string `json:"kf_headimgurl"` } `json:"kf_list"` }
type KfOperRequest ¶
type KfOperResponse ¶
type KfOperResponse struct {
wechatutil.CommonError
}
type KfSendMsgRequest ¶
type KfSendMsgRequest struct { ToUser string `json:"touser"` MsgType string `json:"msgtype"` Text message.Text `json:"text"` Image message.Image `json:"image"` Voice message.Voice `json:"voice"` Video message.Video `json:"video"` Music message.Music `json:"music"` News message.News `json:"news"` // 客服信息(若是要以指定客服账号发送的时候) CustomService struct { KfAccount string `json:"kf_account"` } `json:"customservice"` }
type KfSendMsgResponse ¶
type KfSendMsgResponse struct {
wechatutil.CommonError
}
Click to show internal directories.
Click to hide internal directories.