Documentation ¶
Index ¶
- func RegisterProvider(app kernel.ApplicationInterface) (*Client, *Messager, *appChat.Client, *externalContact.Client, ...)
- type Client
- func (comp *Client) Message(message *messages.Message) *Messager
- func (comp *Client) Recall(ctx context.Context, msgID string) (*response2.ResponseWork, error)
- func (comp *Client) Send(ctx context.Context, messages interface{}) (*response.ResponseMessageSend, error)
- func (comp *Client) SendFile(ctx context.Context, messages *request.RequestMessageSendFile) (*response.ResponseMessageSend, error)
- func (comp *Client) SendImage(ctx context.Context, messages *request.RequestMessageSendImage) (*response.ResponseMessageSend, error)
- func (comp *Client) SendMarkdown(ctx context.Context, messages *request.RequestMessageSendMarkdown) (*response.ResponseMessageSend, error)
- func (comp *Client) SendMiniProgramNotice(ctx context.Context, messages *request.RequestMessageSendMiniProgramNotice) (*response.ResponseMessageSend, error)
- func (comp *Client) SendMpNews(ctx context.Context, messages *request.RequestMessageSendMPNews) (*response.ResponseMessageSend, error)
- func (comp *Client) SendNews(ctx context.Context, messages *request.RequestMessageSendNews) (*response.ResponseMessageSend, error)
- func (comp *Client) SendTemplateCard(ctx context.Context, messages *request.RequestMessageSendTemplateCard) (*response.ResponseMessageSend, error)
- func (comp *Client) SendText(ctx context.Context, messages *request.RequestMessageSendText) (*response.ResponseMessageSend, error)
- func (comp *Client) SendTextCard(ctx context.Context, messages *request.RequestMessageSendTextCard) (*response.ResponseMessageSend, error)
- func (comp *Client) SendVideo(ctx context.Context, messages *request.RequestMessageSendVideo) (*response.ResponseMessageSend, error)
- func (comp *Client) SendVoice(ctx context.Context, messages *request.RequestMessageSendVoice) (*response.ResponseMessageSend, error)
- func (comp *Client) UpdateTemplateCard(ctx context.Context, card *power.HashMap) (*response.ResponseMessageSend, error)
- type Messager
- func (msg *Messager) Message(message contract.MessageInterface) *Messager
- func (msg *Messager) OfAgent(agentID int) *Messager
- func (msg *Messager) Secretive() *Messager
- func (msg *Messager) Send(ctx context.Context, message *messages.Message) (*response.ResponseMessageSend, error)
- func (msg *Messager) SetRecipients(ids interface{}, key string) *Messager
- func (msg *Messager) ToParty(partyIDs interface{}) *Messager
- func (msg *Messager) ToTag(tagIDs interface{}) *Messager
- func (msg *Messager) ToUser(userIDs interface{}) *Messager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterProvider ¶
func RegisterProvider(app kernel.ApplicationInterface) (*Client, *Messager, *appChat.Client, *externalContact.Client, *linkedCorp.Client, error, )
Types ¶
type Client ¶
type Client struct {
BaseClient *kernel.BaseClient
}
func (*Client) Recall ¶
Recall 撤回应用消息 https://developer.work.weixin.qq.com/document/path/94867
func (*Client) Send ¶
func (comp *Client) Send(ctx context.Context, messages interface{}) (*response.ResponseMessageSend, error)
发送应用消息 https://developer.work.weixin.qq.com/document/path/90236
func (*Client) SendFile ¶
func (comp *Client) SendFile(ctx context.Context, messages *request.RequestMessageSendFile) (*response.ResponseMessageSend, error)
SendFile 文件消息
func (*Client) SendImage ¶
func (comp *Client) SendImage(ctx context.Context, messages *request.RequestMessageSendImage) (*response.ResponseMessageSend, error)
SendImage 图片消息
func (*Client) SendMarkdown ¶
func (comp *Client) SendMarkdown(ctx context.Context, messages *request.RequestMessageSendMarkdown) (*response.ResponseMessageSend, error)
SendMarkdown markdown消息
func (*Client) SendMiniProgramNotice ¶
func (comp *Client) SendMiniProgramNotice(ctx context.Context, messages *request.RequestMessageSendMiniProgramNotice) (*response.ResponseMessageSend, error)
SendMiniProgramNotice 小程序通知消息
func (*Client) SendMpNews ¶
func (comp *Client) SendMpNews(ctx context.Context, messages *request.RequestMessageSendMPNews) (*response.ResponseMessageSend, error)
SendMpNews 图文消息(mpnews)
func (*Client) SendNews ¶
func (comp *Client) SendNews(ctx context.Context, messages *request.RequestMessageSendNews) (*response.ResponseMessageSend, error)
SendNews 图文消息
func (*Client) SendTemplateCard ¶
func (comp *Client) SendTemplateCard(ctx context.Context, messages *request.RequestMessageSendTemplateCard) (*response.ResponseMessageSend, error)
SendTemplateCard 发送卡片模版
func (*Client) SendText ¶
func (comp *Client) SendText(ctx context.Context, messages *request.RequestMessageSendText) (*response.ResponseMessageSend, error)
SendText 文本消息
func (*Client) SendTextCard ¶
func (comp *Client) SendTextCard(ctx context.Context, messages *request.RequestMessageSendTextCard) (*response.ResponseMessageSend, error)
SendTextCard 文本卡片消息
func (*Client) SendVideo ¶
func (comp *Client) SendVideo(ctx context.Context, messages *request.RequestMessageSendVideo) (*response.ResponseMessageSend, error)
SendVideo 视频消息
func (*Client) SendVoice ¶
func (comp *Client) SendVoice(ctx context.Context, messages *request.RequestMessageSendVoice) (*response.ResponseMessageSend, error)
SendVoice 语音消息
func (*Client) UpdateTemplateCard ¶
func (comp *Client) UpdateTemplateCard(ctx context.Context, card *power.HashMap) (*response.ResponseMessageSend, error)
更新模版卡片消息 https://developer.work.weixin.qq.com/document/path/94888
type Messager ¶
type Messager struct { To *power.HashMap AgentID int Client *Client // contains filtered or unexported fields }
func NewMessager ¶
func (*Messager) Message ¶
func (msg *Messager) Message(message contract.MessageInterface) *Messager
func (*Messager) SetRecipients ¶
Click to show internal directories.
Click to hide internal directories.