vlw

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

README

VLW框架

主要接入名为"我的框架"的HOOK框架

待抽空补充其他接口

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequest

func NewRequest() *req.Client

Types

type Framework

type Framework struct {
	ServerPort uint   // 本地服务端口,用于接收回调
	BotWxId    string // 机器人微信ID
	ApiUrl     string // http api地址
	ApiToken   string // http api鉴权token
}

func New

func New(serverPort uint, botWxId, apiUrl, apiToken string) *Framework

func (*Framework) AgreeFriendVerify

func (f *Framework) AgreeFriendVerify(v1, v2, scene string) error

func (*Framework) Callback

func (f *Framework) Callback(handler func(*robot.Event, robot.IFramework))

func (*Framework) GetFriends added in v1.2.0

func (f *Framework) GetFriends(isRefresh bool) ([]*robot.User, error)

func (*Framework) GetGroupMembers added in v1.2.0

func (f *Framework) GetGroupMembers(groupWxId string, isRefresh bool) ([]*robot.User, error)

func (*Framework) GetGroups added in v1.2.0

func (f *Framework) GetGroups(isRefresh bool) ([]*robot.User, error)

func (*Framework) GetMPs added in v1.2.0

func (f *Framework) GetMPs(isRefresh bool) ([]*robot.User, error)

func (*Framework) GetMemePictures

func (f *Framework) GetMemePictures(msg *robot.Message) string

func (*Framework) GetObjectInfo

func (f *Framework) GetObjectInfo(wxId string) (*robot.User, error)

func (*Framework) GetRobotInfo added in v1.2.9

func (f *Framework) GetRobotInfo() (*robot.User, error)

func (*Framework) InviteIntoGroup

func (f *Framework) InviteIntoGroup(groupWxId, wxId string, typ int) error

func (*Framework) SendBusinessCard

func (f *Framework) SendBusinessCard(toWxId, targetWxId string) error

func (*Framework) SendEmoji

func (f *Framework) SendEmoji(toWxId, path string) error

func (*Framework) SendFavorites

func (f *Framework) SendFavorites(toWxId, favoritesId string) error

func (*Framework) SendFile

func (f *Framework) SendFile(toWxId, path string) error

func (*Framework) SendImage

func (f *Framework) SendImage(toWxId, path string) error

func (*Framework) SendMessageRecord

func (f *Framework) SendMessageRecord(toWxId, title string, dataList []map[string]interface{}) error

func (*Framework) SendMessageRecordXML

func (f *Framework) SendMessageRecordXML(toWxId, xmlStr string) error

func (*Framework) SendMiniProgram

func (f *Framework) SendMiniProgram(toWxId, ghId, title, content, imagePath, jumpPath string) error

func (*Framework) SendMusic

func (f *Framework) SendMusic(toWxId, name, author, app, jumpUrl, musicUrl, coverUrl string) error
func (f *Framework) SendShareLink(toWxId, title, desc, imageUrl, jumpUrl string) error

func (*Framework) SendText

func (f *Framework) SendText(toWxId, text string) error

func (*Framework) SendTextAndAt

func (f *Framework) SendTextAndAt(toGroupWxId, toWxId, toWxName, text string) error

func (*Framework) SendVideo

func (f *Framework) SendVideo(toWxId, path string) error

func (*Framework) SendXML

func (f *Framework) SendXML(toWxId, xmlStr string) error

type FriendsListResp added in v1.1.1

type FriendsListResp struct {
	Code       int    `json:"Code"`
	Result     string `json:"Result"`
	ReturnJson []struct {
		WxNum    string `json:"wx_num"`
		Avatar   string `json:"avatar"`
		City     string `json:"city"`
		Country  string `json:"country"`
		Nickname string `json:"nickname"`
		Province string `json:"province"`
		Note     string `json:"note"`
		Sex      int    `json:"sex"`
		Wxid     string `json:"wxid"`
	} `json:"ReturnJson"`
}

