wechatqy

package
v1.0.39 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Key string
}

func (*App) NewParamsWith

func (app *App) NewParamsWith(params ...Params) Params

func (*App) WebhookSend

func (app *App) WebhookSend(notMustParams ...Params) (result WebhookSendResult, err error)

WebhookSend https://work.weixin.qq.com/api/doc/90000/90136/91770

type Params

type Params map[string]interface{}

Params 请求参数

func NewParams

func NewParams() Params

func (Params) Set

func (p Params) Set(key string, value interface{})

func (Params) SetParams

func (p Params) SetParams(params Params)

type WebhookSendResult

type WebhookSendResult struct {
	Errcode   int64  `json:"errcode"`
	Errmsg    string `json:"errmsg"`
	Type      string `json:"type"`
	MediaId   string `json:"media_id"`
	CreatedAt string `json:"created_at"`
}

type WebhookSendText

type WebhookSendText struct {
	Msgtype string `json:"msgtype"` // 消息类型,此时固定为text
	Text    struct {
		Content             string   `json:"content"`               // 文本内容,最长不超过2048个字节,必须是utf8编码
		MentionedList       []string `json:"mentioned_list"`        // userid的列表,提醒群中的指定成员(@某个成员),@all表示提醒所有人,如果开发者获取不到userid,可以使用mentioned_mobile_list
		MentionedMobileList []string `json:"mentioned_mobile_list"` // 手机号列表,提醒手机号对应的群成员(@某个成员),@all表示提醒所有人
	} `json:"text"`
}

WebhookSendText 文本类型

Jump to

Keyboard shortcuts

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