Documentation ¶
Index ¶
- func NewRequest() *req.Client
- type EmojiXml
- type Framework
- func (f *Framework) AgreeFriendVerify(v3, v4, scene string) error
- func (f *Framework) Callback(ctx *gin.Context, handler func(*robot.Event, robot.IFramework))
- func (f *Framework) GetFriends(isRefresh bool) ([]*robot.User, error)
- func (f *Framework) GetGroupMembers(groupWxId string, isRefresh bool) ([]*robot.User, error)
- func (f *Framework) GetGroups(isRefresh bool) ([]*robot.User, error)
- func (f *Framework) GetMPs(isRefresh bool) ([]*robot.User, error)
- func (f *Framework) GetMemePictures(msg *robot.Message) string
- func (f *Framework) GetObjectInfo(wxId string) (*robot.User, error)
- func (f *Framework) GetRobotInfo() (*robot.User, error)
- func (f *Framework) InviteIntoGroup(groupWxId, wxId string, typ int) error
- func (f *Framework) SendBusinessCard(toWxId, targetWxId string) error
- func (f *Framework) SendEmoji(toWxId, path string) error
- func (f *Framework) SendFavorites(toWxId, favoritesId string) error
- func (f *Framework) SendFile(toWxId, path string) error
- func (f *Framework) SendImage(toWxId, path string) error
- func (f *Framework) SendMessageRecord(toWxId, title string, dataList []map[string]interface{}) error
- func (f *Framework) SendMessageRecordXML(toWxId, xmlStr string) error
- func (f *Framework) SendMiniProgram(toWxId, ghId, title, content, imagePath, jumpPath string) error
- 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 (f *Framework) SendText(toWxId, text string) error
- func (f *Framework) SendTextAndAt(toGroupWxId, toWxId, toWxName, text string) error
- func (f *Framework) SendVideo(toWxId, path string) error
- func (f *Framework) SendXML(toWxId, xmlStr string) error
- type FriendsListResp
- type GroupListResp
- type GroupMemberListResp
- type MessageResp
- type ObjectInfoResp
- type ReferenceXml
- type RobotInfoResp
- type SubscriptionListResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequest ¶
func NewRequest() *req.Client
Types ¶
type EmojiXml ¶ added in v1.6.3
type EmojiXml struct { XMLName xml.Name `xml:"msg"` Text string `xml:",chardata"` Emoji struct { Text string `xml:",chardata"` Fromusername string `xml:"fromusername,attr"` Tousername string `xml:"tousername,attr"` Type string `xml:"type,attr"` Idbuffer string `xml:"idbuffer,attr"` Md5 string `xml:"md5,attr"` Len string `xml:"len,attr"` Productid string `xml:"productid,attr"` Androidmd5 string `xml:"androidmd5,attr"` Androidlen string `xml:"androidlen,attr"` S60v3md5 string `xml:"s60v3md5,attr"` S60v3len string `xml:"s60v3len,attr"` S60v5md5 string `xml:"s60v5md5,attr"` S60v5len string `xml:"s60v5len,attr"` Cdnurl string `xml:"cdnurl,attr"` Designerid string `xml:"designerid,attr"` Thumburl string `xml:"thumburl,attr"` Encrypturl string `xml:"encrypturl,attr"` Aeskey string `xml:"aeskey,attr"` Externurl string `xml:"externurl,attr"` Externmd5 string `xml:"externmd5,attr"` Width string `xml:"width,attr"` Height string `xml:"height,attr"` Tpurl string `xml:"tpurl,attr"` Tpauthkey string `xml:"tpauthkey,attr"` Attachedtext string `xml:"attachedtext,attr"` Attachedtextcolor string `xml:"attachedtextcolor,attr"` Lensid string `xml:"lensid,attr"` Emojiattr string `xml:"emojiattr,attr"` Linkid string `xml:"linkid,attr"` Desc string `xml:"desc,attr"` } `xml:"emoji"` Gameext struct { Text string `xml:",chardata"` Type string `xml:"type,attr"` Content string `xml:"content,attr"` } `xml:"gameext"` }
EmojiXml emoji xml
type Framework ¶
type Framework struct { BotWxId string // 机器人微信ID ApiUrl string // http api地址 ApiToken string // http api鉴权token }
func (*Framework) AgreeFriendVerify ¶
func (*Framework) GetFriends ¶ added in v1.2.0
func (*Framework) GetGroupMembers ¶ added in v1.2.0
func (*Framework) GetObjectInfo ¶
func (*Framework) GetRobotInfo ¶ added in v1.2.9
func (*Framework) InviteIntoGroup ¶
func (*Framework) SendBusinessCard ¶
func (*Framework) SendFavorites ¶
func (*Framework) SendMessageRecord ¶
func (*Framework) SendMessageRecordXML ¶
func (*Framework) SendMiniProgram ¶
func (*Framework) SendShareLink ¶
func (*Framework) SendTextAndAt ¶
type FriendsListResp ¶ added in v1.1.0
type FriendsListResp struct { Code int `json:"code"` Msg string `json:"msg"` Result []struct { Wxid string `json:"wxid"` WxNum string `json:"wxNum"` Nick string `json:"nick"` Remark string `json:"remark"` NickBrief string `json:"nickBrief"` NickWhole string `json:"nickWhole"` RemarkBrief string `json:"remarkBrief"` RemarkWhole string `json:"remarkWhole"` EnBrief string `json:"enBrief"` EnWhole string `json:"enWhole"` V3 string `json:"v3"` Sign string `json:"sign"` Country string `json:"country"` Province string `json:"province"` City string `json:"city"` MomentsBackgroudImgUrl string `json:"momentsBackgroudImgUrl"` AvatarMinUrl string `json:"avatarMinUrl"` AvatarMaxUrl string `json:"avatarMaxUrl"` Sex string `json:"sex"` MemberNum int `json:"memberNum"` } `json:"result"` Wxid string `json:"wxid"` Port int `json:"port"` Pid int `json:"pid"` Flag string `json:"flag"` Timestamp string `json:"timestamp"` }
FriendsListResp 获取好友列表响应
type GroupListResp ¶ added in v1.1.0
type GroupListResp struct { Code int `json:"code"` Msg string `json:"msg"` Result []struct { Wxid string `json:"wxid"` WxNum string `json:"wxNum"` Nick string `json:"nick"` Remark string `json:"remark"` NickBrief string `json:"nickBrief"` NickWhole string `json:"nickWhole"` RemarkBrief string `json:"remarkBrief"` RemarkWhole string `json:"remarkWhole"` EnBrief string `json:"enBrief"` EnWhole string `json:"enWhole"` V3 string `json:"v3"` Sign string `json:"sign"` Country string `json:"country"` Province string `json:"province"` City string `json:"city"` MomentsBackgroudImgUrl string `json:"momentsBackgroudImgUrl"` AvatarMinUrl string `json:"avatarMinUrl"` AvatarMaxUrl string `json:"avatarMaxUrl"` Sex string `json:"sex"` MemberNum int `json:"memberNum"` } `json:"result"` Wxid string `json:"wxid"` Port int `json:"port"` Pid int `json:"pid"` Flag string `json:"flag"` Timestamp string `json:"timestamp"` }
GroupListResp 获取群组列表响应
type GroupMemberListResp ¶ added in v1.1.1
type GroupMemberListResp struct { Code int `json:"code"` Msg string `json:"msg"` Result []struct { Wxid string `json:"wxid"` GroupNick string `json:"groupNick"` } `json:"result"` Wxid string `json:"wxid"` Port int `json:"port"` Pid int `json:"pid"` Flag string `json:"flag"` Timestamp string `json:"timestamp"` }
GroupMemberListResp 获取群成员列表响应
type MessageResp ¶
type ObjectInfoResp ¶
type ObjectInfoResp struct { Code int `json:"code"` Msg string `json:"msg"` Result struct { Wxid string `json:"wxid"` WxNum string `json:"wxNum"` Nick string `json:"nick"` Remark string `json:"remark"` NickBrief string `json:"nickBrief"` NickWhole string `json:"nickWhole"` RemarkBrief string `json:"remarkBrief"` RemarkWhole string `json:"remarkWhole"` EnBrief string `json:"enBrief"` EnWhole string `json:"enWhole"` V3 string `json:"v3"` V4 string `json:"v4"` Sign string `json:"sign"` Country string `json:"country"` Province string `json:"province"` City string `json:"city"` MomentsBackgroudImgUrl string `json:"momentsBackgroudImgUrl"` AvatarMinUrl string `json:"avatarMinUrl"` AvatarMaxUrl string `json:"avatarMaxUrl"` Sex string `json:"sex"` MemberNum int `json:"memberNum"` } `json:"result"` Wxid string `json:"wxid"` Port int `json:"port"` Pid int `json:"pid"` Flag string `json:"flag"` Timestamp string `json:"timestamp"` }
ObjectInfoResp 对象可以是好友、群、公众号
type ReferenceXml ¶ added in v1.6.3
type ReferenceXml struct { XMLName xml.Name `xml:"msg"` Text string `xml:",chardata"` Appmsg struct { Text string `xml:",chardata"` Appid string `xml:"appid,attr"` Sdkver string `xml:"sdkver,attr"` Title string `xml:"title"` Des string `xml:"des"` Action string `xml:"action"` Type string `xml:"type"` Showtype string `xml:"showtype"` Soundtype string `xml:"soundtype"` Mediatagname string `xml:"mediatagname"` Messageext string `xml:"messageext"` Messageaction string `xml:"messageaction"` Content string `xml:"content"` Contentattr string `xml:"contentattr"` URL string `xml:"url"` Lowurl string `xml:"lowurl"` Dataurl string `xml:"dataurl"` Lowdataurl string `xml:"lowdataurl"` Appattach struct { Text string `xml:",chardata"` Totallen string `xml:"totallen"` Attachid string `xml:"attachid"` Emoticonmd5 string `xml:"emoticonmd5"` Fileext string `xml:"fileext"` Aeskey string `xml:"aeskey"` } `xml:"appattach"` Extinfo string `xml:"extinfo"` Sourceusername string `xml:"sourceusername"` Sourcedisplayname string `xml:"sourcedisplayname"` Thumburl string `xml:"thumburl"` Md5 string `xml:"md5"` Statextstr string `xml:"statextstr"` Refermsg *struct { Text string `xml:",chardata"` Type string `xml:"type"` Svrid string `xml:"svrid"` Fromusr string `xml:"fromusr"` Chatusr string `xml:"chatusr"` Displayname string `xml:"displayname"` Content string `xml:"content"` } `xml:"refermsg"` } `xml:"appmsg"` Fromusername string `xml:"fromusername"` Scene string `xml:"scene"` Appinfo struct { Text string `xml:",chardata"` Version string `xml:"version"` Appname string `xml:"appname"` } `xml:"appinfo"` Commenturl string `xml:"commenturl"` }
ReferenceXml 引用消息xml
type RobotInfoResp ¶ added in v1.2.9
type RobotInfoResp struct { Code int `json:"code"` Msg string `json:"msg"` Result struct { Wxid string `json:"wxid"` WxNum string `json:"wxNum"` Nick string `json:"nick"` Device string `json:"device"` Phone string `json:"phone"` AvatarUrl string `json:"avatarUrl"` Country string `json:"country"` Province string `json:"province"` City string `json:"city"` Email string `json:"email"` Qq string `json:"qq"` } `json:"result"` Wxid string `json:"wxid"` Port int `json:"port"` Pid int `json:"pid"` Flag string `json:"flag"` Timestamp string `json:"timestamp"` }
type SubscriptionListResp ¶ added in v1.1.0
type SubscriptionListResp struct { Code int `json:"code"` Msg string `json:"msg"` Result []struct { Wxid string `json:"wxid"` WxNum string `json:"wxNum"` Nick string `json:"nick"` Remark string `json:"remark"` NickBrief string `json:"nickBrief"` NickWhole string `json:"nickWhole"` RemarkBrief string `json:"remarkBrief"` RemarkWhole string `json:"remarkWhole"` EnBrief string `json:"enBrief"` EnWhole string `json:"enWhole"` V3 string `json:"v3"` Sign string `json:"sign"` Country string `json:"country"` Province string `json:"province"` City string `json:"city"` MomentsBackgroudImgUrl string `json:"momentsBackgroudImgUrl"` AvatarMinUrl string `json:"avatarMinUrl"` AvatarMaxUrl string `json:"avatarMaxUrl"` Sex string `json:"sex"` MemberNum int `json:"memberNum"` } `json:"result"` Wxid string `json:"wxid"` Port int `json:"port"` Pid int `json:"pid"` Flag string `json:"flag"` Timestamp string `json:"timestamp"` }
SubscriptionListResp 获取订阅号列表响应
Click to show internal directories.
Click to hide internal directories.