Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenerateReq ¶
type GenerateReq struct { AccessToken string `json:"access_token"` // 必选, 小程序 access_token MaAppId string `json:"ma_app_id"` // 必选, 小程序的 id AppName string `json:"app_name"` // 必选, 宿主名称,可选 douyin,douyinlite Path string `json:"path"` // 可选, 通过URL Link进入的小程序页面路径,必须是已经发布的小程序存在的页面,不可携带 query。path 为空时会跳转小程序主页。 Query string `json:"query"` // 可选, 通过URL Link进入小程序时的 query(json形式),若无请填{}。最大1024个字符,只支持数字,大小写英文以及部分特殊字符:`{}!#$&'()*+,/:;=?@-._~%“。 ExpireTime string `json:"expire_time"` // 必选, 到期失效的URL Link的失效时间。为 Unix 时间戳,实际失效时间为距离当前时间小时数,向上取整。最长间隔天数为180天。 }
type GenerateResp ¶
type QueryInfoInfo ¶
type QueryInfoInfo struct { // AppName 宿主名称,douyin,douyinlite AppName string `json:"app_name"` // MaAppId 小程序ID MaAppId string `json:"ma_app_id"` // Path 小程序页面路径。 Path string `json:"path"` // Query 小程序页面query。 Query string `json:"query"` // CreateTime 创建时间,为 Unix 时间戳 CreateTime int `json:"create_time"` // ExpireTime 到期失效时间,为 Unix 时间戳 ExpireTime int `json:"expire_time"` }
type QueryInfoReq ¶
type QueryInfoResp ¶
type QueryInfoResp struct { ErrNo int `json:"err_no"` ErrTips string `json:"err_tips"` UrlLinkInfo *QueryInfoInfo `json:"url_link_info"` }
type QueryQuotaReq ¶
type QueryQuotaResp ¶
type QueryQuotaResp struct { ErrNo int `json:"err_no"` ErrTips string `json:"err_tips"` UrlLinkQuota *UrlLinkQuota `json:"url_link_quota"` }
type SDK ¶
func (*SDK) Generate ¶
func (sdk *SDK) Generate(ctx context.Context, req *GenerateReq) (*GenerateResp, error)
Generate 该接口用于生成能够直接跳转到端内小程序的 url link。
func (*SDK) QueryInfo ¶
func (sdk *SDK) QueryInfo(ctx context.Context, req *QueryInfoReq) (*QueryInfoResp, error)
QueryInfo 该接口用于查询已经生成的 link 的信息。
func (*SDK) QueryQuota ¶
func (sdk *SDK) QueryQuota(ctx context.Context, req *QueryQuotaReq) (*QueryQuotaResp, error)
QueryQuota 该接口用于查询当前小程序配额。
type UrlLinkQuota ¶
Click to show internal directories.
Click to hide internal directories.