wechat

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MsgValue

type MsgValue struct {
	Value interface{} `json:"value"`
}

type ReqMiniProgramSubscribeMsg

type ReqMiniProgramSubscribeMsg struct {
	AccessToken string
	SubscribeMsg
}

type Service

type Service struct {
	sptty.BaseService
	// contains filtered or unexported fields
}

func (*Service) GetAccessToken

func (s *Service) GetAccessToken(appID string, appSecret string) (string, error)

func (*Service) Init

func (s *Service) Init(app sptty.ISptty) error

func (*Service) PostGroupBotMsg

func (s *Service) PostGroupBotMsg(req *base.ReqBotMsg) error

企业微信群机器人消息推送

func (*Service) SendCustomerMsg

func (s *Service) SendCustomerMsg(token string, body interface{}) error

func (*Service) SendMPTemplateMsg

func (s *Service) SendMPTemplateMsg(token string, openid string, templateid string, page string, formid string, data interface{}) error

func (*Service) SendMiniProgramSubscribeMsg

func (s *Service) SendMiniProgramSubscribeMsg(req *ReqMiniProgramSubscribeMsg) error

小程序订阅消息

func (*Service) ServiceName

func (s *Service) ServiceName() string

type SubscribeMsg

type SubscribeMsg struct {
	Touser           string              `json:"touser"`
	TemplateID       string              `json:"template_id"`
	Page             string              `json:"page,omitempty"`
	MiniprogramState string              `json:"miniprogram_state,omitempty"`
	Lang             string              `json:"lang,omitempty"`
	Data             map[string]MsgValue `json:"data"`
}

Jump to

Keyboard shortcuts

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