mp_api

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ServerHostUniversal 通用域名
	ServerHostUniversal = "api.weixin.qq.com"
	// ServerHostUniversal2 通用异地容灾域名
	ServerHostUniversal2 = "api2.weixin.qq.com"
	// ServerHostShangHai 上海域名
	ServerHostShangHai = "sh.api.weixin.qq.com"
	// ServerHostShenZhen 深圳域名
	ServerHostShenZhen = "sz.api.weixin.qq.com"
	// ServerHostHK 香港域名
	ServerHostHK = "hk.api.weixin.qq.com"
)
View Source
const (

	// BasicInformationToken 获取Access token
	BasicInformationToken = "cgi-bin/token"
	// BasicInformationApiDomainIp 获取微信服务器IP地址
	BasicInformationApiDomainIp = "cgi-bin/get_api_domain_ip"
	// BasicInformationCallbackCheck 网络检测
	BasicInformationCallbackCheck = "cgi-bin/callback/check"

	// CustomMenuCreate 创建自定义菜单
	CustomMenuCreate = "cgi-bin/menu/create"
	// CustomMenuCurrentSelfMenuInfo 查询自定义菜单
	CustomMenuCurrentSelfMenuInfo = "cgi-bin/get_current_selfmenu_info"
	// CustomMenuDelete 删除默认菜单及全部个性化菜单
	CustomMenuDelete = "cgi-bin/menu/delete"

	// MessageCustomServiceKfAccountAdd 添加客服
	MessageCustomServiceKfAccountAdd = "customservice/kfaccount/add"
	// MessageCustomServiceKfAccountUpdate 修改客服
	MessageCustomServiceKfAccountUpdate = "customservice/kfaccount/update"
	// MessageCustomServiceKfAccountDel 删除客服
	MessageCustomServiceKfAccountDel = "customservice/kfaccount/del"
	// MessageCustomServiceKfAccountUploadHeadImg 上传客服头像
	MessageCustomServiceKfAccountUploadHeadImg = "customservice/kfaccount/uploadheadimg"
	// MessageCustomServiceKfList 获取所有客服
	MessageCustomServiceKfList = "cgi-bin/customservice/getkflist"
	// MessageCustomSend 客服接口-发消息
	MessageCustomSend = "cgi-bin/message/custom/send"
	// MessageTemplateSend 发送模板消息
	MessageTemplateSend = "cgi-bin/message/template/send"
	// MessageMassSend 根据OpenID列表群发
	MessageMassSend = "cgi-bin/message/mass/send"

	// MediaUploadImg 上传图文消息内的图片获取URL
	MediaUploadImg = "cgi-bin/media/uploadimg"
	// MediaUpload 新增临时素材
	MediaUpload = "cgi-bin/media/upload"

	// OaWebAppsSnsAuth2AccessToken 通过code换取网页授权access_token
	OaWebAppsSnsAuth2AccessToken = "sns/oauth2/access_token"
	// OaWebAppsSnsUserInfo 拉取用户信息(需scope为 snsapi_userinfo)
	OaWebAppsSnsUserInfo = "sns/userinfo"
	// OaWebAppsJsSDKTicket 获取JsSDK ticket
	OaWebAppsJsSDKTicket = "cgi-bin/ticket/getticket"

	// UserTagsCreate 创建标签
	UserTagsCreate = "cgi-bin/tags/create"
	// UserTagsGet 获取公众号已创建的标签
	UserTagsGet = "cgi-bin/tags/get"
	// UserTagsUpdate 编辑标签
	UserTagsUpdate = "cgi-bin/tags/update"
	// UserTagsDelete 删除标签
	UserTagsDelete = "cgi-bin/tags/delete"
	// UserTagGet 获取标签下粉丝列表
	UserTagGet = "cgi-bin/user/tag/get"
	// UserTagMembersBatch 批量为用户打标签
	UserTagMembersBatch = "cgi-bin/tags/members/batchtagging"
	// UserTagMembersBatchUnTag 批量为用户取消标签
	UserTagMembersBatchUnTag = "cgi-bin/tags/members/batchuntagging"
	// UserTagsGetIdList 获取用户身上的标签列表
	UserTagsGetIdList = "cgi-bin/tags/getidlist"
	// UserInfoUpdateRemark 用户设置备注名
	UserInfoUpdateRemark = "cgi-bin/user/info/updateremark"
	// UserInfo 获取用户基本信息(包括UnionID机制)
	UserInfo = "cgi-bin/user/info"
	// UserInfoBatchGet 批量获取用户基本信息
	UserInfoBatchGet = "cgi-bin/user/info/batchget"
	// UserGet 获取关注者列表
	UserGet = "cgi-bin/user/get"

	// AccountQrCreate 二维码
	AccountQrCreate = "cgi-bin/qrcode/create"
	// AccountShortUrl 长链接转成短链接
	AccountShortUrl = "cgi-bin/shorturl"

	// GuideAccountAdd 添加顾问
	GuideAccountAdd = "cgi-bin/guide/addguideacct"
	// GuideAddBuyer 为顾问分配客户
	GuideAddBuyer = "cgi-bin/guide/addguidebuyerrelation"

	// SnsJsCode2Session 登录凭证校验
	SnsJsCode2Session = "sns/jscode2session"
	// WXACode 获取小程序码
	WXACode = "wxa/getwxacode"
	// WXACodeUnLimit 获取不限制的小程序码
	WXACodeUnLimit = "wxa/getwxacodeunlimit"
	// WXAQrCode 获取小程序二维码
	WXAQrCode = "cgi-bin/wxaapp/createwxaqrcode"

	// OcrBandCard 银行卡识别
	OcrBandCard = "cv/ocr/bankcard"
	// OcrBusinessLicense 营业执照识别
	OcrBusinessLicense = "cv/ocr/bizlicense"
	// OcrDrivingLicense 营业执照识别
	OcrDrivingLicense = "cv/ocr/drivinglicense"
	// OcrIdCard 身份证识别
	OcrIdCard = "cv/ocr/idcard"
	// OcrText 普通文字识别
	OcrText = "cv/ocr/comm"
)
View Source
const (
	MessageCustomSendTypeText            = "text"
	MessageCustomSendTypeImage           = "image"
	MessageCustomSendTypeVideo           = "video"
	MessageCustomSendTypeMusic           = "music"
	MessageCustomSendTypeNews            = "news"
	MessageCustomSendTypeMpNews          = "mpnews"
	MessageCustomSendTypeMsgMenu         = "msgmenu"
	MessageCustomSendTypeWxCard          = "wxcard"
	MessageCustomSendTypeMiniProgramPage = "miniprogrampage"
)
View Source
const (
	MessageMassSendTypeMpNews  = "mpnews"
	MessageMassSendTypeText    = "text"
	MessageMassSendTypeVoice   = "voice"
	MessageMassSendTypeImages  = "images"
	MessageMassSendTypeMpVideo = "mpvideo"
	MessageMassSendTypeWxCard  = "wxcard"
)
View Source
const (
	MediaTypeImage = "image"
	MediaTypeVoice = "voice"
	MediaTypeVideo = "video"
	MediaTypeThumb = "thumb"
)
View Source
const (
	QrActionTypeScene         = "QR_SCENE"
	QrActionTypeStrScene      = "QR_STR_SCENE"
	QrActionTypeLimitScene    = "QR_LIMIT_SCENE"
	QrActionTypeLimitStrScene = "QR_LIMIT_STR_SCENE"
)
View Source
const (
	TokenGrantTypeClientCredential = "client_credential"
	TokenGrantTypeAuthCode         = "authorization_code"
)
View Source
const (
	JsSDKTicketTypeJSAPI  = "jsapi"
	JsSDKTicketTypeWxCard = "wx_card"
)
View Source
const ShortUrlAction = "long2short"

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountQrActionInfo added in v1.1.1

