Awesome
yowsup-http-wrapper
This project is a very simple HTTP wrapper for Yowsup. It lets you fetch messages and send them. It uses Tornado.
Implemented methods
I've been using Postman during my tests, you may find the methods and sample requests here:
Usage
I'm using this wrapper for a proxy project, which is written in Go. The Go program invokes the python
interpreter with the right arguments and interacts with it through Tornado.
In case you're interested, the Go program runs something like this:
python3 run.py 12341234 "whatsapp_password"
Tornado will listen on TCP port 8888 by default, if you plan to use an alternative port, you may append an additional argument:
python3 run.py 12341234 "whatsapp_password" 8889
It's important to note that this wrapper doesn't cover the Whatsapp registration process, so you'll have to do it by hand, using the yowsup-cli
tool, check the documentation. After you do a successful registration, you'll have a valid password to provide.
Ideas
- Implement Whatsapp "presence", e.g. when Tornado is up, set presence as available.
- Implement websockets?
- Fix the tests, make them play well with Yowsup, handle two clients at the same time!