Documentation ¶
Overview ¶
二维码接口.
Index ¶
- func Download(ticket, filepath string, clt *http.Client) (written int64, err error)
- func DownloadToWriter(ticket string, writer io.Writer, clt *http.Client) (written int64, err error)
- func GetWxaCodeUnlimit(clt *core.Client, params WxaCodeParams) (contentType string, binary []byte, err error)
- func QrcodePicURL(ticket string) string
- func ShortURL(clt *core.Client, longURL string) (shortURL string, err error)
- type PermQrcode
- type TempQrcode
- type WxaCodeParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Download ¶
Download 通过ticket换取二维码, 写入到 filepath 路径的文件.
如果 clt == nil 则默认用 util.DefaultHttpClient.
func DownloadToWriter ¶
DownloadToWriter 通过ticket换取二维码, 写入到 writer.
如果 clt == nil 则默认用 util.DefaultHttpClient.
func GetWxaCodeUnlimit ¶
func GetWxaCodeUnlimit(clt *core.Client, params WxaCodeParams) (contentType string, binary []byte, err error)
CreateTempQrcode 创建临时二维码.
sceneId: 场景值ID, 为32位非0整型 expireSeconds: 二维码有效时间, 以秒为单位
Types ¶
type PermQrcode ¶
func CreatePermQrcode ¶
func CreatePermQrcode(clt *core.Client, sceneId int32) (qrcode *PermQrcode, err error)
CreatePermQrcode 创建永久二维码
sceneId: 场景值ID
func CreateStrScenePermQrcode ¶
func CreateStrScenePermQrcode(clt *core.Client, sceneStr string) (qrcode *PermQrcode, err error)
CreateStrScenePermQrcode 创建永久二维码
sceneStr: 场景值ID(字符串形式的ID), 字符串类型, 长度限制为1到64
type TempQrcode ¶
type TempQrcode struct { ExpireSeconds int `json:"expire_seconds,omitempty"` PermQrcode }
func CreateStrSceneTempQrcode ¶
func CreateStrSceneTempQrcode(clt *core.Client, sceneStr string, expireSeconds int) (qrcode *TempQrcode, err error)
CreateStrSceneTempQrcode 创建临时二维码.
sceneStr: 场景值ID(字符串形式的ID), 字符串类型, 长度限制为1到64 expireSeconds: 二维码有效时间, 以秒为单位
func CreateTempQrcode ¶
func CreateTempQrcode(clt *core.Client, sceneId int32, expireSeconds int) (qrcode *TempQrcode, err error)
CreateTempQrcode 创建临时二维码.
sceneId: 场景值ID, 为32位非0整型 expireSeconds: 二维码有效时间, 以秒为单位
Click to show internal directories.
Click to hide internal directories.