wxa

package
v0.0.0-...-3b54ddd Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDraftToTpl

func AddDraftToTpl(accessToken string, draftId int) (err error)

将草稿箱的草稿选为小程序代码模版

func DelTpl

func DelTpl(accessToken string, id int) (err error)

删除指定小程序代码模版

func GetAppCode

func GetAppCode(accessToken string, scene, page string, width int, autoColor bool, lineColor Color) (image []byte, err error)

获取小程序码 接口B:适用于需要的码数量极多,或仅临时使用的业务场景 注意:通过该接口生成的小程序码,永久有效,数量暂无限制。用户扫描该码进入小程序后,开发者需在对应页面获取的码中 scene 字段的值,再做处理逻辑。 使用如下代码可以获取到二维码中的 scene 字段的值。调试阶段可以使用开发工具的条件编译自定义参数 scene=xxxx 进行模拟,开发工具模拟时的 scene 的参数值需要进行 urlencode page需要在页面清单才能调用成功

func GetQrcode

func GetQrcode(accessToken string) (image []byte, err error)

获取体验小程序的体验二维码

Types

type AddNearByPoiRsp

type AddNearByPoiRsp struct {
	wx_open.WxResponse
	Data struct {
		AuditId           int64  `json:"audit_id"`
		PoiId             int64  `json:"poi_id"`
		RelatedCredential string `json:"related_credential"`
	} `json:"data"`
}

func AddNearByPoi

func AddNearByPoi(token string, relatedName, relatedCredential, relatedAddress, relatedProofMaterial string) (*AddNearByPoiRsp, error)

https://mp.weixin.qq.com/debug/wxadoc/dev/api/nearby.html#添加地点

type Category

type Category struct {
	FirstClass  string `json:"first_class"`
	SecondClass string `json:"second_class"`
	FirstId     int    `json:"first_id"`
	SecondId    int    `json:"second_id"`
}

func GetCategory

func GetCategory(accessToken string) (categoryList []Category, err error)

获取授权小程序帐号的可选类目

type CategoryRsp

type CategoryRsp struct {
	wx_open.WxResponse
	CategoryList []Category `json:"category_list"`
}

type Color

type Color struct {
	R uint `json:"r"`
	G uint `json:"g"`
	B uint `json:"b"`
}

type MonthRetainRsp

type MonthRetainRsp struct {
	wx_open.WxResponse
	RefDate    string    `json:"ref_date"`
	VisitUvNew []VisitUv `json:"visit_uv_new"`
	VisitUv    []VisitUv `json:"visit_uv"`
}

func GetMonthRetain

func GetMonthRetain(accessToken string, month string) (data MonthRetainRsp, err error)

月留存 month: "201701" 测试month在201712时微信会报错, 不知道是不是微信的bug,还是不支持查当月, 还是不支持查月初, 因为今天是20171201

type MonthVisit

type MonthVisit struct {
	VisitUvNew      int    `json:"visit_uv_new"`
	StayTimeSession int    `json:"stay_time_session"`
	VisitDepth      int    `json:"visit_depth"`
	RefDate         string `json:"ref_date"`
	SessionCnt      int    `json:"session_cnt"`
	VisitPv         int    `json:"visit_pv"`
	VisitUv         int    `json:"visit_uv"`
}

type MonthVisitRsp

type MonthVisitRsp struct {
	wx_open.WxResponse
	List []MonthVisit `json:"list"`
}

func GetMonthVisit

func GetMonthVisit(accessToken string, month string) (data MonthVisitRsp, err error)

月访问 month: "201701" 测试month在201712时微信会报错, 不知道是不是微信的bug,还是不支持查当月, 还是不支持查月初, 因为今天是20171201

type PoiAudioMessage

type PoiAudioMessage struct {
	ToUserName   string `xml:"ToUserName"`
	FromUserName string `xml:"FromUserName"`
	CreateTime   string `xml:"CreateTime"`
	MsgType      string `xml:"MsgType"` // 消息类型: event, text ....
	Event        string `xml:"Event"`
	AuditId      int64  `xml:"audit_id"` // 审核单id
	Status       int    `xml:"status"`   // 审核状态(3:审核通过,2:审核失败)
	Reason       string `xml:"reason"`   // 如果status为3或者4,会返回审核失败的原因
	PoiId        int64  `xml:"poi_id"`
}

地点审核消息

type Tpl

type Tpl struct {
	CreateTime  int64  `json:"create_time"`
	UserVersion string `json:"user_version"`
	UserDesc    string `json:"user_desc"`
	DraftId     int    `json:"draft_id"`
}

func GetTpl

func GetTpl(accessToken string) (tplList []Tpl, err error)

获取代码模版库中的所有小程序代码模版

func GetTplDraft

func GetTplDraft(accessToken string) (tplList []Tpl, err error)

获取草稿箱内的所有临时代码草稿

type VisitUv

type VisitUv struct {
	Key   int `json:"key"`
	Value int `json:"value"`
}

key 标识,0开始,0表示当月,1表示1月后,key取值分别是:0,1 value key对应日期的新增用户数/活跃用户数(key=0时)或留存用户数(k>0时)

Jump to

Keyboard shortcuts

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