message

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionList

type ActionList struct {
	Text string `json:"text"`
	Key  string `json:"key"`
}

type ActionMenu

type ActionMenu struct {
	Desc       string       `json:"desc"`
	ActionList []ActionList `json:"action_list"`
}

type ApprovalInfo

type ApprovalInfo struct {
	ThirdNo        string        `json:"third_no"`
	OpenSpName     string        `json:"open_sp_name"`
	OpenTemplateID string        `json:"open_template_id"`
	OpenSpStatus   int           `json:"open_sp_status"`
	ApplyTime      int           `json:"apply_time"`
	ApplyUserName  string        `json:"apply_user_name"`
	ApplyUserID    string        `json:"apply_user_id"`
	ApplyUserParty string        `json:"apply_user_party"`
	ApplyUserImage string        `json:"apply_user_image"`
	ApprovalNodes  ApprovalNodes `json:"approval_nodes"`
	NotifyNodes    NotifyNodes   `json:"notify_nodes"`
	Approverstep   int           `json:"approverstep"`
}

type ApprovalNode

type ApprovalNode struct {
	NodeStatus int   `json:"node_status"`
	NodeAttr   int   `json:"node_attr"`
	NodeType   int   `json:"node_type"`
	Items      Items `json:"items"`
}

type ApprovalNodes

type ApprovalNodes struct {
	ApprovalNode ApprovalNode `json:"approval_node"`
}

type ArticleResponseMessage

type ArticleResponseMessage struct {
	ResponseMessage
	ArticleCount int              `json:"article_count"`
	Articles     ResponseArticles `json:"articles"`
}

ArticleResponseMessage 图文消息

type Articles

type Articles struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	URL         string `json:"url"`
	Picurl      string `json:"picurl"`
	Appid       string `json:"appid"`
	Pagepath    string `json:"pagepath"`
}

type BaseMessageOptions

type BaseMessageOptions struct {
	Touser                 string `json:"touser"`
	Toparty                string `json:"toparty"`
	Totag                  string `json:"totag"`
	Msgtype                string `json:"msgtype"`
	Agentid                int    `json:"agentid"`
	Safe                   int    `json:"safe"`
	EnableIDTrans          int    `json:"enable_id_trans"`
	EnableDuplicateCheck   int    `json:"enable_duplicate_check"`
	DuplicateCheckInterval int    `json:"duplicate_check_interval"`
}

type BaseMessageSchema

type BaseMessageSchema struct {
	util.CommonError
	Invaliduser  string `json:"invaliduser"`
	Invalidparty string `json:"invalidparty"`
	Invalidtag   string `json:"invalidtag"`
	Msgid        string `json:"msgid"`
	ResponseCode string `json:"response_code"`
}

type BaseSendGroupMessage

type BaseSendGroupMessage struct {
	Chatid  string `json:"chatid"`
	Msgtype string `json:"msgtype"`
	Safe    int    `json:"safe"`
}

type BaseTemplateCardUpdateMessage

type BaseTemplateCardUpdateMessage struct {
	Userids      []string `json:"userids"`
	Partyids     []int    `json:"partyids"`
	Agentid      int      `json:"agentid"`
	ResponseCode string   `json:"response_code"`
}

更新模版卡片消息

type BaseTemplateCardUpdateSchema

type BaseTemplateCardUpdateSchema struct {
	util.CommonError
	Invaliduser []string `json:"invaliduser"`
}

type BatchJobApplication

type BatchJobApplication struct {
	JobID   string `json:"job_id"`
	JobType string `json:"job_type"`
	ErrCode int    `json:"err_code"`
	ErrMsg  string `json:"err_msg"`
}

type BatchJobResultApplicationCallbackMessage

type BatchJobResultApplicationCallbackMessage struct {
	CallbackMessage
	BatchJob BatchJobApplication `json:"batch_job"`
}

BatchJobResultApplicationCallbackMessage 异步任务完成事件推送

type Button

type Button struct {
	ReplaceName string `json:"replace_name"`
}

type ButtonActionList

type ButtonActionList struct {
	Text string `json:"Text"`
	Key  string `json:"Key"`
}

type ButtonActionMenu

type ButtonActionMenu struct {
	Desc       string             `json:"Desc"`
	ActionList []ButtonActionList `json:"ActionList"`
}

type ButtonButtonList

type ButtonButtonList struct {
	Text  string `json:"Text"`
	Style int    `json:"Style"`
	Key   string `json:"Key"`
}

type ButtonButtonSelection

type ButtonButtonSelection struct {
	QuestionKey string             `json:"QuestionKey"`
	Title       string             `json:"Title"`
	SelectedID  string             `json:"SelectedId"`
	Disable     bool               `json:"Disable"`
	OptionList  []ButtonOptionList `json:"OptionList"`
}

type ButtonCardAction

type ButtonCardAction struct {
	Title string `json:"Title"`
	Type  int    `json:"Type"`
	URL   string `json:"Url"`
}

type ButtonHorizontalContentList

type ButtonHorizontalContentList struct {
	KeyName string `json:"KeyName"`
	Value   string `json:"Value"`
	Type    int    `json:"Type,omitempty"`
	URL     string `json:"Url,omitempty"`
}

type ButtonJumpList

type ButtonJumpList struct {
	Title string `json:"Title"`
	Type  int    `json:"Type"`
	URL   string `json:"Url"`
}

type ButtonList

type ButtonList struct {
	Text  string `json:"text"`
	Style int    `json:"style"`
	Key   string `json:"key"`
}

type ButtonMainTitle

type ButtonMainTitle struct {
	Title string `json:"Title"`
	Desc  string `json:"Desc"`
}

type ButtonOptionList

type ButtonOptionList struct {
	ID   string `json:"Id"`
	Text string `json:"Text"`
}

type ButtonQuoteArea

type ButtonQuoteArea struct {
	Type      int    `json:"Type"`
	URL       string `json:"Url"`
	Title     string `json:"Title"`
	QuoteText string `json:"QuoteText"`
}

type ButtonResponseMessage

type ButtonResponseMessage struct {
	ResponseMessage
	Button ResponseButton `json:"button"`
}

ButtonResponseMessage 更新点击用户的按钮文案

type ButtonSelection

type ButtonSelection struct {
	QuestionKey string       `json:"question_key"`
	Title       string       `json:"title"`
	OptionList  []OptionList `json:"option_list"`
	SelectedID  string       `json:"selected_id"`
}

type ButtonSource

type ButtonSource struct {
	IconURL   string `json:"IconUrl"`
	Desc      string `json:"Desc"`
	DescColor int    `json:"DescColor"`
}

type ButtonTemplateCard

