webwx

package
v0.0.0-...-0cd4bc7 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoginCodeURL

func NewLoginCodeURL() (string, error)

func Run

func Run(handle MsgHandleFunc, argv string) error

Types

type Cmd

type Cmd struct {
	// contains filtered or unexported fields
}

type Msg

type Msg struct {
	MsgID        string `json:"MsgId"`
	FromUserName string `json:"FromUserName"`
	ToUserName   string `json:"ToUserName"`
	MsgType      int    `json:"MsgType"`
	Content      string `json:"Content"`
	Status       string `json:"Status"`
}

Msg wechat msg struct

type MsgHandleFunc

type MsgHandleFunc func(wx *Wechat, msgs []*Msg) error

MsgHandleFunc webwx recv msg will call

type User

type User struct {
	Uin         int    `json:"Uin"`
	UserName    string `json:"UserName"`
	NickName    string `json:"NickName"`
	HeadImgURL  string `json:"HeadImgUrl"`
	ContactFlag int    `json:"ContactFlag"`
	RemarkName  string `json:"RemarkName"`
	Sex         int    `json:"Sex"`
	Status      int    `json:"Status"`
	AttrStatus  int    `json:"AttrStatus"`
	Province    string `json:"Province"`
	City        string `json:"City"`
}

User user info

type Wechat

type Wechat struct {
	Skey       string `json:"skey"`
	Uin        string `json:"uid"`
	Sid        string `json:"sid"`
	DeviceID   string `json:"device_id"`
	PassTicket string `json:"pass_ticket"`
	UUID       string `json:"uuid"`
	Name       string
	// contains filtered or unexported fields
}

Wechat wechat context

func (*Wechat) GetUser

func (w *Wechat) GetUser(username string) *User

func (*Wechat) Init

func (w *Wechat) Init(client *http.Client)

func (*Wechat) SaveSession

func (w *Wechat) SaveSession() string

func (*Wechat) SendMsg

func (w *Wechat) SendMsg(toUserName, content string) (err error)

SendMsg send msg

Jump to

Keyboard shortcuts

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