wechatify
v1.0.2
Published
impl for iPad wechat dll, wrapped.
Downloads
187
Readme
Wechatify
基于iPad
协议的迷你微信服务端。基于go
服务的封装。此 SDK 用于快速构建微信迷你服务。具体请联系原作者。
Install
$ npm i wechatify
Usage
import Wechat, {
WechatPersonalInfoCustomResponse,
WechatLoginWithQrcodeCustomRequest,
} from 'wechatify';
const wechat = new Wechat({
host: 'http://127.0.0.1:8081',
});
wechat.on('wechat:forbiden', (wxid: string) => {
console.log('[wechat:forbiden]', wxid);
})
wechat.on('wechat:offline', (wxid: string) => {
console.log('[wechat:offline]', wxid);
})
wechat.on('wechat:reconnect', (wxid: string) => {
console.log('[wechat:reconnect]', wxid);
})
wechat.on('wechat:error', (wxid: string, e: any) => {
console.log('[wechat:error]', wxid, e);
})
wechat.on('wechat:unexists', (wxid: string) => {
console.log('[wechat:unexists]', wxid);
})
wechat.on('wechat:online', (wxid: string, info: WechatPersonalInfoCustomResponse, meta: WechatLoginWithQrcodeCustomRequest) => {
console.log('[wechat:online]', wxid, info, meta);
})
wechat.start();
QRCode
const { base64, uuid } = await wechat.createQRCode();
Check qrcode scan status
const [status, data] = wechat.getQRCodeMetaByUUID(uuid);
Offline
await wechat.offline(wxid);