Puppet
Last updated
Last updated
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/wechaty/wechaty-puppet/blob/master/src/puppet.ts
Learn more about Wechaty Puppet at https://github.com/wechaty/wechaty-puppet/wiki
Repository: https://github.com/wechaty/wechaty-puppet
Puppet Development Guide: https://github.com/wechaty/wechaty-puppet/wiki/Development
Puppet Related Links: https://github.com/wechaty/wechaty-puppet/wiki/Links
Contact API
wechat4u & puppeteer
padchat
Iosbird
Permanent ContactPayload.id
No
Yes
Yes
ContactPayload.friend
No
Yes
Yes
weixin()
No
Yes
Yes
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
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
Wechaty Puppet
Backend Protocol
Npm Name
Npm Version
Stage
Web API via Browser Hooking
wechaty-puppet-puppeteer
iPad Protocol
wechaty-puppet-padchat
iPad Protocol
Enhance wechaty-puppet-padchat, see more issue1668
Web API via HTTP
wechaty-puppet-wechat4u
iPhone Hook
wechaty-puppet-iosbird
TBW
Android Hook
Android
0.0.0
TBW
Win32 Hook
Win32
0.0.0
Wechaty Puppet
Backend Protocol
Npm Name
Npm Version
Stage
Abstract Base Class
wechaty-puppet
Mocking
wechaty-puppet-mock