updatablemessage

package
v3.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateActivityIDResponse

type CreateActivityIDResponse struct {
	request.CommonError
	ActivityID     string `json:"activity_id"`     //	动态消息的 ID
	ExpirationTime uint   `json:"expiration_time"` //	activity_id 的过期时间戳。默认24小时后过期。
}

type CreateActivityIdRequest

type CreateActivityIdRequest struct {
	// 非必填	为私密消息创建activity_id时,指定分享者为unionid用户。其余用户不能用此activity_id分享私密消息。openid与unionid填一个即可。私密消息暂不支持云函数生成activity id。
	Unionid string `query:"unionid"`
	// 非必填	为私密消息创建activity_id时,指定分享者为openid用户。其余用户不能用此activity_id分享私密消息。openid与unionid填一个即可。私密消息暂不支持云函数生成activity id。
	Openid string `query:"openid"`
}

type SetUpdatableMsgRequest

type SetUpdatableMsgRequest struct {
	ActivityID   string                  `json:"activity_id"`   // 动态消息的 ID,通过 updatableMessage.createActivityId 接口获取
	TargetState  UpdatableMsgTargetState `json:"target_state"`  // 动态消息修改后的状态(具体含义见后文)
	TemplateInfo UpdatableMsgTempInfo    `json:"template_info"` // 动态消息对应的模板信息
}

type UpdatableMessage

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

func NewUpdatableMessage

func NewUpdatableMessage(request *request.Request, combineURI func(url string, req interface{}, withToken bool) (string, error)) *UpdatableMessage

func (*UpdatableMessage) CreateActivityId

创建被分享动态消息或私密消息的 activity_id。

func (*UpdatableMessage) SetUpdatableMsg

func (cli *UpdatableMessage) SetUpdatableMsg(req *SetUpdatableMsgRequest) (*request.CommonError, error)

修改被分享的动态消息。

type UpdatableMsgParamName

type UpdatableMsgParamName = string

UpdatableMsgParamName 参数 name 的合法值

const (
	UpdatableMsgParamMemberCount UpdatableMsgParamName = "member_count" // target_state = 0 时必填,文字内容模板中 member_count 的值
	UpdatableMsgParamRoomLimit   UpdatableMsgParamName = "room_limit"   // target_state = 0 时必填,文字内容模板中 room_limit 的值
	UpdatableMsgParamPath        UpdatableMsgParamName = "path"         // target_state = 1 时必填,点击「进入」启动小程序时使用的路径。 对于小游戏,没有页面的概念,可以用于传递查询字符串(query),如 "?foo=bar"
	UpdatableMsgParamVersionType UpdatableMsgParamName = "version_type" // target_state = 1 时必填,点击「进入」启动小程序时使用的版本。有效参数值为:develop(开发版),trial(体验版),release(正式版)
)

动态消息状态

type UpdatableMsgParameter

type UpdatableMsgParameter struct {
	Name  UpdatableMsgParamName `json:"name"`  // 要修改的参数名
	Value string                `json:"value"` // 修改后的参数值
}

type UpdatableMsgTargetState

type UpdatableMsgTargetState = uint8

UpdatableMsgTargetState 动态消息修改后的状态

const (
	UpdatableMsgJoining UpdatableMsgTargetState = iota // 未开始
	UpdatableMsgStarted                                // 已开始
)

动态消息状态

type UpdatableMsgTempInfo

type UpdatableMsgTempInfo struct {
	ParameterList []UpdatableMsgParameter `json:"parameter_list"` // 模板中需要修改的参数列表
}

UpdatableMsgTempInfo 动态消息对应的模板信息

Jump to

Keyboard shortcuts

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