type AccountQrActionInfo struct {
	Scene AccountQrScene `json:"scene"`
}

type AccountQrCreateData

type AccountQrCreateData struct {
	ExpireSeconds int64               `json:"expire_seconds,omitempty"`
	ActionName    QrActionType        `json:"action_name"`
	ActionInfo    AccountQrActionInfo `json:"action_info"`
}

type AccountQrCreateRes

type AccountQrCreateRes struct {
	MpBaseResp
	Ticket        string `json:"ticket"`
	ExpireSeconds int64  `json:"expire_seconds,omitempty"`
	Url           string `json:"url"`
}

type AccountQrScene added in v1.1.1

type AccountQrScene struct {
	SceneId  int64  `json:"scene_id,omitempty"`
	SceneStr string `json:"scene_str,omitempty"`
}

type AccountShortUrlData

type AccountShortUrlData struct {
	Action  string `json:"action"`
	LongUrl string `json:"long_url"`
}

type AccountShortUrlRes

type AccountShortUrlRes struct {
	MpBaseResp
	ShortUrl string `json:"short_url"`
}

type BasicInformationTokenQuery

type BasicInformationTokenQuery struct {
	GrantType string `url:"grant_type"`
	AppId     string `url:"appid"`
	Secret    string `url:"secret"`
}

