Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiRequestMsg ¶
使用接口回复消息 param url string 待请求的接口地址 param wxid string 消息接收人,如果 roomid 存在则为 at 此人 param roomid string 消息接收群,空则为私聊 return string 成功返回空,失败返回错误信息或结果
func SendFlexMsg ¶
发送弹性消息(文本、卡片、网络图片或文件) 网络文件格式:以 http:// 或 https:// 开头 卡片消息格式:card\n{name}\n{account}\n{title}\n{digest}\n{url}\n{thumburl} param msg string 要发送的消息 param wxid string 消息接收人,如果 roomid 存在则为 at 此人 param roomid string 消息接收群,空则为私聊 return int32 0 为成功,其他失败
Types ¶
type ApiResponse ¶
type ApiResponse struct { Type string `json:"type"` // 数据类型 [card, file, image, text, error] Card struct { Name string `json:"name"` // 左下显示的名字,可选 Account string `json:"account"` // 公众号 id,可显示对应的头像,可选 Title string `json:"title"` // 标题,最多显示为两行 Digest string `json:"digest"` // 摘要,最多显示为三行 Link string `json:"link"` // 点击后跳转的链接 Icon string `json:"icon"` // 右侧缩略图的链接,可选 } `json:"card,omitempty"` Link string `json:"link,omitempty"` // 当 type 为 file 或 image 时有效 Text string `json:"text,omitempty"` // 当 type 为 text 或 error 时有效 }
接口响应结果
Click to show internal directories.
Click to hide internal directories.