qrcode

package
v0.0.0-...-8077ce6 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package qrcode 二维码

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateQRCode

func CreateQRCode(ctx *microapp.MicroApp, payload []byte) (resp []byte, err error)

createQRCode

获取小程序/小游戏的二维码。该二维码可通过任意 app 扫码打开,能跳转到开发者指定的对应字节系 app 内拉起小程序/小游戏,并传入开发者指定的参数。通过该接口生成的二维码,永久有效,暂无数量限制。

See: https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/server/qr-code/create-qr-code

POST https://developer.toutiao.com/api/apps/qrcode

Example
package main

import (
	"fmt"

	"github.com/jackluo2012/microapp"
	"github.com/jackluo2012/microapp/apis/qrcode"
)

func main() {
	var ctx *microapp.MicroApp

	payload := []byte("{}")
	resp, err := qrcode.CreateQRCode(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