type BasicInformationTokenRes

type BasicInformationTokenRes struct {
	MpBaseResp
	AccessToken string `json:"access_token"`
	ExpiresIn   int64  `json:"expires_in"`
}

type CallbackCheckData

type CallbackCheckData struct {
	Action        string `json:"action"`
	CheckOperator string `json:"check_operator"`
}

type CallbackCheckRes

type CallbackCheckRes struct {
	MpBaseResp
	Dns []struct {
		Ip           string `json:"ip"`
		RealOperator string `json:"real_operator"`
	} `json:"dns"`
	Ping []struct {
		Ip           string `json:"ip"`
		FromOperator string `json:"from_operator"`
		PackageLoss  string `json:"package_loss"`
		Time         string `json:"time"`
	} `json:"ping"`
}

type CustomMenuCurrentSelfMenuInfoRes

type CustomMenuCurrentSelfMenuInfoRes struct {
	MpBaseResp
	IsMenuOpen   int64 `json:"is_menu_open"`
	SelfMenuInfo struct {
		Button []MenuButton `json:"button"`
	} `json:"selfmenu_info"`
}

type GetApiDomainIpRes

type GetApiDomainIpRes struct {
	MpBaseResp
	IpList []string `json:"ip_list"`
}

type GuideAccountAddData

type GuideAccountAddData struct {
	GuideAccount    string `json:"guide_account,omitempty"`
	GuideOpenId     string `json:"guide_openid,omitempty"`
	GuideHeadImgUrl string `json:"guide_headimgurl,omitempty"`
	GuideNickname   string `json:"guide_nickname,omitempty"`
}

type GuideAddBuyerData

type GuideAddBuyerData struct {
	GuideAccount string `json:"guide_account,omitempty"`
	GuideOpenid  string `json:"guide_openid,omitempty"`
	GuideBuyer
	BuyerList []GuideBuyer `json:"buyer_list,omitempty"`
}

type GuideBuyer

type GuideBuyer struct {
	OpenId        string `json:"openid,omitempty"`
	BuyerNickname string `json:"buyer_nickname,omitempty"`
}

type JsSDKTicketType

type JsSDKTicketType string

type KfAccountData

type KfAccountData struct {
	KfId         int64  `json:"kf_id,omitempty"`
	KfAccount    string `json:"kf_account"`
	NickName     string `json:"nickname"`
	Password     string `json:"password"`
	KfHeadImgUrl string `json:"kf_headimgurl,omitempty"`
}

type MediaType

type MediaType string

type MediaUploadImgRes

type MediaUploadImgRes struct {
	MpBaseResp
	Url string `json:"url"`
}

type MediaUploadQuery

type MediaUploadQuery struct {
	Type MediaType `url:"type"`
}

type MediaUploadRes

