updatable_message

package
v1.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package updatable_message 动态消息

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateActivityId

func CreateActivityId(ctx *miniprogram.Miniprogram) (resp []byte, err error)

创建被分享动态消息的 activity_id。详见动态消息。

See: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/updatable-message/updatableMessage.createActivityId.html

GET https://api.weixin.qq.com/cgi-bin/message/wxopen/activityid/create?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/miniprogram"
	"github.com/fastwego/miniprogram/minigame/apis/updatable_message"
)

func main() {
	var ctx *miniprogram.Miniprogram

	resp, err := updatable_message.CreateActivityId(ctx)

	fmt.Println(resp, err)
}
Output:

func SetUpdatableMsg

func SetUpdatableMsg(ctx *miniprogram.Miniprogram, payload []byte) (resp []byte, err error)

修改被分享的动态消息。详见动态消息。

See: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/updatable-message/updatableMessage.setUpdatableMsg.html

POST https://api.weixin.qq.com/cgi-bin/message/wxopen/updatablemsg/send?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/miniprogram"
	"github.com/fastwego/miniprogram/minigame/apis/updatable_message"
)

func main() {
	var ctx *miniprogram.Miniprogram

	payload := []byte("{}")
	resp, err := updatable_message.SetUpdatableMsg(ctx, payload)

	fmt.Println(resp, err)
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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