Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (53 sloc) 6.24 KB

Puppet

1. Intro

The term Puppet in Wechaty is an Abstract Class for implementing protocol plugins. The plugins are the component that helps Wechaty to control the Wechat(that's the reason we call it puppet).

The plugins are named PuppetXXX, like PuppetPuppeteer is using the google puppeteer to control the WeChat Web API via a chrome browser, PuppetPadchat is using the WebSocket protocol to connect with a Protocol Server for controlling the iPad Wechat program. More detail you could go Puppet in wiki.

For a deeper understanding of the Puppet in Wechaty, you can read its source code if you like at https://github.com/Chatie/wechaty-puppet/blob/master/src/puppet.ts

2. Wechaty Puppet List

2.1. For Puppet User

Wechaty Puppet Backend Protocol Npm Name Npm Version Stage
PuppetPuppeteer Web API via Browser Hooking wechaty-puppet-puppeteer PuppetPuppeteer npm (tag) Stage:Release
PuppetPadchat iPad Protocol wechaty-puppet-padchat PuppetPadchat npm (tag) Stage:Release
PuppetPadpro iPad Protocol Enhance wechaty-puppet-padchat, see more issue1668 PuppetPadpro npm (tag) Stage:Release
PuppetWechat4u Web API via HTTP wechaty-puppet-wechat4u PuppetWechat4u npm (tag) Stage:Release
PuppetIosbird iPhone Hook wechaty-puppet-iosbird PuppetIosbird npm (tag) Stage:Release
TBW Android Hook Android 0.0.0 Stage:Release
TBW Win32 Hook Win32 0.0.0 Stage:Release

2.2. For Puppet Builder

Wechaty Puppet Backend Protocol Npm Name Npm Version Stage
Puppet Abstract Base Class wechaty-puppet Puppet npm (tag) Stage:Release
PuppetMock Mocking wechaty-puppet-mock PuppetMock npm (tag) Stage:Release

3. Wechaty Puppet Compatibility

3.1 Puppet Contact API

Contact API wechat4u & puppeteer padchat Iosbird
Permanent ContactPayload.id No Yes Yes
ContactPayload.friend No Yes Yes
weixin() No Yes Yes

3.2 Puppet Message API

Message API wechat4u & puppeteer padchat Iosbird
messageSendContact() No Yes No
messageFile() Yes Yes for Image/Audio/Video No for other Attachments Yes for Image/Audio/Video/other Attachments/UrlLink
messageSendFile() Yes Yes for Image/Audio/Video No for other Attachments Yes for Image No for other Attachment
messageSendUrl() No Yes No

3.3 Puppet Room API

Room API wechat4u & puppeteer padchat Iosbird
Permanent RoomPayload.id No Yes Yes
roomQrcode() No Yes Yes
roomCreate() No Yes Yes
roomAdd() No Yes Yes
roomDel() No Yes Yes
roomQuit() No Yes Yes
roomAnnounce() No Yes Yes
roomPayload.owner No Yes No

4. Learn More

Learn more about Wechaty Puppet at https://github.com/Chatie/wechaty-puppet/wiki

You can’t perform that action at this time.