type MediaUploadRes struct {
	MpBaseResp
	Type      string `json:"type"`
	MediaId   string `json:"media_id"`
	CreatedAt int64  `json:"created_at"`
}
type MenuButton struct {
	Type      string       `json:"type"`
	Name      string       `json:"name"`
	Key       string       `json:"key,omitempty"`
	Url       string       `json:"url,omitempty"`
	MediaId   string       `json:"media_id,omitempty"`
	AppId     string       `json:"appid,omitempty"`
	PagePath  string       `json:"pagepath,omitempty"`
	SubButton []MenuButton `json:"sub_button,omitempty"`
}
type MenuCreateData struct {
	Button []MenuButton `json:"button"`
}

type MessageCustomSendArticle

type MessageCustomSendArticle struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	Url         string `json:"url"`
	PicUrl      string `json:"picurl"`
}

type MessageCustomSendData

type MessageCustomSendData struct {
	ToUser          string                              `json:"touser"`
	MsgType         MessageCustomSendType               `json:"msgtype"`
	Text            MessageCustomSendMsgText            `json:"text"`
	Image           MessageCustomSendMsgImage           `json:"image"`
	Voice           MessageCustomSendMsgVoice           `json:"voice"`
	Video           MessageCustomSendMsgVideo           `json:"video"`
	Music           MessageCustomSendMsgMusic           `json:"music"`
	News            MessageCustomSendMsgNews            `json:"news"`
	MpNews          MessageCustomSendMsgMpNews          `json:"mpnews"`
	MsgMenu         MessageCustomSendMsgMenu            `json:"msgmenu"`
	WxCard          MessageCustomSendMsgWxCard          `json:"wxcard"`
	MiniProgramPage MessageCustomSendMsgMiniProgramPage `json:"miniprogrampage"`
	CustomService   MessageCustomSendMsgCustomService   `json:"customservice"`
}

type MessageCustomSendMsgCustomService added in v1.1.1

type MessageCustomSendMsgCustomService struct {
	KfAccount string `json:"kf_account"`
}

type MessageCustomSendMsgImage added in v1.1.1

type MessageCustomSendMsgImage struct {
	MediaId string `json:"media_id"`
}

type MessageCustomSendMsgMenu added in v1.1.1

type MessageCustomSendMsgMenu struct {
	HeadContent string                         `json:"head_content"`
	List        []MessageCustomSendMsgMenuItem `json:"list"`
	TailContent string                         `json:"tail_content"`
}

type MessageCustomSendMsgMenuItem

type MessageCustomSendMsgMenuItem struct {
	Id      string `json:"id"`
	Content string `json:"content"`
}

type MessageCustomSendMsgMiniProgramPage added in v1.1.1

type MessageCustomSendMsgMiniProgramPage struct {
	Title        string `json:"title"`
	AppId        string `json:"appid"`
	PagePath     string `json:"pagepath"`
	ThumbMediaId string `json:"thumb_media_id"`
}

type MessageCustomSendMsgMpNews added in v1.1.1

type MessageCustomSendMsgMpNews MessageCustomSendMsgImage

type MessageCustomSendMsgMusic added in v1.1.1

type MessageCustomSendMsgMusic struct {
	Title        string `json:"title"`
	Description  string `json:"description"`
	MusicUrl     string `json:"music_url"`
	HqMusicUrl   string `json:"hq_music_url"`
	ThumbMediaId string `json:"thumb_media_id"`
}

type MessageCustomSendMsgNews added in v1.1.1

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

type MessageCustomSendMsgText added in v1.1.1

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

type MessageCustomSendMsgVideo added in v1.1.1

type MessageCustomSendMsgVideo struct {
	MediaId      string `json:"media_id"`
	ThumbMediaId string `json:"thumb_media_id"`
	Title        string `json:"title"`
	Description  string `json:"description"`
}

type MessageCustomSendMsgVoice added in v1.1.1

type MessageCustomSendMsgVoice MessageCustomSendMsgImage

type MessageCustomSendMsgWxCard added in v1.1.1

type MessageCustomSendMsgWxCard struct {
	CardId string `json:"card_id"`
}

type MessageCustomSendType

type MessageCustomSendType string

