zjiecode/wxpusher-client的 Go 语言版本
go get -u github.com/wxpusher/wxpusher-sdk-go
go get github.com/wxpusher/[email protected]
引入
import (
"github.com/wxpusher/wxpusher-sdk-go"
"github.com/wxpusher/wxpusher-sdk-go/model"
)
msg := model.NewMessage(appToken).SetContent("测试").AddUId(uId)
msgArr, err := wxpusher.SendMessage(msg)
fmt.Println(msgArr, err)
status, err := wxpusher.QueryMessageStatus(2384429)
fmt.Println(status, err)
qrcode := model.Qrcode{AppToken: appToken, Extra: "XX渠道用户"}
qrcodeResp, err := wxpusher.CreateQrcode(&qrcode)
fmt.Println(qrcodeResp, err)
result, err := wxpusher.QueryWxUser(appToken, 1, 20)
fmt.Println(result, err)