type ButtonTemplateCard struct {
	CardType              string                        `json:"CardType"`
	Source                ButtonSource                  `json:"Source"`
	MainTitle             ButtonMainTitle               `json:"MainTitle"`
	SubTitleText          string                        `json:"SubTitleText"`
	HorizontalContentList []ButtonHorizontalContentList `json:"HorizontalContentList"`
	JumpList              ButtonJumpList                `json:"JumpList"`
	CardAction            ButtonCardAction              `json:"CardAction"`
	ButtonList            []ButtonButtonList            `json:"ButtonList"`
	ReplaceText           string                        `json:"ReplaceText"`
	ActionMenu            ButtonActionMenu              `json:"ActionMenu"`
	QuoteArea             ButtonQuoteArea               `json:"QuoteArea"`
	ButtonSelection       ButtonButtonSelection         `json:"ButtonSelection"`
}

type CallbackMessage

type CallbackMessage struct {
	ToUserName   string `json:"to_user_name"`   // 企业微信CorpID
	FromUserName string `json:"from_user_name"` // 此事件该值固定为sys,表示该消息由系统生成
	CreateTime   int    `json:"create_time"`    // 消息创建时间 (整型)
	MsgType      string `json:"msgtype"`        // 消息的类型,此时固定为event
	Event        string `json:"event"`          // 事件的类型,此时固定为change_contact
	ChangeType   string `json:"change_type"`    // 此时固定为delete_user
}

CallbackMessage 基础回调消息

type CardAction

type CardAction struct {
	Type     int    `json:"type"`
	URL      string `json:"url"`
	Appid    string `json:"appid"`
	Pagepath string `json:"pagepath"`
}

type CardImage

type CardImage struct {
	URL         string  `json:"url"`
	AspectRatio float64 `json:"aspect_ratio"`
}

type ChatInfo

type ChatInfo struct {
	Chatid   string   `json:"chatid"`
	Name     string   `json:"name"`
	Owner    string   `json:"owner"`
	Userlist []string `json:"userlist"`
}

type Checkbox

type Checkbox struct {
	QuestionKey string           `json:"question_key"`
	OptionList  []OptionListVote `json:"option_list"`
	Mode        int              `json:"mode"`
}

type CheckboxUpdateVote

type CheckboxUpdateVote struct {
	QuestionKey string           `json:"question_key"`
	OptionList  []OptionListVote `json:"option_list"`
	Disable     bool             `json:"disable"`
	Mode        int              `json:"mode"`
}

type ClickCallbackMessage

type ClickCallbackMessage struct {
	CallbackMessage
	EventKey string `json:"event_key"`
	AgentID  int    `json:"agent_id"`
}

ClickCallbackMessage 点击菜单拉取消息的事件推送

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client 通讯录实例

func NewClient

func NewClient(cfg *config.Config) (client *Client, err error)

NewClient 初始化通讯录实例

func (*Client) CreateGroup

func (r *Client) CreateGroup(options CreateGroupOptions) (info CreateGroupSchema, err error)

CreateGroup 创建群聊会话

func (*Client) GetCallbackMessage

func (r *Client) GetCallbackMessage(signatureOptions SignatureOptions, encryptedMsg []byte) (rawData []byte, msg CallbackMessage, err error)

GetCallbackMessage 获取回调事件中的消息内容

 //Gin框架的使用示例
	r.POST("/v1/event/callback", func(c *gin.Context) {
		var (
			message kf.CallbackMessage
			body []byte
		)
		// 读取原始消息内容
		body, err = c.GetRawData()
		if err != nil {
			c.String(http.StatusInternalServerError, err.Error())
			return
		}
		// 解析原始数据
		message, err = kfClient.GetCallbackMessage(body)
		if err != nil {
			c.String(http.StatusInternalServerError, "消息获取失败")
			return
		}
		fmt.Println(message)
		c.String(200, "ok")
	})

func (*Client) GetGroup

func (r *Client) GetGroup(options GetGroupOptions) (info GetGroupSchema, err error)

GetGroup 获取群聊会话

func (*Client) RecallMessage

func (r *Client) RecallMessage(options interface{}) (info util.CommonError, err error)

RecallMessage 撤回应用消息

func (*Client) SendGroupMessage

func (r *Client) SendGroupMessage(options interface{}) (info util.CommonError, err error)

SendGroupMessage 发送群组应用消息

func (*Client) SendMessage

func (r *Client) SendMessage(options interface{}) (info BaseMessageSchema, err error)

SendMessage 发送应用消息

func (*Client) UpdateGroup

func (r *Client) UpdateGroup(options UpdateGroupOptions) (info util.CommonError, err error)

UpdateGroup 修改群聊会话

func (*Client) UpdateTemplateCard

func (r *Client) UpdateTemplateCard(options interface{}) (info BaseTemplateCardUpdateSchema, err error)

UpdateTemplateCard 更新模版卡片消息

func (*Client) VerifyURL

func (r *Client) VerifyURL(options SignatureOptions) (string, error)

VerifyURL 验证请求参数是否合法并返回解密后的消息内容

 //Gin框架的使用示例
	r.GET("/v1/event/callback", func(c *gin.Context) {
		options := kf.SignatureOptions{}
		//获取回调的的校验参数
		if = c.ShouldBindQuery(&options); err != nil {
			c.String(http.StatusUnauthorized, "参数解析失败")
		}
		// 调用VerifyURL方法校验当前请求,如果合法则把解密后的内容作为响应返回给微信服务器
		echo, err := kfClient.VerifyURL(options)
		if err == nil {
			c.String(http.StatusOK, echo)
		} else {
			c.String(http.StatusUnauthorized, "非法请求来源")
		}
	})

type ContentItem

type ContentItem struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type CreateGroupOptions

type CreateGroupOptions struct {
	Name     string   `json:"name"`
	Owner    string   `json:"owner"`
	Userlist []string `json:"userlist"`
	Chatid   string   `json:"chatid"`
}

CreateGroupOptions 请求参数

type CreateGroupSchema

type CreateGroupSchema struct {
	util.CommonError
	Chatid string `json:"chatid"`
}

CreateGroupSchema 创建群聊会话响应内容

type CreatePartyCallbackMessage

type CreatePartyCallbackMessage struct {
	CallbackMessage
	Id       int    `json:"id"`        // 部门Id
	Name     string `json:"name"`      // 部门名称
	ParentId int    `json:"parent_id"` // 父部门id
	Order    int    `json:"order"`     // 部门排序
}

CreatePartyCallbackMessage 新增部门事件回调消息

type CreateUserCallbackMessage

type CreateUserCallbackMessage struct {
	CallbackMessage
	UserID         string                 `json:"user_id"`           // 成员UserID
	Name           string                 `json:"name"`              // 成员名称
	Department     []int                  `json:"department"`        // 成员部门列表,仅返回该应用有查看权限的部门id
	MainDepartment int                    `json:"main_department"`   // 主部门
	IsLeaderInDept []int                  `json:"is_leader_in_dept"` // 表示所在部门是否为上级,0-否,1-是,顺序与Department字段的部门逐一对应
	Mobile         string                 `json:"mobile"`            // 手机号码
	Position       string                 `json:"position"`          // 职位信息。长度为0~64个字节
	Gender         string                 `json:"gender"`            // 性别,1表示男性,2表示女性
	Email          string                 `json:"email"`             // 邮箱
	Status         int                    `json:"status"`            // 激活状态:1=已激活 2=已禁用 4=未激活 已激活代表已激活企业微信或已关注微工作台(原企业号)5=成员退出
	Avatar         string                 `json:"avatar"`            // 头像url。注:如果要获取小图将url最后的”/0”改成”/100”即可。
	Alias          string                 `json:"alias"`             // 成员别名
	Telephone      string                 `json:"telephone"`         // 座机
	Address        string                 `json:"address"`           // 地址
	ExtAttr        map[string]interface{} `json:"ext_attr"`          // 扩展属性
}