type MessageCustomServiceKfAccountUploadHeadImgQuery

type MessageCustomServiceKfAccountUploadHeadImgQuery struct {
	KfAccount string `url:"kf_account"`
}

type MessageCustomServiceKfListRes

type MessageCustomServiceKfListRes struct {
	MpBaseResp
	KfList []KfAccountData `json:"kf_list"`
}

type MessageData

type MessageData struct {
	ToUserName   string  `xml:"ToUserName" json:"to_user_name,omitempty"`
	Encrypt      string  `xml:"Encrypt" json:"encrypt,omitempty"`
	FromUserName string  `xml:"FromUserName" json:"from_user_name,omitempty"`
	CreateTime   int64   `xml:"CreateTime" json:"create_time,omitempty"`
	MsgType      string  `xml:"MsgType" json:"msg_type,omitempty"`
	Content      string  `xml:"Content" json:"content,omitempty"`
	MsgId        int64   `xml:"MsgId" json:"msg_id,omitempty"`
	PicUrl       string  `xml:"PicUrl" json:"pic_url,omitempty"`
	MediaId      string  `xml:"MediaId" json:"media_id,omitempty"`
	Format       string  `xml:"Format" json:"format,omitempty"`
	Recognition  string  `xml:"Recognition" json:"recognition,omitempty"`
	ThumbMediaId string  `xml:"ThumbMediaId" json:"thumb_media_id,omitempty"`
	LocationX    float64 `xml:"Location_X" json:"location_x,omitempty"`
	LocationY    float64 `xml:"Location_Y" json:"location_y,omitempty"`
	Scale        int64   `xml:"Scale" json:"scale,omitempty"`
	Label        string  `xml:"Label" json:"label,omitempty"`
	Title        string  `xml:"Title" json:"title,omitempty"`
	Description  string  `xml:"Description" json:"description,omitempty"`
	Url          string  `xml:"Url" json:"url,omitempty"`
	Event        string  `xml:"Event" json:"event,omitempty"`
	EventKey     string  `xml:"EventKey" json:"event_key,omitempty"`
	Ticket       string  `xml:"Ticket" json:"ticket,omitempty"`
	Latitude     float64 `xml:"Latitude" json:"latitude,omitempty"`
	Longitude    float64 `xml:"Longitude" json:"longitude,omitempty"`
	Precision    float64 `xml:"Precision" json:"precision,omitempty"`
	SessionFrom  string  `xml:"SessionFrom" json:"session_from,omitempty"`
	Status       string  `xml:"Status" json:"status,omitempty"`
	MsgID        int64   `xml:"MsgID" json:"msgID,omitempty"`
	SentCount    int64   `xml:"SentCount" json:"sent_count,omitempty"`
	AppId        string  `xml:"AppId,omitempty" json:"app_id,omitempty"`
	InfoType     string  `xml:"InfoType,omitempty" json:"info_type,omitempty"`
	Msg          string  `xml:"msg,omitempty" json:"msg,omitempty"`
	Info         MsgInfo `xml:"info,omitempty" json:"info,omitempty"`
}

MessageData 公众号消息

func (*MessageData) ShouldDecode

func (msg *MessageData) ShouldDecode(EncodingAESKey string) (err error)

ShouldDecode 公众号消息解密

type MessageMassSendData added in v1.1.1

type MessageMassSendData struct {
	ToUser            []string                `json:"touser"`
	MsgType           MessageMassSendType     `json:"msgtype"`
	MpNews            *MessageMassSendMediaId `json:"mpnews,omitempty"`
	Text              *MessageMassSendText    `json:"text,omitempty"`
	Voice             *MessageMassSendMediaId `json:"voice,omitempty"`
	Images            *MessageMassSendImages  `json:"images,omitempty"`
	MpVideo           *MessageMassSendMpVideo `json:"mpvideo,omitempty"`
	WxCard            *MessageMassSendWxCard  `json:"wxcard,omitempty"`
	SendIgnoreReprint int                     `json:"send_ignore_reprint"`
}

type MessageMassSendImages added in v1.1.1

