subscribe

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Subscribe

type Subscribe struct {
	*context.Context
}

func NewSubscribe

func NewSubscribe(ctx *context.Context) *Subscribe

func (*Subscribe) Send

func (s *Subscribe) Send(request SubscribeRequest) (result SubscribeResult, err error)

type SubscribeRequest

type SubscribeRequest struct {
	ToUser           string      `json:"touser"`            //		是	接收者(用户)的 openid
	TemplateID       string      `json:"template_id"`       //	是	所需下发的订阅模板id
	Page             string      `json:"page"`              //		否	点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar)。该字段不填则模板无跳转。
	Data             interface{} `json:"data"`              //	是	模板内容,格式形如 { "key1": { "value": any }, "key2": { "value": any } }
	MiniprogramState string      `json:"miniprogram_state"` //		否	跳转小程序类型:developer为开发版;trial为体验版;formal为正式版;默认为正式版
	Lang             string      `json:"lang"`              //	否	进入小程序查看”的语言类型,支持zh_CN(简体中文)、en_US(英文)、zh_HK(繁体中文)、zh_TW(繁体中文),默认为zh_CN
}

type SubscribeResult

type SubscribeResult struct {
	common.Error
}

Jump to

Keyboard shortcuts

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