CreateUserCallbackMessage 新增成员事件回调消息

type DeletePartyCallbackMessage

type DeletePartyCallbackMessage struct {
	CallbackMessage
	Id int `json:"id"` // 部门Id
}

DeletePartyCallbackMessage 删除部门事件回调消息

type DeleteUserCallbackMessage

type DeleteUserCallbackMessage struct {
	CallbackMessage
	UserID string `json:"user_id"` // 成员UserID
}

DeleteUserCallbackMessage 删除成员事件回调消息

type EmphasisContent

type EmphasisContent struct {
	Title string `json:"title"`
	Desc  string `json:"desc"`
}

type EnterAgentCallbackMessage

type EnterAgentCallbackMessage struct {
	CallbackMessage
	EventKey string `json:"event_key"`
	AgentID  int    `json:"agent_id"`
}

EnterAgentCallbackMessage 进入应用

type Error

type Error string

Error 错误

const (
	// SDKInitFailed 错误码:50001
	SDKInitFailed Error = "SDK初始化失败"
	// SDKCacheUnavailable 错误码:50002
	SDKCacheUnavailable Error = "缓存无效"
	// SDKUnknownError 错误码:50003
	SDKUnknownError Error = "未知错误"
	// SDKInvalidCredential 错误码:40001
	SDKInvalidCredential Error = "不合法的secret参数"
	// SDKInvalidCorpID 错误码:40013
	SDKInvalidCorpID Error = "无效的 CorpID"
	// SDKAccessTokenInvalid 错误码:40014
	SDKAccessTokenInvalid Error = "AccessToken 无效"
	// SDKValidateSignatureFailed 错误码:40015
	SDKValidateSignatureFailed Error = "校验签名错误"
	// SDKDecryptMSGFailed 错误码:40016
	SDKDecryptMSGFailed Error = "消息解密失败"
	// SDKAccessTokenMissing 错误码:41001
	SDKAccessTokenMissing Error = "缺少AccessToken参数"
	// SDKAccessTokenExpired 错误码:42001
	SDKAccessTokenExpired Error = "AccessToken 已过期"
	// SDKApiFreqOutOfLimit 错误码:45009
	SDKApiFreqOutOfLimit Error = "接口请求次数超频"
	// SDKApiForbidden 错误码:48002
	SDKApiForbidden Error = "API 禁止调用"
	// SDKInvalidOpenKFID 错误码:95000
	SDKInvalidOpenKFID Error = "无效的 open_kfid"
	// SDKOpenKFIDNotExist 错误码:95004
	SDKOpenKFIDNotExist Error = "open_kfid 不存在"
	// SDKWeWorkAlready 错误码:95011
	SDKWeWorkAlready Error = "已在企业微信使用微信客服"
	// SDKNotUseInWeCom 错误码:95012
	SDKNotUseInWeCom Error = "未在企业微信使用微信客服"
	// SDKApiNotOpen 错误码:95017
	SDKApiNotOpen Error = "API 功能没有被开启"
)

func NewSDKErr

func NewSDKErr(code int64, msgList ...string) Error

NewSDKErr 初始化SDK实例错误信息

func (Error) Error

func (r Error) Error() string

Error 输出错误信息

type File

type File struct {
	MediaID string `json:"media_id"`
	Name    string `json:"name"`
	Size    int    `json:"size"`
}

type FileMessageOptions

type FileMessageOptions struct {
	BaseMessageOptions
	File File `json:"file"`
}

文件消息

type GetGroupOptions

type GetGroupOptions struct {
	Chatid string `json:"chatid"`
}

GetGroupOptions 请求参数

type GetGroupSchema

type GetGroupSchema struct {
	util.CommonError
	ChatInfo ChatInfo `json:"chat_info"`
}

GetGroupSchema 获取群聊会话响应内容

type HorizontalContentList

type HorizontalContentList struct {
	Keyname string `json:"keyname"`
	Value   string `json:"value"`
	Type    int    `json:"type,omitempty"`
	URL     string `json:"url,omitempty"`
	MediaID string `json:"media_id,omitempty"`
	Userid  string `json:"userid,omitempty"`
}

type Image

type Image struct {
	MediaID string `json:"media_id"`
}

type ImageMessageOptions

type ImageMessageOptions struct {
	BaseMessageOptions
	Image Image `json:"image"`
}

图片消息

type ImageResponseMessage

type ImageResponseMessage struct {
	ResponseMessage
	Image ResponseImage `json:"image"`
}

ImageResponseMessage 图片消息

type ImageTextActionList

type ImageTextActionList struct {
	Text string `json:"Text"`
	Key  string `json:"Key"`
}

type ImageTextActionMenu

type ImageTextActionMenu struct {
	Desc       string                `json:"Desc"`
	ActionList []ImageTextActionList `json:"ActionList"`
}

type ImageTextArea

type ImageTextArea struct {
	Type     int    `json:"type"`
	URL      string `json:"url"`
	Title    string `json:"title"`
	Desc     string `json:"desc"`
	ImageURL string `json:"image_url"`
}

type ImageTextCardAction

type ImageTextCardAction struct {
	Title string `json:"Title"`
	Type  int    `json:"Type"`
	URL   string `json:"Url"`
}

type ImageTextCardImage

type ImageTextCardImage struct {
	URL         string  `json:"Url"`
	AspectRatio float64 `json:"AspectRatio"`
}

type ImageTextHorizontalContentList

type ImageTextHorizontalContentList struct {
	KeyName string `json:"KeyName"`
	Value   string `json:"Value"`
	Type    int    `json:"Type,omitempty"`
	URL     string `json:"Url,omitempty"`
}

type ImageTextImageTextArea

type ImageTextImageTextArea struct {
	Type     int    `json:"Type"`
	URL      string `json:"Url"`
	Title    string `json:"Title"`
	Desc     string `json:"Desc"`
	ImageURL string `json:"ImageUrl"`
}

type ImageTextJumpList

type ImageTextJumpList struct {
	Title string `json:"Title"`
	Type  int    `json:"Type"`
	URL   string `json:"Url"`
}

type ImageTextMainTitle

type ImageTextMainTitle struct {
	Title string `json:"Title"`
	Desc  string `json:"Desc"`
}

type ImageTextQuoteArea

type ImageTextQuoteArea struct {
	Type      int    `json:"Type"`
	URL       string `json:"Url"`
	Title     string `json:"Title"`
	QuoteText string `json:"QuoteText"`
}

