marketcode

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveCode

func ActiveCode(clt *core.Client, info *ActiveCodeInfo) (err error)

激活二维码接口

func ApplyCode

func ApplyCode(clt *core.Client, count int64, isv_application_id string) (application_id int64, err error)

申请二维码接口 @param count 申请码的数量 ≥10000,≤20000000,10000的整数倍 @param isv_application_id 相同isv_application_id视为同一申请单

func DownloadApplyCode

func DownloadApplyCode(clt *core.Client, app_id int64, code_start int64, code_end int64) (buffer string, err error)

下载二维码包接口 @param code_start 开始位置 Uint64 Y 来自查询二维码申请接口 @param code_end 结束位置 Uint64 Y 来自查询二维码申请接口 @return buffer 文件buffer String128 Y 需要先base64 decode,再做解密操作(解密参见3.1)

Types

type ActiveCodeInfo

type ActiveCodeInfo struct {
	ApplicationId int64  `json:"application_id"`         //
	Code          string `json:"code,omitempty"`         // 返回原始码数据,并返回对应的激活信息
	ActivityName  string `json:"activity_name"`          // 数据分析活动区分依据,请规范命名
	ProductBrand  string `json:"product_brand"`          // 数据分析品牌区分依据,请规范命名
	ProductTitle  string `json:"product_title"`          // 数据分析商品区分依据,请规范命名
	ProductCode   string `json:"product_code,omitempty"` // EAN商品条码,请规范填写
	WxaAppid      string `json:"wxa_appid"`              //	扫码跳转小程序的appid
	WxaPath       string `json:"wxa_path"`               //	扫码跳转小程序的appid
	WxaType       int    `json:"wxa_type"`               // 默认为0正式版,开发版为1,体验版为2
	CodeStart     int64  `json:"code_start"`             // 包含,如0
	CodeEnd       int64  `json:"code_end"`               // 包含,如49999,上述0-49999为一个号码段
}

func QueryActiveCode

func QueryActiveCode(clt *core.Client, application_id, index int64, url, code string) (info ActiveCodeInfo, err error)

激活二维码接口 字段名 中文解释 类型 是否必填 备注 application_id 申请单号 Uint64 N 无 code_index 该码在批次中的偏移量 Uint64 N 传入application_id时必填 code_url 28位普通码字符 String128 N code与code_url二选一 code 九位的字符串原始码 String16 N code与code_url二选一

func TicketToCode

func TicketToCode(clt *core.Client, openid, code_ticket string) (info ActiveCodeInfo, err error)

code_ticket换code接口 字段名 中文解释 类型 是否必填 备注 openid 用户的openid String Y 无 code_ticket 跳转时带上的code_ticket参数 String256 Y 无

type MarketCodeApply

type MarketCodeApply struct {
	Status           string `json:"status"`             // INIT PROCESSING FINISH为可下载
	IsvApplicationId string `json:"isv_application_id"` //
	ApplicationId    int64  `json:"application_id"`     //
	CreateTime       int64  `json:"create_time"`        //
	UpdateTime       int64  `json:"update_time"`        //
	CodeGenerateList []struct {
		CodeStart int64 `json:"code_start"` // 包含,如0
		CodeEnd   int64 `json:"code_end"`   // 包含,如49999,上述0-49999为一个号码段
	} `json:"code_generate_list"`
}

func QueryApplyCode

func QueryApplyCode(clt *core.Client, application_id int64, isv_application_id string) (apply MarketCodeApply, err error)
查询二维码申请单接口

@param application_id 申请单号 @param isv_application_id 相同isv_application_id视为同一申请单

Jump to

Keyboard shortcuts

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