wechat

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UgcCheckSceneInfo      = 1
	UgcCheckSceneComment   = 2
	UgcCheckSceneForum     = 3
	UgcCheckSceneCommunity = 4
)

Variables

View Source
var Client = new(client)

Functions

This section is empty.

Types

type GetGenerateUrlLinkOption

type GetGenerateUrlLinkOption struct {
	Path       string `json:"path"`        // 通过 URL Link 进入的小程序页面路径,必须是已经发布的小程序存在的页面,不可携带 query 。path 为空时会跳转小程序主页
	Query      string `json:"query"`       // 通过 URL Link 进入小程序时的query,最大1024个字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~%
	ExpireType int32  `json:"expire_type"` // 默认值0.小程序 URL Link 失效类型,失效时间:0,失效间隔天数:1
	//expireTime     int32  `json:"expire_time"`     // 到期失效的 URL Link 的失效时间,为 Unix 时间戳。生成的到期失效 URL Link 在该时间前有效。最长有效期为30天。expire_type 为 0 必填
	ExpireInterval int32 `json:"expire_interval"` // 到期失效的URL Link的失效间隔天数。生成的到期失效URL Link在该间隔时间到达前有效。最长间隔天数为30天。expire_type 为 1 必填
}

type GetWechatAccessTokenResponse

type GetWechatAccessTokenResponse struct {
	AccessToken string
	ExpiresIn   int64
}

type ImageCheckOption

type ImageCheckOption struct {
	MediaUrl string `json:"media_url"` // 实际需要检测的图片地址
	Scene    int32  `json:"scene"`     // 场景枚举值(1 资料;2 评论;3 论坛;4 社交日志)
	OpenId   string `json:"openid"`    // 用户的openid(用户需在近两小时访问过小程序)

	MediaType int32 `json:"media_type"` // 1:音频;2:图片(这里选择2)
	Version   int32 `json:"version"`    // 默认为 2
}

type MessageCheckOption

type MessageCheckOption struct {
	//AccessToken string `json:"access_token"`
	Content string `json:"content"` // 实际需要检测的内容
	Scene   int32  `json:"scene"`   // 场景枚举值(1 资料;2 评论;3 论坛;4 社交日志)
	OpenId  string `json:"openid"`  // 用户的openid(用户需在近两小时访问过小程序)
	Version int32  `json:"version"`
}

Jump to

Keyboard shortcuts

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