type MessageMassSendImages struct {
	MediaIds           []string `json:"media_ids"`
	Recommend          string   `json:"recommend"`
	NeedOpenComment    int      `json:"need_open_comment"`
	OnlyFansCanComment int      `json:"only_fans_can_comment"`
}

type MessageMassSendMediaId added in v1.1.1

type MessageMassSendMediaId struct {
	MediaId string `json:"media_id"`
}

type MessageMassSendMpVideo added in v1.1.1

type MessageMassSendMpVideo struct {
	MediaId     string `json:"media_id"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

type MessageMassSendRes added in v1.1.1

type MessageMassSendRes struct {
	MpBaseResp
	MsgId     int64 `json:"msg_id"`
	MsgDataId int64 `json:"msg_data_id"`
}

type MessageMassSendText added in v1.1.1

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

type MessageMassSendType added in v1.1.1

type MessageMassSendType string

type MessageMassSendWxCard added in v1.1.1

type MessageMassSendWxCard struct {
	CardId string `json:"card_id"`
}

type MessageQuery

type MessageQuery struct {
	Signature    string `param:"signature" binding:"required"`
	Timestamp    string `param:"timestamp" binding:"required"`
	Nonce        string `param:"nonce" binding:"required"`
	EchoStr      string `param:"echostr"`
	OpenId       string `param:"openid"`
	EncryptType  string `param:"encrypt_type"`
	MsgSignature string `param:"msg_signature"`
}

MessageQuery 消息通知`query`数据

func (MessageQuery) Validate

func (mq MessageQuery) Validate(PrivateToken string) (err error)

Validate 安全验证

type MessageTemplateMiniProgram added in v1.1.1

type MessageTemplateMiniProgram struct {
	AppId    string `json:"appid"`
	PagePath string `json:"pagepath"`
}

type MessageTemplateSendData

type MessageTemplateSendData struct {
	ToUser      string                                 `json:"touser"`
	TemplateId  string                                 `json:"template_id"`
	Url         string                                 `json:"url"`
	MiniProgram MessageTemplateMiniProgram             `json:"miniprogram"`
	Data        map[string]MessageTemplateSendDataItem `json:"data"`
}

type MessageTemplateSendDataItem

type MessageTemplateSendDataItem struct {
	Value string `json:"value"`
	Color string `json:"color"`
}

type MessageTemplateSendRes

type MessageTemplateSendRes struct {
	MpBaseResp
	MsgId int64 `json:"msgid"`
}

type MpApi

type MpApi string

type MpBaseResp

type MpBaseResp struct {
	ErrCode int64  `json:"errcode,omitempty"`
	ErrMsg  string `json:"errmsg,omitempty"`
}

func (MpBaseResp) IsError added in v1.3.1

func (mbr MpBaseResp) IsError() bool

func (MpBaseResp) ToError added in v1.3.1

func (mbr MpBaseResp) ToError() error

type MsgInfo added in v1.3.1

type MsgInfo struct {
	ComponentVerifyTicket string `xml:"ComponentVerifyTicket,omitempty" json:"component_verify_ticket,omitempty"`
	Status2               int64  `xml:"status,omitempty" json:"status_2,omitempty"`
	AuthCode              string `xml:"auth_code,omitempty" json:"auth_code,omitempty,omitempty"`
	Name                  string `xml:"name,omitempty" json:"name,omitempty"`
	Code                  string `xml:"code,omitempty" json:"code,omitempty"`
	CodeType              int64  `xml:"code_type,omitempty" json:"codeType,omitempty"`
	LegalPersonaWechat    string `xml:"legal_persona_wechat,omitempty" json:"legalPersonaWechat,omitempty"`
	LegalPersonaName      string `xml:"legal_persona_name,omitempty" json:"legalPersonaName,omitempty"`
	ComponentPhone        string `xml:"component_phone,omitempty" json:"componentPhone,omitempty"`
}

type OaWebAppsJsSDKTicketQuery

type OaWebAppsJsSDKTicketQuery struct {
	Type JsSDKTicketType `url:"type"`
}

type OaWebAppsJsSDKTicketRes

type OaWebAppsJsSDKTicketRes struct {
	MpBaseResp
	Ticket    string `json:"ticket"`
	ExpiresIn int64  `json:"expires_in"`
}

type OaWebAppsSnsAuth2AccessTokenQuery

type OaWebAppsSnsAuth2AccessTokenQuery struct {
	AppId     string `url:"appid"`
	Secret    string `url:"secret"`
	Code      string `url:"code"`
	GrantType string `url:"grant_type"`
}

type OaWebAppsSnsAuth2AccessTokenRes

type OaWebAppsSnsAuth2AccessTokenRes struct {
	MpBaseResp
	AccessToken  string `json:"access_token"`
	ExpireIn     int64  `json:"expire_in"`
	RefreshToken string `json:"refresh_token"`
	OpenId       string `json:"openid"`
	Scope        string `json:"scope"`
}

type OaWebAppsSnsUserInfoQuery

type OaWebAppsSnsUserInfoQuery struct {
	OpenId string `url:"openid"`
	Lang   string `url:"lang"`
}

type OaWebAppsSnsUserInfoRes

type OaWebAppsSnsUserInfoRes struct {
	MpBaseResp
	OpenId     string   `json:"openid"`
	NickName   string   `json:"nickname"`
	Sex        int64    `json:"sex"`
	Province   string   `json:"province"`
	City       string   `json:"city"`
	Country    string   `json:"country"`
	HeadImgUrl string   `json:"headimgurl"`
	Privilege  []string `json:"privilege"`
	UnionId    string   `json:"unionid"`
}

type OcrBandCardResp added in v1.3.1

type OcrBandCardResp struct {
	MpBaseResp
	Number string `json:"number"`
}

type OcrBaseQuery added in v1.3.1

type OcrBaseQuery struct {
	ImgUrl string `url:"img_url"`
}

type OcrBusinessLicenseResp added in v1.3.1

type OcrBusinessLicenseResp struct {
	MpBaseResp
	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"`
}