FriendsListResp 获取好友列表响应

type GroupListResp added in v1.1.1

type GroupListResp struct {
	Code       int    `json:"Code"`
	Result     string `json:"Result"`
	ReturnJson []struct {
		Avatar      string `json:"avatar"`
		IsManager   int    `json:"is_manager"`
		ManagerWxid string `json:"manager_wxid"`
		Nickname    string `json:"nickname"`
		TotalMember int    `json:"total_member"`
		Wxid        string `json:"wxid"`
	} `json:"ReturnJson"`
}

GroupListResp 获取群组列表响应

type GroupMemberListResp added in v1.1.1

type GroupMemberListResp struct {
	Code       int    `json:"Code"`
	Result     string `json:"Result"`
	ReturnJson struct {
		GroupWxid     string `json:"group_wxid"`
		GroupName     string `json:"group_name"`
		Count         int    `json:"count"`
		OwnerWxid     string `json:"owner_wxid"`
		OwnerNickname string `json:"owner_nickname"`
		MemberList    []struct {
			WxNum         string `json:"wx_num"`
			Avatar        string `json:"avatar"`
			City          string `json:"city"`
			Country       string `json:"country"`
			GroupNickname string `json:"group_nickname"`
			Nickname      string `json:"nickname"`
			Province      string `json:"province"`
			Remark        string `json:"remark"`
			Sex           int    `json:"sex"`
			Wxid          string `json:"wxid"`
		} `json:"member_list"`
	} `json:"ReturnJson"`
}

GroupMemberListResp 获取群成员列表响应

type MessageResp

type MessageResp struct {
	Code      int    `json:"Code"`
	Result    string `json:"Result"`
	ReturnStr string `json:"ReturnStr"`
	ReturnInt string `json:"ReturnInt"`
}

type ObjectInfoResp added in v1.1.1

type ObjectInfoResp struct {
	Code       int    `json:"Code"`
	Result     string `json:"Result"`
	ReturnJson struct {
		Data struct {
			Account     string `json:"account"`
			Avatar      string `json:"avatar"`
			City        string `json:"city"`
			Country     string `json:"country"`
			Nickname    string `json:"nickname"`
			Province    string `json:"province"`
			Remark      string `json:"remark"`
			Sex         int    `json:"sex"`
			Signature   string `json:"signature"`
			SmallAvatar string `json:"small_avatar"`
			SnsPic      string `json:"sns_pic"`
			SourceType  int    `json:"source_type"`
			Status      int    `json:"status"`
			V1          string `json:"v1"`
			V2          string `json:"v2"`
			Wxid        string `json:"wxid"`
		} `json:"data"`
		Type int `json:"type"`
	} `json:"ReturnJson"`
}

ObjectInfoResp 对象可以是好友、群、公众号

type RobotInfoResp added in v1.2.9

type RobotInfoResp struct {
	Code       int    `json:"Code"`
	Result     string `json:"Result"`
	ReturnJson struct {
		Number int `json:"Number"`
		Data   []struct {
			Pid                      int    `json:"pid"`
			Username                 string `json:"username"`
			Wxid                     string `json:"wxid"`
			WxNum                    string `json:"wx_num"`
			WxHeadimgurl             string `json:"wx_headimgurl"`
			EnterpriseWechat         int    `json:"Enterprise wechat"`
			EnterpriseWechatClientId int    `json:"Enterprise wechat clientId"`
		} `json:"data"`
	} `json:"ReturnJson"`
}

type SubscriptionListResp added in v1.1.1

type SubscriptionListResp struct {
	Code       int    `json:"Code"`
	Result     string `json:"Result"`
	ReturnJson []struct {
		Avatar   string `json:"avatar"`
		Nickname string `json:"nickname"`
		Wxid     string `json:"wxid"`
	} `json:"ReturnJson"`
}

SubscriptionListResp 获取订阅号列表响应

Jump to

Keyboard shortcuts

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