Documentation ¶
Index ¶
- type Client
- func (comp *Client) Create(ctx context.Context, account string, nickname string) (*response2.ResponseOfficialAccount, error)
- func (comp *Client) Delete(ctx context.Context, account string) (*response2.ResponseOfficialAccount, error)
- func (comp *Client) HideTypingStatusToUser(ctx context.Context, openID string) (*response2.ResponseOfficialAccount, error)
- func (comp *Client) Invite(ctx context.Context, account string, wechatID string) (*response2.ResponseOfficialAccount, error)
- func (comp *Client) List(ctx context.Context) (*response.ResponseList, error)
- func (comp *Client) Message(ctx context.Context, message contract.MessageInterface) *Messenger
- func (comp *Client) Messages(ctx context.Context, data *request.RequestMessages) (*response.ResponseMessages, error)
- func (comp *Client) Online(ctx context.Context) (*response.ResponseKFOnlineList, error)
- func (comp *Client) Send(ctx context.Context, message interface{}) (*response2.ResponseOfficialAccount, error)
- func (comp *Client) SetAvatar(ctx context.Context, account string, path string) (*response2.ResponseOfficialAccount, error)
- func (comp *Client) ShowTypingStatusToUser(ctx context.Context, openID string) (*response2.ResponseOfficialAccount, error)
- func (comp *Client) Update(ctx context.Context, account string, nickname string) (*response2.ResponseOfficialAccount, error)
- type Messenger
- func (comp *Messenger) From(account string) *Messenger
- func (comp *Messenger) Send(ctx context.Context) (result interface{}, err error)
- func (comp *Messenger) SetBy(account string) *Messenger
- func (comp *Messenger) SetMessage(message *contract.MessageInterface) *Messenger
- func (comp *Messenger) SetTo(openID string) *Messenger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
BaseClient *kernel.BaseClient
}
func RegisterProvider ¶
func (*Client) Create ¶
func (comp *Client) Create(ctx context.Context, account string, nickname string) (*response2.ResponseOfficialAccount, error)
添加客服帐号 https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html
func (*Client) Delete ¶
func (comp *Client) Delete(ctx context.Context, account string) (*response2.ResponseOfficialAccount, error)
删除客服帐号 https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html
func (*Client) HideTypingStatusToUser ¶
func (comp *Client) HideTypingStatusToUser(ctx context.Context, openID string) (*response2.ResponseOfficialAccount, error)
隐藏收入状态给用户 https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html
func (*Client) Invite ¶
func (comp *Client) Invite(ctx context.Context, account string, wechatID string) (*response2.ResponseOfficialAccount, error)
邀请绑定客服帐号 https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html
func (*Client) List ¶
获取客服基本信息 https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html
func (*Client) Messages ¶
func (comp *Client) Messages(ctx context.Context, data *request.RequestMessages) (*response.ResponseMessages, error)
获取聊天记录 https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Obtain_chat_transcript.html
func (*Client) Online ¶
获取在线客服基本信息 https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html
func (*Client) Send ¶
func (comp *Client) Send(ctx context.Context, message interface{}) (*response2.ResponseOfficialAccount, error)
客服接口 - 发消息 https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html
func (*Client) SetAvatar ¶
func (comp *Client) SetAvatar(ctx context.Context, account string, path string) (*response2.ResponseOfficialAccount, error)
上传客服头像 https://developers.weixin.qq.com/doc/offiaccount/Customer_Service/Customer_Service_Management.html
func (*Client) ShowTypingStatusToUser ¶
func (comp *Client) ShowTypingStatusToUser(ctx context.Context, openID string) (*response2.ResponseOfficialAccount, error)
显示收入状态给用户 https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html
type Messenger ¶
type Messenger struct { Message *contract.MessageInterface To string Account string Client *Client }
func NewMessenger ¶
func (*Messenger) SetMessage ¶
func (comp *Messenger) SetMessage(message *contract.MessageInterface) *Messenger