type OcrIdCardResp added in v1.3.1

type OcrIdCardResp struct {
	MpBaseResp
	Type        string `json:"type"`
	Name        string `json:"name"`
	Id          string `json:"id"`
	Addr        string `json:"addr"`
	Gender      string `json:"gender"`
	Nationality string `json:"nationality"`
	ValidDate   string `json:"valid_date"`
}

type QrActionType

type QrActionType string

type ServerHost

type ServerHost string

type SnsJsCode2SessionQuery added in v1.3.1

type SnsJsCode2SessionQuery struct {
	AppId     string `url:"appid"`
	Secret    string `url:"secret"`
	JsCode    string `url:"js_code"`
	GrantType string `url:"grant_type"`
}

type SnsJsCode2SessionRes added in v1.3.1

type SnsJsCode2SessionRes struct {
	MpBaseResp
	OpenId     string `json:"openid"`
	SessionKey string `json:"session_key"`
	UnionId    string `json:"unionid"`
}

type TokenGrantType

type TokenGrantType string

type UserGetQuery

type UserGetQuery struct {
	NextOpenId string `url:"next_openid"`
}

type UserGetRes

type UserGetRes struct {
	MpBaseResp
	Total int64 `json:"total"`
	Count int64 `json:"count"`
	Data  struct {
		OpenId []string `json:"openid"`
	} `json:"data"`
	NextOpenId string `json:"next_openid"`
}

type UserInfoBatchGetData

type UserInfoBatchGetData struct {
	UserList []UserInfoBatchGetDataItem `json:"user_list"`
}

type UserInfoBatchGetDataItem

type UserInfoBatchGetDataItem struct {
	OpenId string `json:"open_id"`
	Lang   string `json:"lang"`
}

type UserInfoBatchGetRes

type UserInfoBatchGetRes struct {
	MpBaseResp
	UserInfoList []UserInfoRes `json:"user_info_list"`
}

type UserInfoQuery

type UserInfoQuery struct {
	OpenId string `url:"openid"`
	Lang   string `url:"lang"`
}