type ImageTextSource

type ImageTextSource struct {
	IconURL   string `json:"IconUrl"`
	Desc      string `json:"Desc"`
	DescColor int    `json:"DescColor"`
}

type ImageTextTemplateCard

type ImageTextTemplateCard struct {
	CardType              string                           `json:"CardType"`
	Source                ImageTextSource                  `json:"Source"`
	MainTitle             ImageTextMainTitle               `json:"MainTitle"`
	HorizontalContentList []ImageTextHorizontalContentList `json:"HorizontalContentList"`
	JumpList              ImageTextJumpList                `json:"JumpList"`
	CardAction            ImageTextCardAction              `json:"CardAction"`
	CardImage             ImageTextCardImage               `json:"CardImage"`
	VerticalContentList   []ImageTextVerticalContentList   `json:"VerticalContentList"`
	ActionMenu            ImageTextActionMenu              `json:"ActionMenu"`
	QuoteArea             ImageTextQuoteArea               `json:"QuoteArea"`
	ImageTextArea         ImageTextImageTextArea           `json:"ImageTextArea"`
}

type ImageTextVerticalContentList

type ImageTextVerticalContentList struct {
	Title string `json:"Title"`
	Desc  string `json:"Desc"`
}

type Item

type Item struct {
	PicMd5Sum string `json:"pic_md_5_sum"`
}

type Items

type Items struct {
	Item OpenApprovalItem `json:"item"`
}

type JumpList

type JumpList struct {
	Type     int    `json:"type"`
	Title    string `json:"title"`
	URL      string `json:"url,omitempty"`
	Appid    string `json:"appid,omitempty"`
	Pagepath string `json:"pagepath,omitempty"`
}

type LocationCallbackMessage

type LocationCallbackMessage struct {
	CallbackMessage
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
	Precision int     `json:"precision"`
	AgentID   int     `json:"agent_id"`
	AppType   string  `json:"app_type"`
}

LocationCallbackMessage 上报地理位置

type LocationSelectCallbackMessage

type LocationSelectCallbackMessage struct {
	CallbackMessage
	EventKey         string           `json:"event_key"`
	SendLocationInfo SendLocationInfo `json:"send_location_info"`
	AgentID          int              `json:"agent_id"`
	AppType          string           `json:"app_type"`
}

LocationSelectCallbackMessage 弹出地理位置选择器的事件推送

type MainTitle

type MainTitle struct {
	Title string `json:"title"`
	Desc  string `json:"desc"`
}

type Markdown

type Markdown struct {
	Content string `json:"content"`
}

type MarkdownMessageOptions

type MarkdownMessageOptions struct {
	BaseMessageOptions
	Markdown Markdown `json:"markdown"`
}

markdown消息

type MiniprogramNotice

type MiniprogramNotice struct {
	Appid             string        `json:"appid"`
	Page              string        `json:"page"`
	Title             string        `json:"title"`
	Description       string        `json:"description"`
	EmphasisFirstItem bool          `json:"emphasis_first_item"`
	ContentItem       []ContentItem `json:"content_item"`
}

type MiniprogramNoticeMessageOptions

type MiniprogramNoticeMessageOptions struct {
	BaseMessageOptions
	MiniprogramNotice MiniprogramNotice `json:"miniprogram_notice"`
}

小程序通知消息

type Mpnews

type Mpnews struct {
	Articles []MpnewsArticles `json:"articles"`
}

type MpnewsArticles

type MpnewsArticles struct {
	Title            string `json:"title"`
	ThumbMediaID     string `json:"thumb_media_id"`
	Author           string `json:"author"`
	ContentSourceURL string `json:"content_source_url"`
	Content          string `json:"content"`
	Digest           string `json:"digest"`
}

type MpnewsMessageOptions

type MpnewsMessageOptions struct {
	BaseMessageOptions
	Mpnews Mpnews `json:"mpnews"`
}

图文消息(mpnews)

type News

type News struct {
	Articles []Articles `json:"articles"`
}

type NewsMessageOptions

type NewsMessageOptions struct {
	BaseMessageOptions
	News News `json:"news"`
}

图文消息

type NotifyNode

type NotifyNode struct {
	ItemName   string `json:"item_name"`
	ItemUserID string `json:"item_user_id"`
	ItemImage  string `json:"item_image"`
}

type NotifyNodes

type NotifyNodes struct {
	NotifyNode NotifyNode `json:"notify_node"`
}

type OpenApprovalChangeCallbackMessage

type OpenApprovalChangeCallbackMessage struct {
	CallbackMessage
	AgentID      int          `json:"agent_id"`
	ApprovalInfo ApprovalInfo `json:"approval_info"`
}

OpenApprovalChangeCallbackMessage 审批状态通知事件

type OpenApprovalItem

type OpenApprovalItem struct {
	ItemName   string `json:"item_name"`
	ItemUserID string `json:"item_user_id"`
	ItemImage  string `json:"item_image"`
	ItemStatus int    `json:"item_status"`
	ItemSpeech string `json:"item_speech"`
	ItemOpTime int    `json:"item_op_time"`
}

type OptionIds

type OptionIds struct {
	OptionID []string `json:"option_id"`
}

type OptionList

type OptionList struct {
	ID   string `json:"id"`
	Text string `json:"text"`
}

type OptionListVote

type OptionListVote struct {
	ID        string `json:"id"`
	Text      string `json:"text"`
	IsChecked bool   `json:"is_checked"`
}

type PicList

type PicList struct {
	Item Item `json:"item"`
}

type PicSysphotoCallbackMessage

type PicSysphotoCallbackMessage struct {
	CallbackMessage
	EventKey     string       `json:"event_key"`
	SendPicsInfo SendPicsInfo `json:"send_pics_info"`
	AgentID      int          `json:"agent_id"`
}

PicSysphotoCallbackMessage 弹出系统拍照发图的事件推送 / 弹出系统拍照发图的事件推送

type QuoteArea

type QuoteArea struct {
	Type      int    `json:"type"`
	URL       string `json:"url"`
	Title     string `json:"title"`
	QuoteText string `json:"quote_text"`
}

type RecallMessageOptions

type RecallMessageOptions struct {
	Msgid string `json:"msgid"`
}

type ResponseArticles

type ResponseArticles struct {
	Item []ResponseItem `json:"item"`
}

type ResponseButton

type ResponseButton struct {
	ReplaceName string `json:"replace_name"`
}

type ResponseImage

type ResponseImage struct {
	MediaID string `json:"media_id"`
}

type ResponseItem

type ResponseItem struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	PicURL      string `json:"pic_url"`
	URL         string `json:"url"`
}

type ResponseMessage

type ResponseMessage struct {
	ToUserName   string `json:"to_user_name"`
	FromUserName string `json:"from_user_name"`
	CreateTime   int    `json:"create_time"`
	MsgType      string `json:"msg_type"`
}

ResponseMessage 基础响应消息

type ResponseVideo

