Documentation ¶
Index ¶
- Constants
- func AICrop(dest *AICropResult, filename string) wx.Action
- func AICropByURL(dest *AICropResult, imgURL string) wx.Action
- func AddKFAccount(account, nickname string) wx.Action
- func AddMaterial(dest *MaterialAddResult, mediaType MediaType, filename string) wx.Action
- func AddNews(dest *MaterialAddResult, articles ...*NewsArticle) wx.Action
- func BatchGetSubscribers(dest *[]*SubscriberInfo, openids ...string) wx.Action
- func BlackSubscribers(openids ...string) wx.Action
- func CheckAuthToken(openid string) wx.Action
- func CloseKFSession(account, openid string) wx.Action
- func CreateConditionalMenu(matchRule *MenuMatchRule, buttons ...*MenuButton) wx.Action
- func CreateKFSession(account, openid string) wx.Action
- func CreateMenu(buttons ...*MenuButton) wx.Action
- func CreatePermQRCode(dest *QRCode, senceID int) wx.Action
- func CreateTempQRCode(dest *QRCode, senceID int, expireSeconds ...int) wx.Action
- func DeleteConditionalMenu(menuID string) wx.Action
- func DeleteKFAccount(account string) wx.Action
- func DeleteMaterial(mediaID string) wx.Action
- func DeleteMenu() wx.Action
- func DeleteTemplate(templateID string) wx.Action
- func GetAuthUser(dest *AuthUser, openid string) wx.Action
- func GetBlackList(dest *SubscriberList, beginOpenID ...string) wx.Action
- func GetJSSDKTicket(dest *JSSDKTicket, t TicketType) wx.Action
- func GetKFAccountList(dest *[]*KFAccount) wx.Action
- func GetKFMsgRecordList(dest *KFMsgRecordList, msgid, starttime, endtime int64, number int) wx.Action
- func GetKFOnlineList(dest *[]*KFOnline) wx.Action
- func GetKFSession(dest *KFSession, openid string) wx.Action
- func GetKFSessionList(dest *[]*KFSession, account string) wx.Action
- func GetKFWaitCase(dest *KFWaitCase) wx.Action
- func GetMenu(dest *MenuInfo) wx.Action
- func GetSubscriberInfo(dest *SubscriberInfo, openid string) wx.Action
- func GetSubscriberList(dest *SubscriberList, nextOpenID ...string) wx.Action
- func GetTemplateList(dest *[]*TemplateInfo) wx.Action
- func InviteKFWorker(account, inviteWeixin string) wx.Action
- func Long2ShortURL(dest *ShortURL, longURL string) wx.Action
- func NewImageReply(mediaID string) event.Reply
- func NewMusicReply(thumbMediaID, title, desc, musicURL, HQMusicURL string) event.Reply
- func NewNewsReply(count int, articles ...*Article) event.Reply
- func NewTextReply(content string) event.Reply
- func NewTransfer2KFReply(kfAccount ...string) event.Reply
- func NewVideoReply(mediaID, title, desc string) event.Reply
- func NewVoiceReply(mediaID string) event.Reply
- func OCRBankCard(dest *BankCard, mode OCRMode, filename string) wx.Action
- func OCRBankCardByURL(dest *BankCard, mode OCRMode, imgURL string) wx.Action
- func OCRBusinessLicense(dest *BusinessLicense, mode OCRMode, filename string) wx.Action
- func OCRBusinessLicenseByURL(dest *BusinessLicense, mode OCRMode, imgURL string) wx.Action
- func OCRDriverLicense(dest *DriverLicense, mode OCRMode, filename string) wx.Action
- func OCRDriverLicenseByURL(dest *DriverLicense, mode OCRMode, imgURL string) wx.Action
- func OCRIDCardBack(dest *IDCardBack, mode OCRMode, filename string) wx.Action
- func OCRIDCardBackByURL(dest *IDCardBack, mode OCRMode, imgURL string) wx.Action
- func OCRIDCardFront(dest *IDCardFront, mode OCRMode, filename string) wx.Action
- func OCRIDCardFrontByURL(dest *IDCardFront, mode OCRMode, imgURL string) wx.Action
- func OCRPlateNumber(dest *PlateNumber, mode OCRMode, filename string) wx.Action
- func OCRPlateNumberByURL(dest *PlateNumber, mode OCRMode, imgURL string) wx.Action
- func OCRPrintedText(dest *PrintedText, mode OCRMode, filename string) wx.Action
- func OCRPrintedTextByURL(dest *PrintedText, mode OCRMode, imgURL string) wx.Action
- func OCRVehicleLicense(dest *VehicleLicense, mode OCRMode, filename string) wx.Action
- func OCRVehicleLicenseByURL(dest *VehicleLicense, mode OCRMode, imgURL string) wx.Action
- func ScanQRCode(dest *QRCodeScanResult, filename string) wx.Action
- func ScanQRCodeByURL(dest *QRCodeScanResult, imgURL string) wx.Action
- func SendSubscribeMessage(openID, scene, title string, msg *TemplateMessage) wx.Action
- func SendTemplateMessage(openID string, msg *TemplateMessage) wx.Action
- func SetUserRemark(openid, remark string) wx.Action
- func SuperreSolution(dest *SuperreSolutionResult, filename string) wx.Action
- func SuperreSolutionByURL(dest *SuperreSolutionResult, imgURL string) wx.Action
- func TryMatchMenu(dest *[]*MenuButton, userID string) wx.Action
- func UnBlackSubscribers(openids ...string) wx.Action
- func UpdateKFAccount(account, nickname string) wx.Action
- func UploadKFAvatar(account, filename string) wx.Action
- func UploadMedia(dest *MediaUploadResult, mediaType MediaType, filename string) wx.Action
- func UploadNewsImage(dest *MaterialAddResult, filename string) wx.Action
- func UploadVideo(dest *MaterialAddResult, filename, title, introduction string) wx.Action
- type AICropResult
- type AccessToken
- type Article
- type AuthScope
- type AuthToken
- type AuthUser
- type BankCard
- type BusinessLicense
- type ConditionalMenu
- type CropPosition
- type DriverLicense
- type IDCardBack
- type IDCardFront
- type ImagePosition
- type ImageReply
- type ImageSize
- type JSSDKSign
- type JSSDKTicket
- type KFAccount
- type KFInviteStatus
- type KFMsgRecord
- type KFMsgRecordList
- type KFOnline
- type KFSession
- type KFWaitCase
- type MaterialAddResult
- type MediaType
- type MediaUploadResult
- type Menu
- type MenuButton
- func ClickButton(name, key string) *MenuButton
- func GroupButton(name string, buttons ...*MenuButton) *MenuButton
- func LocationSelectButton(name, key string) *MenuButton
- func MediaButton(name, mediaID string) *MenuButton
- func MinipButton(name, appid, pagepath, redirectURL string) *MenuButton
- func PicPhotoOrAlbumButton(name, key string) *MenuButton
- func PicSysPhotoButton(name, key string) *MenuButton
- func PicWeixinButton(name, key string) *MenuButton
- func ScanCodePushButton(name, key string) *MenuButton
- func ScanCodeWaitMsgButton(name, key string) *MenuButton
- func ViewButton(name, redirectURL string) *MenuButton
- func ViewLimitedButton(name, mediaID string) *MenuButton
- type MenuButtonType
- type MenuInfo
- type MenuMatchRule
- type MessageBody
- type MessageMinip
- type MusicReply
- type NewsArticle
- type NewsReply
- type OA
- func (oa *OA) AccessToken(ctx context.Context, options ...wx.HTTPOption) (*AccessToken, error)
- func (oa *OA) AuthURL(scope AuthScope, redirectURL string) string
- func (oa *OA) Code2AuthToken(ctx context.Context, code string, options ...wx.HTTPOption) (*AuthToken, error)
- func (oa *OA) DecryptEventMessage(encrypt string) (wx.WXML, error)
- func (oa *OA) Do(ctx context.Context, accessToken string, action wx.Action, ...) error
- func (oa *OA) JSSDKSign(jsapiTicket, url string) *JSSDKSign
- func (oa *OA) RefreshAuthToken(ctx context.Context, refreshToken string, options ...wx.HTTPOption) (*AuthToken, error)
- func (oa *OA) Reply(openid string, reply event.Reply) (*event.ReplyMessage, error)
- func (oa *OA) SetOriginID(originid string)
- func (oa *OA) SetServerConfig(token, encodingAESKey string)
- func (oa *OA) VerifyEventSign(signature string, items ...string) bool
- type OCRMode
- type OCRPosition
- type PlateNumber
- type Position
- type PrintedText
- type PrintedTextItem
- type QRCode
- type QRCodeScanData
- type QRCodeScanResult
- type ReplyHeader
- type ShortURL
- type SubscribeScene
- type SubscriberInfo
- type SubscriberList
- type SubscriberListData
- type SuperreSolutionResult
- type TemplateInfo
- type TemplateMessage
- type TextReply
- type TicketType
- type TransInfo
- type Transfer2KFReply
- type VehicleLicense
- type VideoReply
- type VoiceReply
Constants ¶
const ( CgiBinAccessTokenURL = "https://api.weixin.qq.com/cgi-bin/token" CgiBinTicketURL = "https://api.weixin.qq.com/cgi-bin/ticket/getticket" )
cgi-bin
const ( MenuCreateURL = "https://api.weixin.qq.com/cgi-bin/menu/create" MenuAddConditionalURL = "https://api.weixin.qq.com/cgi-bin/menu/addconditional" MenuTryMatchURL = "https://api.weixin.qq.com/cgi-bin/menu/trymatch" MenuListURL = "https://api.weixin.qq.com/cgi-bin/menu/get" MenuDeleteURL = "https://api.weixin.qq.com/cgi-bin/menu/delete" MenuDeleteConditionalURL = "https://api.weixin.qq.com/cgi-bin/menu/delconditional" )
menu
const ( SnsCode2TokenURL = "https://api.weixin.qq.com/sns/oauth2/access_token" SnsCheckAccessTokenURL = "https://api.weixin.qq.com/sns/auth" SnsRefreshAccessTokenURL = "https://api.weixin.qq.com/sns/oauth2/refresh_token" SnsUserInfoURL = "https://api.weixin.qq.com/sns/userinfo" )
sns
const ( SubscriberGetURL = "https://api.weixin.qq.com/cgi-bin/user/info" SubscriberBatchGetURL = "https://api.weixin.qq.com/cgi-bin/user/info/batchget" SubscriberListURL = "https://api.weixin.qq.com/cgi-bin/user/get" BlackListGetURL = "https://api.weixin.qq.com/cgi-bin/tags/members/getblacklist" BatchBlackListURL = "https://api.weixin.qq.com/cgi-bin/tags/members/batchblacklist" BatchUnBlackListURL = "https://api.weixin.qq.com/cgi-bin/tags/members/batchunblacklist" UserRemarkSetURL = "https://api.weixin.qq.com/cgi-bin/user/info/updateremark" )
subscriber
const ( TemplateListURL = "https://api.weixin.qq.com/cgi-bin/template/get_all_private_template" TemplateDeleteURL = "https://api.weixin.qq.com/cgi-bin/template/del_private_template" TemplateMessageSendURL = "https://api.weixin.qq.com/cgi-bin/message/template/send" SubscribeMessageSendURL = "https://api.weixin.qq.com/cgi-bin/message/template/subscribe" )
message
const ( QRCodeCreateURL = "https://api.weixin.qq.com/cgi-bin/qrcode/create" QRCodeShowURL = "https://mp.weixin.qq.com/cgi-bin/showqrcode" ShortURLGenerateURL = "https://api.weixin.qq.com/cgi-bin/shorturl" )
popularize
const ( MediaUploadURL = "https://api.weixin.qq.com/cgi-bin/media/upload" MediaGetURL = "https://api.weixin.qq.com/cgi-bin/media/get" NewsAddURL = "https://api.weixin.qq.com/cgi-bin/material/add_news" NewsImageUploadURL = "https://api.weixin.qq.com/cgi-bin/media/uploadimg" MaterialAddURL = "https://api.weixin.qq.com/cgi-bin/material/add_material" MaterialDeleteURL = "https://api.weixin.qq.com/cgi-bin/material/del_material" )
media
const ( AICropURL = "https://api.weixin.qq.com/cv/img/aicrop" ScanQRCodeURL = "https://api.weixin.qq.com/cv/img/qrcode" SuperreSolutionURL = "https://api.weixin.qq.com/cv/img/superresolution" )
image
const ( OCRIDCardURL = "https://api.weixin.qq.com/cv/ocr/idcard" OCRBankCardURL = "https://api.weixin.qq.com/cv/ocr/bankcard" OCRPlateNumberURL = "https://api.weixin.qq.com/cv/ocr/platenum" OCRDriverLicenseURL = "https://api.weixin.qq.com/cv/ocr/drivinglicense" OCRVehicleLicenseURL = "https://api.weixin.qq.com/cv/ocr/driving" OCRBusinessLicenseURL = "https://api.weixin.qq.com/cv/ocr/bizlicense" OCRPrintedTextURL = "https://api.weixin.qq.com/cv/ocr/comm" )
ocr
const ( KFAccountListURL = "https://api.weixin.qq.com/cgi-bin/customservice/getkflist" KFOnlineListURL = "https://api.weixin.qq.com/cgi-bin/customservice/getonlinekflist" KFAccountAddURL = "https://api.weixin.qq.com/customservice/kfaccount/add" KFInviteURL = "https://api.weixin.qq.com/customservice/kfaccount/inviteworker" KFAccountUpdateURL = "https://api.weixin.qq.com/customservice/kfaccount/update" KFAvatarUploadURL = "https://api.weixin.qq.com/customservice/kfaccount/uploadheadimg" KFDeleteURL = "https://api.weixin.qq.com/customservice/kfaccount/del" KFSessionCreateURL = "https://api.weixin.qq.com/customservice/kfsession/create" KFSessionCloseURL = "https://api.weixin.qq.com/customservice/kfsession/close" KFSessionGetURL = "https://api.weixin.qq.com/customservice/kfsession/getsession" KFSessionListURL = "https://api.weixin.qq.com/customservice/kfsession/getsessionlist" KFWaitCaseURL = "https://api.weixin.qq.com/customservice/kfsession/getwaitcase" KFMsgRecordListURL = "https://api.weixin.qq.com/customservice/msgrecord/getmsglist" )
KF
const AuthorizeURL = "https://open.weixin.qq.com/connect/oauth2/authorize"
oauth2
const MaxSubscriberListCount = 10000
MaxSubscriberListCount 关注列表的最大数目
Variables ¶
This section is empty.
Functions ¶
func AddKFAccount ¶
AddKFAccount 添加客服账号 完整客服帐号,格式为:帐号前缀@公众号微信号,帐号前缀最多10个字符,必须是英文、数字字符或者下划线,后缀为公众号微信号,长度不超过30个字符 客服昵称,最长16个字
func AddMaterial ¶
func AddMaterial(dest *MaterialAddResult, mediaType MediaType, filename string) wx.Action
AddMaterial 新增其他类型永久素材(支持图片、音频、缩略图)
func AddNews ¶
func AddNews(dest *MaterialAddResult, articles ...*NewsArticle) wx.Action
AddNews 新增永久图文素材(公众号的素材库保存总数量有上限:图文消息素材、图片素材上限为100000,其他类型为1000)
func BatchGetSubscribers ¶
func BatchGetSubscribers(dest *[]*SubscriberInfo, openids ...string) wx.Action
BatchGetSubscribers 批量关注用户信息
func CheckAuthToken ¶
CheckAuthToken 检验授权凭证(access_token)是否有效
func CloseKFSession ¶
CloseKFSession 关闭会话 完整客服帐号,格式为:帐号前缀@公众号微信号
func CreateConditionalMenu ¶
func CreateConditionalMenu(matchRule *MenuMatchRule, buttons ...*MenuButton) wx.Action
CreateConditionalMenu 创建个性化菜单
func CreateKFSession ¶
CreateKFSession 创建会话 完整客服帐号,格式为:帐号前缀@公众号微信号
func CreatePermQRCode ¶
CreatePermQRCode 创建永久二维码(expireSeconds:二维码有效时间,最大不超过2592000秒(即30天),不填,则默认有效期为30秒。)
func CreateTempQRCode ¶
CreateTempQRCode 创建临时二维码(expireSeconds:二维码有效时间,最大不超过2592000秒(即30天),不填,则默认有效期为30秒。)
func DeleteConditionalMenu ¶
DeleteConditional 删除个性化菜单
func DeleteKFAccount ¶
DeleteKFAccount 删除客服帐号 完整客服帐号,格式为:帐号前缀@公众号微信号
func GetAuthUser ¶
GetAuthUser 获取授权用户信息(注意:使用网页授权的access_token)
func GetBlackList ¶
func GetBlackList(dest *SubscriberList, beginOpenID ...string) wx.Action
GetBlackList 获取用户黑名单列表
func GetJSSDKTicket ¶
func GetJSSDKTicket(dest *JSSDKTicket, t TicketType) wx.Action
GetJSSDKTicket 获取 JS-SDK ticket (注意:使用普通access_token)
func GetKFMsgRecordList ¶
func GetKFMsgRecordList(dest *KFMsgRecordList, msgid, starttime, endtime int64, number int) wx.Action
GetKFMsgRecordList 获取聊天记录(每次查询时段不能超过24小时) 聊天记录中,对于图片、语音、视频,分别展示成文本格式的[image]、[voice]、[video]。
func GetKFSession ¶
GetKFSession 获取客户会话状态 获取一个客户的会话,如果不存在,则kf_account为空。
func GetKFSessionList ¶
GetKFSessionList 获取客服会话列表 完整客服帐号,格式为:帐号前缀@公众号微信号
func GetKFWaitCase ¶
func GetKFWaitCase(dest *KFWaitCase) wx.Action
GetKFWaitCase 获取未接入会话列表 最多返回100条数据,按照来访顺序
func GetSubscriberInfo ¶
func GetSubscriberInfo(dest *SubscriberInfo, openid string) wx.Action
GetSubscriberInfo 获取关注用户信息
func GetSubscriberList ¶
func GetSubscriberList(dest *SubscriberList, nextOpenID ...string) wx.Action
GetSubscriberList 获取关注用户列表
func InviteKFWorker ¶
InviteKFWorker 邀请绑定客服帐号 新添加的客服帐号是不能直接使用的,只有客服人员用微信号绑定了客服账号后,方可登录Web客服进行操作。 发起一个绑定邀请到客服人员微信号,客服人员需要在微信客户端上用该微信号确认后帐号才可用。 尚未绑定微信号的帐号可以进行绑定邀请操作,邀请未失效时不能对该帐号进行再次绑定微信号邀请。 完整客服帐号,格式为:帐号前缀@公众号微信号
func Long2ShortURL ¶
Long2ShortURL 长链接转短链接(长链接支持http://、https://、weixin://wxpay格式的url)
func NewMusicReply ¶
NewMusicReply 回复音乐消息
func NewNewsReply ¶
NewNewsReply 回复图文消息
func NewTransfer2KFReply ¶
NewTransfer2KFReply 消息转发到客服
func NewVideoReply ¶
NewVideoReply 回复视频消息
func OCRBankCard ¶
OCRBankCard 银行卡识别
func OCRBankCardByURL ¶
OCRBankCardByURL 银行卡识别
func OCRBusinessLicense ¶
func OCRBusinessLicense(dest *BusinessLicense, mode OCRMode, filename string) wx.Action
OCRBusinessLicense 营业执照识别
func OCRBusinessLicenseByURL ¶
func OCRBusinessLicenseByURL(dest *BusinessLicense, mode OCRMode, imgURL string) wx.Action
OCRBusinessLicenseByURL 营业执照识别
func OCRDriverLicense ¶
func OCRDriverLicense(dest *DriverLicense, mode OCRMode, filename string) wx.Action
OCRDriverLicense 驾照识别
func OCRDriverLicenseByURL ¶
func OCRDriverLicenseByURL(dest *DriverLicense, mode OCRMode, imgURL string) wx.Action
OCRDriverLicenseByURL 驾照识别
func OCRIDCardBack ¶
func OCRIDCardBack(dest *IDCardBack, mode OCRMode, filename string) wx.Action
OCRIDCardBack 身份证背面识别
func OCRIDCardBackByURL ¶
func OCRIDCardBackByURL(dest *IDCardBack, mode OCRMode, imgURL string) wx.Action
OCRIDCardBackByURL 身份证背面识别
func OCRIDCardFront ¶
func OCRIDCardFront(dest *IDCardFront, mode OCRMode, filename string) wx.Action
OCRIDCardFront 身份证前面识别
func OCRIDCardFrontByURL ¶
func OCRIDCardFrontByURL(dest *IDCardFront, mode OCRMode, imgURL string) wx.Action
OCRIDCardFrontByURL 身份证前面识别
func OCRPlateNumber ¶
func OCRPlateNumber(dest *PlateNumber, mode OCRMode, filename string) wx.Action
OCRPlateNumber 车牌号识别
func OCRPlateNumberByURL ¶
func OCRPlateNumberByURL(dest *PlateNumber, mode OCRMode, imgURL string) wx.Action
OCRPlateNumberByURL 车牌号识别
func OCRPrintedText ¶
func OCRPrintedText(dest *PrintedText, mode OCRMode, filename string) wx.Action
OCRPrintedText 通用印刷体识别
func OCRPrintedTextByURL ¶
func OCRPrintedTextByURL(dest *PrintedText, mode OCRMode, imgURL string) wx.Action
OCRPrintedTextByURL 通用印刷体识别
func OCRVehicleLicense ¶
func OCRVehicleLicense(dest *VehicleLicense, mode OCRMode, filename string) wx.Action
OCRVehicleLicense 行驶证识别
func OCRVehicleLicenseByURL ¶
func OCRVehicleLicenseByURL(dest *VehicleLicense, mode OCRMode, imgURL string) wx.Action
OCRVehicleLicenseByURL 行驶证识别
func ScanQRCode ¶
func ScanQRCode(dest *QRCodeScanResult, filename string) wx.Action
ScanQRCode 条码/二维码识别
func ScanQRCodeByURL ¶
func ScanQRCodeByURL(dest *QRCodeScanResult, imgURL string) wx.Action
ScanQRCodeByURL 条码/二维码识别
func SendSubscribeMessage ¶
func SendSubscribeMessage(openID, scene, title string, msg *TemplateMessage) wx.Action
SendSubscribeMessage 发送一次性订阅消息
func SendTemplateMessage ¶
func SendTemplateMessage(openID string, msg *TemplateMessage) wx.Action
SendTemplateMessage 发送模板消息
func SetUserRemark ¶
SetUserRemark 设置用户备注名(该接口暂时开放给微信认证的服务号)
func SuperreSolution ¶
func SuperreSolution(dest *SuperreSolutionResult, filename string) wx.Action
SuperreSolution 图片高清化
func SuperreSolutionByURL ¶
func SuperreSolutionByURL(dest *SuperreSolutionResult, imgURL string) wx.Action
SuperreSolutionByURL 图片高清化
func TryMatchMenu ¶
func TryMatchMenu(dest *[]*MenuButton, userID string) wx.Action
TryMatchMenu 测试匹配个性化菜单 注意:user_id可以是粉丝的OpenID,也可以是粉丝的微信号。
func UnBlackSubscribers ¶
UnBlackSubscriber 取消拉黑用户
func UpdateKFAccount ¶
UpdateKFAccount 设置客服信息 完整客服帐号,格式为:帐号前缀@公众号微信号,帐号前缀最多10个字符,必须是英文、数字字符或者下划线,后缀为公众号微信号,长度不超过30个字符 客服昵称,最长16个字
func UploadKFAvatar ¶
UploadKFAvatar 上传客服头像 完整客服帐号,格式为:帐号前缀@公众号微信号
func UploadMedia ¶
func UploadMedia(dest *MediaUploadResult, mediaType MediaType, filename string) wx.Action
UploadMedia 上传临时素材
func UploadNewsImage ¶
func UploadNewsImage(dest *MaterialAddResult, filename string) wx.Action
UploadNewsImage 上传图文消息内的图片(不受公众号的素材库中图片数量的100000个的限制,图片仅支持jpg/png格式,大小必须在1MB以下)
func UploadVideo ¶
func UploadVideo(dest *MaterialAddResult, filename, title, introduction string) wx.Action
UploadVideo 上传视频永久素材
Types ¶
type AICropResult ¶
type AICropResult struct { Results []*CropPosition `json:"results"` ImgSize ImageSize `json:"img_size"` }
AICropResult 图片裁切结果
type AccessToken ¶
AccessToken 公众号普通AccessToken
type Article ¶
type Article struct { Title wx.CDATA `xml:"Title"` // 图文消息标题 Description wx.CDATA `xml:"Description"` // 图文消息描述 PicURL wx.CDATA `xml:"PicUrl"` // 图片链接, 支持JPG, PNG格式, 较好的效果为大图360*200, 小图200*200 URL wx.CDATA `xml:"Url"` // 点击图文消息跳转链接 }
Article 公众号图文
type AuthToken ¶
type AuthToken struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` ExpiresIn int64 `json:"expires_in"` OpenID string `json:"openid"` Scope string `json:"scope"` }
AuthToken 公众号网页授权Token
type AuthUser ¶
type AuthUser struct { OpenID string `json:"openid"` UnionID string `json:"unionid"` Nickname string `json:"nickname"` Sex string `json:"sex"` Province string `json:"province"` City string `json:"city"` Country string `json:"country"` HeadImgURL string `json:"headimgurl"` Privilege []string `json:"privilege"` }
AuthUser 授权用户信息
type BusinessLicense ¶
type BusinessLicense struct { RegNum string `json:"reg_num"` // 注册号 Serial string `json:"serial"` // 编号 LegalRepresentative string `json:"legal_representative"` // 法定代表人姓名 EnterpriseName string `json:"enterprise_name"` // 企业名称 TypeOfOrganization string `json:"type_of_organization"` // 组成形式 Address string `json:"address"` // 经营场所/企业住所 TypeOfEnterprise string `json:"type_of_enterprise"` // 公司类型 BusinessScope string `json:"business_scope"` // 经营范围 RegisteredCapital string `json:"registered_capital"` // 注册资本 PaidInCapital string `json:"paid_in_capital"` // 实收资本 ValidPeriod string `json:"valid_period"` // 营业期限 RegisteredDate string `json:"registered_date"` // 注册日期/成立日期 CertPosition OCRPosition `json:"cert_position"` // 营业执照位置 ImgSize ImageSize `json:"img_size"` // 图片大小 }
BusinessLicense 营业执照
type ConditionalMenu ¶
type ConditionalMenu struct { Button []*MenuButton `json:"button"` // 菜单按钮 MatchRule MenuMatchRule `json:"matchrule"` // 菜单匹配规则 MenuID int64 `json:"menuid"` // 菜单ID }
ConditionalMenu 个性化菜单
type CropPosition ¶
type CropPosition struct { CropLeft int `json:"crop_left"` CropTop int `json:"crop_top"` CropRight int `json:"crop_right"` CropBottom int `json:"crop_bottom"` }
CropPosition 裁切位置
type DriverLicense ¶
type DriverLicense struct { IDNum string `json:"id_num"` // 证号 Name string `json:"name"` // 姓名 Sex string `json:"sex"` // 性别 Nationality string `json:"nationality"` // 国籍 Address string `json:"address"` // 住址 BirthDate string `json:"birth_date"` // 出生日期 IssueDate string `json:"issue_date"` // 初次领证日期 CarClass string `json:"car_class"` // 准驾车型 ValidFrom string `json:"valid_from"` // 有效期限起始日 ValidTo string `json:"valid_to"` // 有效期限终止日 OfficialSeal string `json:"official_seal"` // 印章文字 }
DriverLicense 驾照
type IDCardFront ¶
type IDCardFront struct { Name string `json:"name"` ID string `json:"id"` Addr string `json:"addr"` Gender string `json:"gender"` Nationality string `json:"nationality"` }
IDCardFront 身份证前面
type ImagePosition ¶
type ImagePosition struct { LeftTop Position `json:"left_top"` RightTop Position `json:"right_top"` RightBottom Position `json:"right_bottom"` LeftBottom Position `json:"left_bottom"` }
ImagePosition 图片位置
type ImageReply ¶
type ImageReply struct { ReplyHeader Image struct { MediaID wx.CDATA `xml:"MediaId"` // 通过素材管理接口上传多媒体文件得到 MediaId } `xml:"Image"` }
ImageReply 公众号图片回复消息
type JSSDKSign ¶
type JSSDKSign struct { Signature string `json:"signature"` Noncestr string `json:"noncestr"` Timestamp int64 `json:"timestamp"` }
JSSDKSign JS-SDK签名
type JSSDKTicket ¶
JSSDKTicket 公众号 JS-SDK ticket
type KFAccount ¶
type KFAccount struct { ID string `json:"kf_id"` // 客服编号 Account string `json:"kf_account"` // 完整客服帐号,格式为:帐号前缀@公众号微信号 Nickname string `json:"kf_nick"` // 客服昵称 HeadImgURL string `json:"kf_headimgurl"` // 客服头像 Weixin string `json:"kf_wx"` // 如果客服帐号已绑定了客服人员微信号, 则此处显示微信号 InviteWeixin string `json:"invite_wx"` // 如果客服帐号尚未绑定微信号,但是已经发起了一个绑定邀请, 则此处显示绑定邀请的微信号 InviteExpireTime int64 `json:"invite_expire_time"` // 如果客服帐号尚未绑定微信号,但是已经发起过一个绑定邀请, 邀请的过期时间,为unix 时间戳 InviteStatus KFInviteStatus `json:"invite_status"` // 邀请的状态,有等待确认“waiting”,被拒绝“rejected”, 过期“expired” }
KFAccount 客服账号
type KFInviteStatus ¶
type KFInviteStatus string
KFInviteStatus 客服邀请状态
const ( InviteWaiting KFInviteStatus = "waiting" // 待确认 InviteRejected KFInviteStatus = "rejected" // 被拒绝 InviteExpired KFInviteStatus = "expired" // 已过期 )
微信支持的客服邀请状态
type KFMsgRecord ¶
type KFMsgRecord struct { Worker string `json:"worker"` // 完整客服帐号,格式为:帐号前缀@公众号微信号 OpenID string `json:"openid"` // 用户标识 OperCode int `json:"opercode"` // 操作码(2002-客服发送信息,2003-客服接收消息) Text string `json:"text"` // 聊天记录 Time int64 `json:"time"` // 操作时间,unix时间戳 }
KFMsgRecord 客服聊天记录
type KFMsgRecordList ¶
type KFMsgRecordList struct { MsgID int64 `json:"msgid"` Number int `json:"number"` RecordList []*KFMsgRecord `json:"recordlist"` }
KFMsgRecordList 客服聊天记录列表
type KFOnline ¶
type KFOnline struct { ID string `json:"kf_id"` // 客服编号 Account string `json:"kf_account"` // 完整客服帐号,格式为:帐号前缀@公众号微信号 Status int `json:"status"` // 客服在线状态,目前为:1-web在线 AcceptedCase int `json:"accepted_case"` // 客服当前正在接待的会话数 }
KFOnline 在线客服
type KFSession ¶
type KFSession struct { KFAccount string `json:"kf_account"` // 正在接待的客服,为空表示没有人在接待 OpenID string `json:"openid"` // 粉丝的openid CreateTime int64 `json:"createtime"` // 会话接入的时间 LatestTime int64 `json:"latest_time"` // 粉丝的最后一条消息的时间 }
KFSession 客服会话
type KFWaitCase ¶
KFWaitCase 客服未接入会话
type MaterialAddResult ¶
MaterialAddResult 永久素材新增结果
type MediaUploadResult ¶
type MediaUploadResult struct { Type string `json:"type"` MediaID string `json:"media_id"` CreatedAt int64 `json:"created_at"` }
MediaUploadResult 临时素材上传结果
type Menu ¶
type Menu struct { Button []*MenuButton `json:"button"` // 菜单按钮 MenuID int64 `json:"menuid"` // 菜单ID(有个性化菜单时返回) }
Menu 普通菜单
type MenuButton ¶
type MenuButton struct { Type MenuButtonType `json:"type,omitempty"` // 菜单的响应动作类型,view表示网页类型,click表示点击类型,miniprogram表示小程序类型 Name string `json:"name,omitempty"` // 菜单标题,不超过16个字节,子菜单不超过60个字节 Key string `json:"key,omitempty"` // click等点击类型必须,菜单KEY值,用于消息接口推送,不超过128字节 URL string `json:"url,omitempty"` // view、miniprogram类型必须,网页 链接,用户点击菜单可打开链接,不超过1024字节。 type为miniprogram时,不支持小程序的老版本客户端将打开本url。 AppID string `json:"appid,omitempty"` // miniprogram类型必须,小程序的appid(仅认证公众号可配置) Pagepath string `json:"pagepath,omitempty"` // miniprogram类型必须,小程序的页面路径 MediaID string `json:"media_id,omitempty"` // media_id类型和view_limited类型必须,调用新增永久素材接口返回的合法media_id SubButton []*MenuButton `json:"sub_button,omitempty"` // 二级菜单数组,个数应为1~5个 }
MenuButton 菜单按钮
func GroupButton ¶
func GroupButton(name string, buttons ...*MenuButton) *MenuButton
GroupButton 组合按钮
func LocationSelectButton ¶
func LocationSelectButton(name, key string) *MenuButton
LocationSelectButton 发送位置按钮
func MinipButton ¶
func MinipButton(name, appid, pagepath, redirectURL string) *MenuButton
MinipButton 小程序跳转按钮
func PicPhotoOrAlbumButton ¶
func PicPhotoOrAlbumButton(name, key string) *MenuButton
PicPhotoOrAlbum 拍照或者相册发图按钮
func PicSysPhotoButton ¶
func PicSysPhotoButton(name, key string) *MenuButton
PicSysPhotoButton 系统拍照发图按钮
func ScanCodePushButton ¶
func ScanCodePushButton(name, key string) *MenuButton
ScanCodePushButton 扫码推事件按钮
func ScanCodeWaitMsgButton ¶
func ScanCodeWaitMsgButton(name, key string) *MenuButton
ScanCodeWaitMsgButton 扫码带提示按钮
func ViewLimitedButton ¶
func ViewLimitedButton(name, mediaID string) *MenuButton
ViewLimitedButton 图文消息按钮
type MenuButtonType ¶
type MenuButtonType string
MenuButtonType 菜单按钮类型
const ( ButtonClick MenuButtonType = "click" // 点击推事件用户点击click类型按钮后,微信服务器会通过消息接口推送消息类型为event的结构给开发者(参考消息接口指南),并且带上按钮中开发者填写的key值,开发者可以通过自定义的key值与用户进行交互。 ButtonView MenuButtonType = "view" // 跳转URL用户点击view类型按钮后,微信客户端将会打开开发者在按钮中填写的网页URL,可与网页授权获取用户基本信息接口结合,获得用户基本信息。 ButtonScanCodePush MenuButtonType = "scancode_push" // 扫码推事件用户点击按钮后,微信客户端将调起扫一扫工具,完成扫码操作后显示扫描结果(如果是URL,将进入URL),且会将扫码的结果传给开发者,开发者可以下发消息。 ButtonScanCodeWaitMsg MenuButtonType = "scancode_waitmsg" // 扫码推事件且弹出“消息接收中”提示框用户点击按钮后,微信客户端将调起扫一扫工具,完成扫码操作后,将扫码的结果传给开发者,同时收起扫一扫工具,然后弹出“消息接收中”提示框,随后可能会收到开发者下发的消息。 ButtonPicSysPhoto MenuButtonType = "pic_sysphoto" // 弹出系统拍照发图用户点击按钮后,微信客户端将调起系统相机,完成拍照操作后,会将拍摄的相片发送给开发者,并推送事件给开发者,同时收起系统相机,随后可能会收到开发者下发的消息。 ButtonPicPhotoOrAlbum MenuButtonType = "pic_photo_or_album" // 弹出拍照或者相册发图用户点击按钮后,微信客户端将弹出选择器供用户选择“拍照”或者“从手机相册选择”。用户选择后即走其他两种流程。 ButtonPicWeixin MenuButtonType = "pic_weixin" // 弹出微信相册发图器用户点击按钮后,微信客户端将调起微信相册,完成选择操作后,将选择的相片发送给开发者的服务器,并推送事件给开发者,同时收起相册,随后可能会收到开发者下发的消息。 ButtonLocationSelect MenuButtonType = "location_select" // 弹出地理位置选择器用户点击按钮后,微信客户端将调起地理位置选择工具,完成选择操作后,将选择的地理位置发送给开发者的服务器,同时收起位置选择工具,随后可能会收到开发者下发的消息。 ButtonMedia MenuButtonType = "media_id" // 下发消息(除文本消息)用户点击media_id类型按钮后,微信服务器会将开发者填写的永久素材id对应的素材下发给用户,永久素材类型可以是图片、音频、视频、图文消息。请注意:永久素材id必须是在“素材管理/新增永久素材”接口上传后获得的合法id。 ButtonViewLimited MenuButtonType = "view_limited" // 跳转图文消息URL用户点击view_limited类型按钮后,微信客户端将打开开发者在按钮中填写的永久素材id对应的图文消息URL,永久素材类型只支持图文消息。请注意:永久素材id必须是在“素材管理/新增永久素材”接口上传后获得的合法id。 ButtonMinip MenuButtonType = "miniprogram" // 小程序页面跳转,不支持小程序的老版本客户端将打开指定的URL。 )
微信支持的按钮
type MenuInfo ¶
type MenuInfo struct { Menu Menu `json:"menu"` // 普通菜单 ConditionalMenu []*ConditionalMenu `json:"conditionalmenu"` // 个性化菜单 }
MenuInfo 自定义菜单信息
type MenuMatchRule ¶
type MenuMatchRule struct { TagID string `json:"tag_id,omitempty"` // 用户标签的id,可通过用户标签管理接口获取,不填则不做匹配 Sex string `json:"sex,omitempty"` // 性别:男(1)女(2),不填则不做匹配 Country string `json:"country,omitempty"` // 国家信息,是用户在微信中设置的地区,具体请参考地区信息表,不填则不做匹配 Province string `json:"province,omitempty"` // 省份信息,是用户在微信中设置的地区,具体请参考地区信息表,不填则不做匹配 City string `json:"city,omitempty"` // 城市信息,是用户在微信中设置的地区,具体请参考地区信息表,不填则不做匹配 ClientPlatformType string `json:"client_platform_type,omitempty"` // 客户端版本,当前只具体到系统型号:IOS(1), Android(2),Others(3),不填则不做匹配 Language string `json:"language,omitempty"` // 语言信息,是用户在微信中设置的语言,具体请参考语言表,不填则不做匹配 }
MenuMatchRule 菜单匹配规则
type MessageMinip ¶
type MessageMinip struct { AppID string `json:"appid"` // 所需跳转到的小程序appid(该小程序appid必须与发模板消息的公众号是绑定关联关系,暂不支持小游戏) Pagepath string `json:"pagepath"` // 所需跳转到小程序的具体页面路径,支持带参数,(示例index?foo=bar),要求该小程序已发布,暂不支持小游戏 }
MessageMinip 跳转小程序
type MusicReply ¶
type MusicReply struct { ReplyHeader Music struct { Title wx.CDATA `xml:"Title,omitempty"` // 音乐标题 Description wx.CDATA `xml:"Description,omitempty"` // 音乐描述 MusicURL wx.CDATA `xml:"MusicUrl,omitempty"` // 音乐链接 HQMusicURL wx.CDATA `xml:"HQMusicUrl,omitempty"` // 高质量音乐链接, WIFI环境优先使用该链接播放音乐 ThumbMediaID wx.CDATA `xml:"ThumbMediaId"` // 通过素材管理接口上传多媒体文件得到 ThumbMediaId } `xml:"Music"` }
MusicReply 公众号音乐回复
type NewsArticle ¶
type NewsArticle struct { Title string `json:"title"` ThumbMediaID string `json:"thumb_media_id"` Author string `json:"author"` Digest string `json:"digest"` ShowCoverPic int `json:"show_cover_pic"` Content string `json:"content"` ContentSourceURL string `json:"content_source_url"` NeedOpenComment int `json:"need_open_comment"` OnlyFansCanComment int `json:"only_fans_can_comment"` }
NewsArticle 文章素材
type NewsReply ¶
type NewsReply struct { ReplyHeader ArticleCount int `xml:"ArticleCount"` // 图文消息个数, 限制为10条以内 Articles []*Article `xml:"Articles>item"` // 多条图文消息信息, 默认第一个item为大图, 注意, 如果图文数超过10, 则将会无响应 }
NewsReply 公众号图文回复
type OA ¶
type OA struct {
// contains filtered or unexported fields
}
OA 微信公众号
func (*OA) AccessToken ¶
func (oa *OA) AccessToken(ctx context.Context, options ...wx.HTTPOption) (*AccessToken, error)
AccessToken 获取普通AccessToken
func (*OA) Code2AuthToken ¶
func (oa *OA) Code2AuthToken(ctx context.Context, code string, options ...wx.HTTPOption) (*AuthToken, error)
Code2AuthToken 获取网页授权AccessToken
func (*OA) DecryptEventMessage ¶
DecryptEventMessage 事件消息解密
func (*OA) Do ¶
func (oa *OA) Do(ctx context.Context, accessToken string, action wx.Action, options ...wx.HTTPOption) error
Do exec action
func (*OA) RefreshAuthToken ¶
func (oa *OA) RefreshAuthToken(ctx context.Context, refreshToken string, options ...wx.HTTPOption) (*AuthToken, error)
RefreshAuthToken 刷新网页授权AccessToken
func (*OA) SetServerConfig ¶
SetServerConfig 设置服务器配置 [参考](https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Access_Overview.html)
func (*OA) VerifyEventSign ¶
VerifyEventSign 验证消息事件签名 验证消息来自微信服务器,使用:signature、timestamp、nonce;若验证成功,请原样返回echostr参数内容 验证事件消息签名,使用:msg_signature、timestamp、nonce、msg_encrypt [参考](https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Access_Overview.html)
type PrintedText ¶
type PrintedText struct { Items []*PrintedTextItem `json:"items"` ImgSize ImageSize `json:"img_size"` }
PrintedText 通用印刷体
type PrintedTextItem ¶
type PrintedTextItem struct { Text string `json:"text"` Pos ImagePosition `json:"pos"` }
PrintedTextItem 通用印刷体内容项
type QRCode ¶
type QRCode struct { Ticket string `json:"ticket"` ExpireSeconds int64 `json:"expire_seconds"` URL string `json:"url"` }
QRCode 二维码获取信息
type QRCodeScanData ¶
type QRCodeScanData struct { TypeName string `json:"type_name"` Data string `json:"data"` Pos ImagePosition `json:"pos"` }
QRCodeScanData 二维码扫描数据
type QRCodeScanResult ¶
type QRCodeScanResult struct { CodeResults []*QRCodeScanData `json:"code_results"` ImgSize ImageSize `json:"img_size"` }
QRCodeScanResult 二维码扫描结果
type ReplyHeader ¶
type ReplyHeader struct { XMLName xml.Name `xml:"xml"` FromUserName wx.CDATA `xml:"FromUserName"` ToUserName wx.CDATA `xml:"ToUserName"` CreateTime int64 `xml:"CreateTime"` MsgType wx.CDATA `xml:"MsgType"` }
ReplyHeader 公众号消息回复公共头
type SubscribeScene ¶
type SubscribeScene string
SubscribeScene 关注的渠道来源
const ( SceneSearch SubscribeScene = "ADD_SCENE_SEARCH" // 公众号搜索 SceneQRCode SubscribeScene = "ADD_SCENE_QR_CODE" // 扫描二维码 SceneAccountMigration SubscribeScene = "ADD_SCENE_ACCOUNT_MIGRATION" // 公众号迁移 SceneProfileCard SubscribeScene = "ADD_SCENE_PROFILE_CARD" // 名片分享 SceneProfileLink SubscribeScene = "ADD_SCENE_PROFILE_LINK" // 图文页内名称点击 SceneProfileItem SubscribeScene = "ADD_SCENE_PROFILE_ITEM" // 图文页右上角菜单 ScenePaid SubscribeScene = "ADD_SCENE_PAID" // 支付后关注 SceneWechatAD SubscribeScene = "ADD_SCENE_WECHAT_ADVERTISEMENT" // 微信广告 SceneOthers SubscribeScene = "ADD_SCENE_OTHERS" // 其他 )
微信支持的关注的渠道来源
type SubscriberInfo ¶
type SubscriberInfo struct { Subscribe int `json:"subscribe"` // 用户是否订阅该公众号标识,值为0时,代表此用户没有关注该公众号,拉取不到其余信息。 OpenID string `json:"openid"` // 用户的标识,对当前公众号唯一 NickName string `json:"nickname"` // 用户的昵称 Sex int `json:"sex"` // 用户的性别,男(1),女(2),未知(0) Country string `json:"country"` // 用户所在国家 City string `json:"city"` // 用户所在城市 Province string `json:"province"` // 用户所在省份 Language string `json:"language"` // 用户的语言,简体中文为zh_CN HeadImgURL string `json:"headimgurl"` // 用户头像,最后一个数值代表正方形头像大小(有0、46、64、96、132数值可选,0代表640*640正方形头像),用户没有头像时该项为空。若用户更换头像,原有头像URL将失效。 SubscribeTime int64 `json:"subscribe_time"` // 用户关注时间,为时间戳。如果用户曾多次关注,则取最后关注时间 UnionID string `json:"unionid"` // 只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段。 Remark string `json:"remark"` // 公众号运营者对粉丝的备注,公众号运营者可在微信公众平台用户管理界面对粉丝添加备注 GroupID int64 `json:"groupid"` // 用户所在的分组ID(兼容旧的用户分组接口) TagidList []int64 `json:"tagid_list"` // 用户被打上的标签ID列表 SubscribeScene SubscribeScene `json:"subscribe_scene"` // 用户关注的渠道来源 QRScene int64 `json:"qr_scene"` // 二维码扫码场景(开发者自定义) QRSceneStr string `json:"qr_scene_str"` // 二维码扫码场景描述(开发者自定义) }
SubscriberInfo 关注用户信息
type SubscriberList ¶
type SubscriberList struct { Total int `json:"total"` Count int `json:"count"` Data SubscriberListData `json:"data"` NextOpenID string `json:"next_openid"` }
SubscriberList 关注列表
type SubscriberListData ¶
type SubscriberListData struct {
OpenID []string `json:"openid"`
}
SubscriberListData 关注列表数据
type SuperreSolutionResult ¶
type SuperreSolutionResult struct {
MediaID string `json:"media_id"`
}
SuperreSolutionResult 图片高清化结果
type TemplateInfo ¶
type TemplateInfo struct { TemplateID string `json:"template_id"` // 模板ID Title string `json:"title"` // 模板标题 PrimaryIndustry string `json:"primary_industry"` // 模板所属行业的一级行业 DeputyIndustry string `json:"deputy_industry"` // 模板所属行业的二级行业 Content string `json:"content"` // 模板内容 Example string `json:"example"` // 模板示例 }
TemplateInfo 模板信息
type TemplateMessage ¶
type TemplateMessage struct { TemplateID string // 模板ID URL string // 模板跳转链接(海外帐号没有跳转能力) MiniProgram *MessageMinip // 跳转小程序 Data MessageBody // 模板内容,格式形如:{"key1":{"value":"V","color":"#"},"key2":{"value": "V","color":"#"}} }
TemplateMessage 公众号模板消息
type TextReply ¶
type TextReply struct { ReplyHeader Content wx.CDATA `xml:"Content"` }
TextReply 公众号文本回复
type TicketType ¶
type TicketType string
JS-SDK ticket 类型
const ( APITicket TicketType = "wx_card" JSAPITicket TicketType = "jsapi" )
微信支持的 JS-SDK ticket
type Transfer2KFReply ¶
type Transfer2KFReply struct { ReplyHeader TransInfo *TransInfo `xml:"TransInfo,omitempty"` }
Transfer2KFReply 公众号消息转客服
type VehicleLicense ¶
type VehicleLicense struct { VehicleType string `json:"vhicle_type"` // 车辆类型 Owner string `json:"owner"` // 所有人 Addr string `json:"addr"` // 住址 UseCharacter string `json:"use_character"` // 使用性质 Model string `json:"model"` // 品牌型号 VIN string `json:"vin"` // 车辆识别代号 EngineNum string `json:"engine_num"` // 发动机号码 RegisterDate string `json:"register_date"` // 注册日期 IssueDate string `json:"issue_date"` // 发证日期 PlateNum string `json:"plate_num"` // 车牌号码 PlateNumB string `json:"plate_num_b"` // 车牌号码 Record string `json:"record"` // 号牌 PassengersNum string `json:"passengers_num"` // 核定载人数 TotalQuality string `json:"total_quality"` // 总质量 PrepareQuality string `json:"prepare_quality"` // 整备质量 OverallSize string `json:"overall_size"` // 外廓尺寸 CardPositionFront OCRPosition `json:"card_position_front"` // 卡片正面位置(检测到卡片正面才会返回) CardPositionBack OCRPosition `json:"card_position_back"` // 卡片反面位置(检测到卡片反面才会返回) }
VehicleLicense 行驶证
type VideoReply ¶
type VideoReply struct { ReplyHeader Video struct { MediaID wx.CDATA `xml:"MediaId"` // 通过素材管理接口上传多媒体文件得到 MediaId Title wx.CDATA `xml:"Title,omitempty"` // 视频消息的标题, 可以为空 Description wx.CDATA `xml:"Description,omitempty"` // 视频消息的描述, 可以为空 } `xml:"Video" json:"Video"` }
VideoReply 公众号视频回复
type VoiceReply ¶
type VoiceReply struct { ReplyHeader Voice struct { MediaID wx.CDATA `xml:"MediaId"` // 通过素材管理接口上传多媒体文件得到 MediaId } `xml:"Voice"` }
VoiceReply 公众号语音回复