type UserInfoRes

type UserInfoRes struct {
	MpBaseResp
	Subscribe      int64   `json:"subscribe"`
	OpenId         string  `json:"openid"`
	NickName       string  `json:"nickname"`
	Sex            int64   `json:"sex"`
	Language       string  `json:"language"`
	City           string  `json:"city"`
	Province       string  `json:"province"`
	Country        string  `json:"country"`
	HeadImgUrl     string  `json:"headimgurl"`
	SubscribeTime  int64   `json:"subscribe_time"`
	UnionId        string  `json:"unionid"`
	Remark         string  `json:"remark"`
	GroupId        int64   `json:"group_id"`
	TagIdList      []int64 `json:"tagid_list"`
	SubscribeScene string  `json:"subscribe_scene"`
	QrScene        int64   `json:"qr_scene"`
	QrSceneStr     string  `json:"qr_scene_str"`
}

type UserInfoUpdateRemarkData

type UserInfoUpdateRemarkData struct {
	OpenId string `json:"openid"`
	Remark string `json:"remark"`
}

type UserTag

type UserTag struct {
	Id    int64  `json:"id,omitempty"`
	Name  string `json:"name,omitempty"`
	Count int64  `json:"count,omitempty"`
}

type UserTagGetQuery

type UserTagGetQuery struct {
	TagId      int64  `url:"tagid"`
	NextOpenId string `url:"next_openid"`
}

type UserTagGetRes

type UserTagGetRes struct {
	Count int64 `json:"count"`
	Data  struct {
		OpenId []string `json:"openid"`
	} `json:"data"`
	NextOpenId string `json:"next_openid"`
}

type UserTagMembersBatchData

type UserTagMembersBatchData struct {
	OpenIdList []string `json:"openid_list"`
	TagId      int64    `json:"tagid"`
}

type UserTagMembersBatchUnTagData

type UserTagMembersBatchUnTagData struct {
	OpenIdList []string `json:"openid_list"`
	TagId      int64    `json:"tagid"`
}

type UserTagsCreateData

type UserTagsCreateData struct {
	Tag UserTag `json:"tag"`
}

type UserTagsCreateRes

type UserTagsCreateRes struct {
	MpBaseResp
	Tag UserTag `json:"tag"`
}

type UserTagsDeleteData

type UserTagsDeleteData struct {
	Tag UserTag `json:"tag"`
}

type UserTagsGetIdListData

type UserTagsGetIdListData struct {
	OpenId string `json:"openid"`
}

type UserTagsGetIdListRes

type UserTagsGetIdListRes struct {
	MpBaseResp
	TagIdList []int64 `json:"tagid_list"`
}

type UserTagsGetRes

type UserTagsGetRes struct {
	MpBaseResp
	Tags []UserTag `json:"tags"`
}

type UserTagsUpdateData

type UserTagsUpdateData struct {
	Tag UserTag `json:"tag"`
}

type WXACodeReq added in v1.3.1

type WXACodeReq struct {
	Path      string           `json:"path"`
	Width     int64            `json:"width,omitempty"`
	AutoColor bool             `json:"auto_color,omitempty"`
	LineColor *WXACodeReqColor `json:"line_color,omitempty"`
	IsHyaline bool             `json:"is_hyaline"`
}

type WXACodeReqColor added in v1.3.1

type WXACodeReqColor struct {
	R int64 `json:"r"`
	G int64 `json:"g"`
	B int64 `json:"b"`
}

type WXACodeUnLimitReq added in v1.3.1

type WXACodeUnLimitReq struct {
	Scene      string           `json:"scene"`
	Page       string           `json:"page,omitempty"`
	CheckPath  bool             `json:"check_path"`
	EnvVersion string           `json:"env_version,omitempty"`
	Width      int64            `json:"width,omitempty"`
	AutoColor  bool             `json:"auto_color,omitempty"`
	LineColor  *WXACodeReqColor `json:"line_color,omitempty"`
	IsHyaline  bool             `json:"is_hyaline,omitempty"`
}

Jump to

Keyboard shortcuts

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