type ResponseVideo struct {
	MediaID     string `json:"media_id"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

type ResponseVoice

type ResponseVoice struct {
	MediaID string `json:"media_id"`
}

type ScanCodeInfo

type ScanCodeInfo struct {
	ScanType   string `json:"scan_type"`
	ScanResult string `json:"scan_result"`
}

type ScancodeCallbackMessage

type ScancodeCallbackMessage struct {
	CallbackMessage
	EventKey     string       `json:"event_key"`
	ScanCodeInfo ScanCodeInfo `json:"scan_code_info"`
	AgentID      int          `json:"agent_id"`
}

ScancodeCallbackMessage 扫码推事件的事件推送 / 扫码推事件且弹出“消息接收中”提示框的事件推送

type SelectList

type SelectList struct {
	QuestionKey string       `json:"question_key"`
	Title       string       `json:"title"`
	SelectedID  string       `json:"selected_id"`
	OptionList  []OptionList `json:"option_list"`
}

type SelectListUpdateFunction

type SelectListUpdateFunction struct {
	QuestionKey string       `json:"question_key"`
	Title       string       `json:"title"`
	SelectedID  string       `json:"selected_id"`
	Disable     bool         `json:"disable"`
	OptionList  []OptionList `json:"option_list"`
}

type SelectMainTitle

type SelectMainTitle struct {
	Title string `json:"Title"`
	Desc  string `json:"Desc"`
}

type SelectOptionList

type SelectOptionList struct {
	ID   string `json:"Id"`
	Text string `json:"Text"`
}

type SelectSelectList

type SelectSelectList struct {
	QuestionKey string             `json:"QuestionKey"`
	Title       string             `json:"Title"`
	SelectedID  string             `json:"SelectedId"`
	Disable     bool               `json:"Disable"`
	OptionList  []SelectOptionList `json:"OptionList"`
}

type SelectSource

type SelectSource struct {
	IconURL string `json:"IconUrl"`
	Desc    string `json:"Desc"`
}

type SelectSubmitButton

type SelectSubmitButton struct {
	Text string `json:"Text"`
	Key  string `json:"Key"`
}

type SelectTemplateCard

type SelectTemplateCard struct {
	CardType     string             `json:"CardType"`
	Source       SelectSource       `json:"Source"`
	MainTitle    SelectMainTitle    `json:"MainTitle"`
	SelectList   SelectSelectList   `json:"SelectList"`
	SubmitButton SelectSubmitButton `json:"SubmitButton"`
	ReplaceText  string             `json:"ReplaceText"`
}

type SelectedItem

type SelectedItem struct {
	QuestionKey string    `json:"question_key"`
	OptionIds   OptionIds `json:"option_ids"`
}

type SelectedItems

type SelectedItems struct {
	SelectedItem []SelectedItem `json:"selected_item"`
}

type SendGroupFileMessage

type SendGroupFileMessage struct {
	MediaID string `json:"media_id"`
}

type SendGroupFileMessageOptions

type SendGroupFileMessageOptions struct {
	Chatid  string `json:"chatid"`
	Msgtype string `json:"msgtype"`
	File    File   `json:"file"`
	Safe    int    `json:"safe"`
}

SendGroupFileMessageOptions 文件消息

type SendGroupImageMessage

type SendGroupImageMessage struct {
	MediaID string `json:"media_id"`
}

type SendGroupImageMessageOptions

type SendGroupImageMessageOptions struct {
	BaseSendGroupMessage
	Image SendGroupImageMessage `json:"image"`
}

SendGroupImageMessageOptions 图片消息

type SendGroupMarkdownMessage

type SendGroupMarkdownMessage struct {
	Content string `json:"content"`
}

type SendGroupMarkdownMessageOptions

type SendGroupMarkdownMessageOptions struct {
	Chatid   string                   `json:"chatid"`
	Msgtype  string                   `json:"msgtype"`
	Markdown SendGroupMarkdownMessage `json:"markdown"`
}

SendGroupMarkdownMessageOptions markdown消息

type SendGroupMpnewsArticlesMessage

type SendGroupMpnewsArticlesMessage struct {
	Title            string `json:"title"`
	ThumbMediaID     string `json:"thumb_media_id"`
	Author           string `json:"author"`
	ContentSourceURL string `json:"content_source_url"`
	Content          string `json:"content"`
	Digest           string `json:"digest"`
}

type SendGroupMpnewsMessage

type SendGroupMpnewsMessage struct {
	Articles []SendGroupMpnewsArticlesMessage `json:"articles"`
}

type SendGroupMpnewsMessageOptions

type SendGroupMpnewsMessageOptions struct {
	Chatid  string                 `json:"chatid"`
	Msgtype string                 `json:"msgtype"`
	Mpnews  SendGroupMpnewsMessage `json:"mpnews"`
	Safe    int                    `json:"safe"`
}

SendGroupMpnewsMessageOptions 图文消息(mpnews)

type SendGroupNewsArticlesMessage

type SendGroupNewsArticlesMessage struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	URL         string `json:"url"`
	Picurl      string `json:"picurl"`
}

type SendGroupNewsMessage

type SendGroupNewsMessage struct {
	Articles []SendGroupNewsArticlesMessage `json:"articles"`
}

type SendGroupNewsMessageOptions

type SendGroupNewsMessageOptions struct {
	Chatid  string               `json:"chatid"`
	Msgtype string               `json:"msgtype"`
	News    SendGroupNewsMessage `json:"news"`
	Safe    int                  `json:"safe"`
}

SendGroupNewsMessageOptions 图文消息

type SendGroupTextMessage

type SendGroupTextMessage struct {
	Content string `json:"content"`
}

type SendGroupTextMessageOptions

type SendGroupTextMessageOptions struct {
	BaseSendGroupMessage
	Text SendGroupTextMessage `json:"text"`
}

SendGroupTextMessageOptions 文本消息

type SendGroupTextcardMessage

type SendGroupTextcardMessage struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	URL         string `json:"url"`
	Btntxt      string `json:"btntxt"`
}

type SendGroupTextcardMessageOptions

type SendGroupTextcardMessageOptions struct {
	BaseSendGroupMessage
	Textcard Textcard `json:"textcard"`
}

SendGroupTextcardMessageOptions 文本卡片消息

type SendGroupVideoMessage

type SendGroupVideoMessage struct {
	MediaID     string `json:"media_id"`
	Description string `json:"description"`
	Title       string `json:"title"`
}

type SendGroupVideoMessageOptions

type SendGroupVideoMessageOptions struct {
	BaseSendGroupMessage
	Video Video `json:"video"`
}

SendGroupVideoMessageOptions 视频消息

type SendGroupVoiceMessage

type SendGroupVoiceMessage struct {
	MediaID string `json:"media_id"`
}

type SendGroupVoiceMessageOptions

type SendGroupVoiceMessageOptions struct {
	Chatid  string                `json:"chatid"`
	Msgtype string                `json:"msgtype"`
	Voice   SendGroupVoiceMessage `json:"voice"`
}

SendGroupVoiceMessageOptions 语音消息

type SendLocationInfo

type SendLocationInfo struct {
	LocationX string `json:"location_x"`
	LocationY string `json:"location_y"`
	Scale     string `json:"scale"`
	Label     string `json:"label"`
	Poiname   string `json:"poiname"`
}

type SendPicsInfo

type SendPicsInfo struct {
	Count   int     `json:"count"`
	PicList PicList `json:"pic_list"`
}

type ShareAgentChangeCallbackMessage

type ShareAgentChangeCallbackMessage struct {
	CallbackMessage
	AgentID int `json:"agent_id"`
}

ShareAgentChangeCallbackMessage 共享应用事件回调

type SignatureOptions

type SignatureOptions struct {
	Signature string `form:"msg_signature"`
	TimeStamp string `form:"timestamp"`
	Nonce     string `form:"nonce"`
	EchoStr   string `form:"echostr"`
	Encrypt   string `form:"encrypt"`
}

SignatureOptions 微信服务器验证参数

type Source

type Source struct {
	IconURL   string `json:"icon_url"`
	Desc      string `json:"desc"`
	DescColor int    `json:"desc_color"`
}

type SourceFunction

type SourceFunction struct {
	IconURL string `json:"icon_url"`
	Desc    string `json:"desc"`
}

type SourceVote

type SourceVote struct {
	IconURL string `json:"icon_url"`
	Desc    string `json:"desc"`
}

type SubmitButton

type SubmitButton struct {
	Text string `json:"text"`
	Key  string `json:"key"`
}

type SubscribeCallbackMessage

type SubscribeCallbackMessage struct {
	CallbackMessage
	AgentID int `json:"agent_id"`
}

SubscribeCallbackMessage 成员关注及取消关注事件

type TemplateCard

type TemplateCard struct {
	CardType              string                  `json:"card_type"`
	Source                Source                  `json:"source"`
	ActionMenu            ActionMenu              `json:"action_menu"`
	TaskID                string                  `json:"task_id"`
	MainTitle             MainTitle               `json:"main_title"`
	QuoteArea             QuoteArea               `json:"quote_area"`
	EmphasisContent       EmphasisContent         `json:"emphasis_content"`
	SubTitleText          string                  `json:"sub_title_text"`
	HorizontalContentList []HorizontalContentList `json:"horizontal_content_list"`
	JumpList              []JumpList              `json:"jump_list"`
	CardAction            CardAction              `json:"card_action"`
}

type TemplateCardButton

type TemplateCardButton struct {
	CardType              string                  `json:"card_type"`
	Source                Source                  `json:"source"`
	ActionMenu            ActionMenu              `json:"action_menu"`
	MainTitle             MainTitle               `json:"main_title"`
	QuoteArea             QuoteArea               `json:"quote_area"`
	SubTitleText          string                  `json:"sub_title_text"`
	HorizontalContentList []HorizontalContentList `json:"horizontal_content_list"`
	CardAction            CardAction              `json:"card_action"`
	TaskID                string                  `json:"task_id"`
	ButtonSelection       ButtonSelection         `json:"button_selection"`
	ButtonList            []ButtonList            `json:"button_list"`
}

type TemplateCardButtonMessageOptions

type TemplateCardButtonMessageOptions struct {
	BaseMessageOptions
	TemplateCard TemplateCardButton `json:"template_card"`
}

按钮交互型

type TemplateCardButtonResponseMessage

type TemplateCardButtonResponseMessage struct {
	ToUserName   string             `json:"ToUserName"`
	FromUserName string             `json:"FromUserName"`
	CreateTime   int                `json:"CreateTime"`
	MsgType      string             `json:"MsgType"`
	TemplateCard ButtonTemplateCard `json:"TemplateCard"`
}

TemplateCardButtonResponseMessage 更新点击用户的整张卡片 - 按钮交互型

type TemplateCardEventCallbackMessage

type TemplateCardEventCallbackMessage struct {
	CallbackMessage
	EventKey      string        `json:"event_key"`
	TaskID        string        `json:"task_id"`
	CardType      string        `json:"card_type"`
	ResponseCode  string        `json:"response_code"`
	AgentID       int           `json:"agent_id"`
	SelectedItems SelectedItems `json:"selected_items"`
}

TemplateCardEventCallbackMessage 模板卡片事件推送

type TemplateCardFunction

type TemplateCardFunction struct {
	CardType     string         `json:"card_type"`
	Source       SourceFunction `json:"source"`
	MainTitle    MainTitle      `json:"main_title"`
	TaskID       string         `json:"task_id"`
	SelectList   []SelectList   `json:"select_list"`
	SubmitButton SubmitButton   `json:"submit_button"`
}

type TemplateCardFunctionMessageOptions

type TemplateCardFunctionMessageOptions struct {
	BaseMessageOptions
	TemplateCard TemplateCardFunction `json:"template_card"`
}

多项选择型

type TemplateCardImage

type TemplateCardImage struct {
	CardType              string                  `json:"card_type"`
	Source                Source                  `json:"source"`
	ActionMenu            ActionMenu              `json:"action_menu"`
	TaskID                string                  `json:"task_id"`
	MainTitle             MainTitle               `json:"main_title"`
	QuoteArea             QuoteArea               `json:"quote_area"`
	ImageTextArea         ImageTextArea           `json:"image_text_area"`
	CardImage             CardImage               `json:"card_image"`
	VerticalContentList   []VerticalContentList   `json:"vertical_content_list"`
	HorizontalContentList []HorizontalContentList `json:"horizontal_content_list"`
	JumpList              []JumpList              `json:"jump_list"`
	CardAction            CardAction              `json:"card_action"`
}

type TemplateCardImageMessageOptions

type TemplateCardImageMessageOptions struct {
	BaseMessageOptions
	TemplateCard TemplateCardImage `json:"template_card"`
}

图文展示型

type TemplateCardImageTextResponseMessage

type TemplateCardImageTextResponseMessage struct {
	ResponseMessage
	TemplateCard ImageTextTemplateCard `json:"TemplateCard"`
}

TemplateCardImageTextResponseMessage 更新点击用户的整张卡片 - 图文展示型

type TemplateCardMenuEventCallbackMessage

type TemplateCardMenuEventCallbackMessage struct {
	CallbackMessage
	EventKey     string `json:"event_key"`
	TaskID       string `json:"task_id"`
	CardType     string `json:"card_type"`
	ResponseCode string `json:"response_code"`
	AgentID      int    `json:"agent_id"`
}

TemplateCardMenuEventCallbackMessage 通用模板卡片右上角菜单事件推送

type TemplateCardMessageOptions

type TemplateCardMessageOptions struct {
	BaseMessageOptions
	TemplateCard TemplateCard `json:"template_card"`
}

模板卡片消息

type TemplateCardSelectResponseMessage

type TemplateCardSelectResponseMessage struct {
	ToUserName   string             `json:"ToUserName"`
	FromUserName string             `json:"FromUserName"`
	CreateTime   int                `json:"CreateTime"`
	MsgType      string             `json:"MsgType"`
	TemplateCard SelectTemplateCard `json:"TemplateCard"`
}

TemplateCardSelectResponseMessage 更新点击用户的整张卡片 - 多项选择型

type TemplateCardTextResponseMessage

type TemplateCardTextResponseMessage struct {
	ResponseMessage
	TemplateCard TextTemplateCard `json:"template_card"`
}

TemplateCardTextResponseMessage 更新点击用户的整张卡片 - 文本通知型

type TemplateCardUpdateButton

type TemplateCardUpdateButton struct {
	CardType              string                  `json:"card_type"`
	Source                Source                  `json:"source"`
	ActionMenu            ActionMenu              `json:"action_menu"`
	MainTitle             MainTitle               `json:"main_title"`
	QuoteArea             QuoteArea               `json:"quote_area"`
	SubTitleText          string                  `json:"sub_title_text"`
	HorizontalContentList []HorizontalContentList `json:"horizontal_content_list"`
	CardAction            CardAction              `json:"card_action"`
	ButtonSelection       ButtonSelection         `json:"button_selection"`
	ButtonList            []ButtonList            `json:"button_list"`
	ReplaceText           string                  `json:"replace_text"`
}

type TemplateCardUpdateButtonMessageOptions

type TemplateCardUpdateButtonMessageOptions struct {
	Userids      []string                 `json:"userids"`
	Partyids     []int                    `json:"partyids"`
	Agentid      int                      `json:"agentid"`
	ResponseCode string                   `json:"response_code"`
	TemplateCard TemplateCardUpdateButton `json:"template_card"`
}

更新为新的卡片 - 按钮交互型

type TemplateCardUpdateFunction

type TemplateCardUpdateFunction struct {
	CardType     string                     `json:"card_type"`
	Source       SourceFunction             `json:"source"`
	MainTitle    MainTitle                  `json:"main_title"`
	SelectList   []SelectListUpdateFunction `json:"select_list"`
	SubmitButton SubmitButton               `json:"submit_button"`
	ReplaceText  string                     `json:"replace_text"`
}

type TemplateCardUpdateFunctionMessageOptions

type TemplateCardUpdateFunctionMessageOptions struct {
	Userids      []string                   `json:"userids"`
	Partyids     []int                      `json:"partyids"`
	Tagids       []int                      `json:"tagids"`
	Atall        int                        `json:"atall"`
	Agentid      int                        `json:"agentid"`
	ResponseCode string                     `json:"response_code"`
	TemplateCard TemplateCardUpdateFunction `json:"template_card"`
}

更新为新的卡片 - 多项选择型

type TemplateCardUpdateImage

type TemplateCardUpdateImage struct {
	CardType              string                  `json:"card_type"`
	Source                Source                  `json:"source"`
	ActionMenu            ActionMenu              `json:"action_menu"`
	MainTitle             MainTitle               `json:"main_title"`
	QuoteArea             QuoteArea               `json:"quote_area"`
	ImageTextArea         ImageTextArea           `json:"image_text_area"`
	CardImage             CardImage               `json:"card_image"`
	VerticalContentList   []VerticalContentList   `json:"vertical_content_list"`
	HorizontalContentList []HorizontalContentList `json:"horizontal_content_list"`
	JumpList              []JumpList              `json:"jump_list"`
	CardAction            CardAction              `json:"card_action"`
}

type TemplateCardUpdateImageMessageOptions

type TemplateCardUpdateImageMessageOptions struct {
	Userids      []string                `json:"userids"`
	Partyids     []int                   `json:"partyids"`
	Agentid      int                     `json:"agentid"`
	ResponseCode string                  `json:"response_code"`
	TemplateCard TemplateCardUpdateImage `json:"template_card"`
}

更新为新的卡片 - 图文展示型

type TemplateCardUpdateMessageOptions

type TemplateCardUpdateMessageOptions struct {
	BaseTemplateCardUpdateMessage
	Tagids       []int        `json:"tagids"`
	Atall        int          `json:"atall"`
	TemplateCard TemplateCard `json:"template_card"`
}

更新按钮为不可点击状态

type TemplateCardUpdateText

type TemplateCardUpdateText struct {
	CardType              string                  `json:"card_type"`
	Source                Source                  `json:"source"`
	ActionMenu            ActionMenu              `json:"action_menu"`
	MainTitle             MainTitle               `json:"main_title"`
	QuoteArea             QuoteArea               `json:"quote_area"`
	EmphasisContent       EmphasisContent         `json:"emphasis_content"`
	SubTitleText          string                  `json:"sub_title_text"`
	HorizontalContentList []HorizontalContentList `json:"horizontal_content_list"`
	JumpList              []JumpList              `json:"jump_list"`
	CardAction            CardAction              `json:"card_action"`
}

type TemplateCardUpdateTextMessageOptions

type TemplateCardUpdateTextMessageOptions struct {
	Userids      []string               `json:"userids"`
	Partyids     []int                  `json:"partyids"`
	Agentid      int                    `json:"agentid"`
	ResponseCode string                 `json:"response_code"`
	TemplateCard TemplateCardUpdateText `json:"template_card"`
}

更新为新的卡片 - 文本通知型

type TemplateCardUpdateVote

type TemplateCardUpdateVote struct {
	CardType     string             `json:"card_type"`
	Source       SourceVote         `json:"source"`
	MainTitle    MainTitle          `json:"main_title"`
	Checkbox     CheckboxUpdateVote `json:"checkbox"`
	SubmitButton SubmitButton       `json:"submit_button"`
	ReplaceText  string             `json:"replace_text"`
}

type TemplateCardUpdateVoteMessageOptions

type TemplateCardUpdateVoteMessageOptions struct {
	Userids      []string               `json:"userids"`
	Partyids     []int                  `json:"partyids"`
	Agentid      int                    `json:"agentid"`
	ResponseCode string                 `json:"response_code"`
	TemplateCard TemplateCardUpdateVote `json:"template_card"`
}

更新为新的卡片 - 投票选择型

type TemplateCardVote

type TemplateCardVote struct {
	CardType     string       `json:"card_type"`
	Source       SourceVote   `json:"source"`
	MainTitle    MainTitle    `json:"main_title"`
	TaskID       string       `json:"task_id"`
	Checkbox     Checkbox     `json:"checkbox"`
	SubmitButton SubmitButton `json:"submit_button"`
}

type TemplateCardVoteMessageOptions

type TemplateCardVoteMessageOptions struct {
	BaseMessageOptions
	TemplateCard TemplateCardVote `json:"template_card"`
}

投票选择型

type TemplateCardVoteResponseMessage

type TemplateCardVoteResponseMessage struct {
	ToUserName   string           `json:"ToUserName"`
	FromUserName string           `json:"FromUserName"`
	CreateTime   int              `json:"CreateTime"`
	MsgType      string           `json:"MsgType"`
	TemplateCard VoteTemplateCard `json:"TemplateCard"`
}

TemplateCardVoteResponseMessage 更新点击用户的整张卡片 - 投票选择型

type Text

type Text struct {
	Content string `json:"content"`
}

type TextActionList

type TextActionList struct {
	Text string `json:"text"`
	Key  string `json:"key"`
}

type TextActionMenu

type TextActionMenu struct {
	Desc       string           `json:"desc"`
	ActionList []TextActionList `json:"action_list"`
}

type TextCardAction

type TextCardAction struct {
	Title string `json:"title"`
	Type  int    `json:"type"`
	URL   string `json:"url"`
}

type TextEmphasisContent

type TextEmphasisContent struct {
	Title string `json:"title"`
	Desc  string `json:"desc"`
}

type TextHorizontalContentList

type TextHorizontalContentList struct {
	KeyName string `json:"key_name"`
	Value   string `json:"value"`
	Type    int    `json:"type,omitempty"`
	URL     string `json:"url,omitempty"`
}

type TextJumpList

type TextJumpList struct {
	Title string `json:"title"`
	Type  int    `json:"type"`
	URL   string `json:"url"`
}

type TextMainTitle

type TextMainTitle struct {
	Title string `json:"title"`
	Desc  string `json:"desc"`
}

type TextMessageOptions

type TextMessageOptions struct {
	BaseMessageOptions
	Text Text `json:"text"`
}

文本消息

type TextQuoteArea

type TextQuoteArea struct {
	Type      int    `json:"type"`
	URL       string `json:"url"`
	Title     string `json:"title"`
	QuoteText string `json:"quote_text"`
}

type TextResponseMessage

type TextResponseMessage struct {
	ResponseMessage
	Content string `json:"content"`
}

TextResponseMessage 文本消息

type TextSource

type TextSource struct {
	IconURL   string `json:"icon_url"`
	Desc      string `json:"desc"`
	DescColor int    `json:"desc_color"`
}

type TextTemplateCard

type TextTemplateCard struct {
	CardType              string                      `json:"card_type"`
	Source                TextSource                  `json:"source"`
	MainTitle             TextMainTitle               `json:"main_title"`
	SubTitleText          string                      `json:"sub_title_text"`
	HorizontalContentList []TextHorizontalContentList `json:"horizontal_content_list"`
	JumpList              TextJumpList                `json:"jump_list"`
	CardAction            TextCardAction              `json:"card_action"`
	EmphasisContent       TextEmphasisContent         `json:"emphasis_content"`
	ActionMenu            TextActionMenu              `json:"action_menu"`
	QuoteArea             TextQuoteArea               `json:"quote_area"`
}

type Textcard

type Textcard struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	URL         string `json:"url"`
	Btntxt      string `json:"btntxt"`
}

type TextcardMessageOptions

type TextcardMessageOptions struct {
	BaseMessageOptions
	Textcard Textcard `json:"textcard"`
}

文本卡片消息

type UpdateGroupOptions

type UpdateGroupOptions struct {
	Chatid      string   `json:"chatid"`
	Name        string   `json:"name"`
	Owner       string   `json:"owner"`
	AddUserList []string `json:"add_user_list"`
	DelUserList []string `json:"del_user_list"`
}

UpdateGroupOptions 修改群聊会话请求参数

type UpdatePartyCallbackMessage

type UpdatePartyCallbackMessage struct {
	CallbackMessage
	Id       int    `json:"id"`        // 部门Id
	Name     string `json:"name"`      // 部门名称,仅当该字段发生变更时传递
	ParentId int    `json:"parent_id"` // 父部门id,仅当该字段发生变更时传递
}

UpdatePartyCallbackMessage 更新部门事件回调消息

type UpdateTagCallbackMessage

type UpdateTagCallbackMessage struct {
	CallbackMessage
	TagId         int      `json:"tag_id"`          // 标签Id
	AddUserItems  []string `json:"add_user_items"`  // 标签中新增的成员userid列表,用逗号分隔
	DelUserItems  []string `json:"del_user_items"`  // 标签中删除的成员userid列表,用逗号分隔
	AddPartyItems []int    `json:"add_party_items"` // 标签中新增的部门id列表,用逗号分隔
	DelPartyItems []int    `json:"del_party_items"` // 标签中删除的部门id列表,用逗号分隔
}

UpdateTagCallbackMessage 标签变更通知回调消息

type UpdateUserCallbackMessage

type UpdateUserCallbackMessage struct {
	CallbackMessage
	CreateUserCallbackMessage
	NewUserID string `json:"new_user_id"` // 新的UserID,变更时推送(userid由系统生成时可更改一次)
}

UpdateUserCallbackMessage 更新成员事件回调消息

type VerticalContentList

type VerticalContentList struct {
	Title string `json:"title"`
	Desc  string `json:"desc"`
}

type Video

type Video struct {
	MediaID     string `json:"media_id"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

type VideoMessageOptions

type VideoMessageOptions struct {
	BaseMessageOptions
	Video Video `json:"video"`
}

视频消息

type VideoResponseMessage

type VideoResponseMessage struct {
	ResponseMessage
	Video ResponseVideo `json:"video"`
}

VideoResponseMessage 视频消息

type ViewCallbackMessage

type ViewCallbackMessage struct {
	CallbackMessage
	EventKey string `json:"event_key"`
	AgentID  int    `json:"agent_id"`
}

ViewCallbackMessage 点击菜单跳转链接的事件推送

type Voice

type Voice struct {
	MediaID string `json:"media_id"`
	Name    string `json:"name"`
	Size    int    `json:"size"`
}

type VoiceMessageOptions

type VoiceMessageOptions struct {
	BaseMessageOptions
	Voice Voice `json:"voice"`
}

语音消息

type VoiceResponseMessage

type VoiceResponseMessage struct {
	ResponseMessage
	Voice ResponseVoice `json:"voice"`
}

VoiceResponseMessage 语音消息

type VoteCheckBox

type VoteCheckBox struct {
	QuestionKey string           `json:"QuestionKey"`
	OptionList  []VoteOptionList `json:"OptionList"`
	Disable     bool             `json:"Disable"`
	Mode        int              `json:"Mode"`
}

type VoteMainTitle

type VoteMainTitle struct {
	Title string `json:"Title"`
	Desc  string `json:"Desc"`
}

type VoteOptionList

type VoteOptionList struct {
	ID        string `json:"Id"`
	Text      string `json:"Text"`
	IsChecked bool   `json:"IsChecked"`
}

type VoteSource

type VoteSource struct {
	IconURL string `json:"IconUrl"`
	Desc    string `json:"Desc"`
}

type VoteSubmitButton

type VoteSubmitButton struct {
	Text string `json:"Text"`
	Key  string `json:"Key"`
}

type VoteTemplateCard

type VoteTemplateCard struct {
	CardType     string           `json:"CardType"`
	Source       VoteSource       `json:"Source"`
	MainTitle    VoteMainTitle    `json:"MainTitle"`
	CheckBox     VoteCheckBox     `json:"CheckBox"`
	SubmitButton VoteSubmitButton `json:"SubmitButton"`
	ReplaceText  string           `json:"ReplaceText"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL