danielcardeenas / whatsapp-framework

⚗️Whatsapp python api
1.16k stars 363 forks source link

A RESTful API #53

Open coolnickname opened 6 years ago

coolnickname commented 6 years ago

Could you please consider implement a RESTful type API? I know from experience Flask is a great tool to work with.

Python is not my first choice programming language and I'd much rather code in Java, and by implement and REST API you could make your API support literally every programming language with internet implementations.

sealabr commented 6 years ago

I've made an implementation of flask integration, soon make it available....

danielcardeenas commented 6 years ago

I am working on this

sehgal10 commented 6 years ago

Hi @sealabr @danielcardeenas I need this too, when are you expecting to launch this?

danielcardeenas commented 6 years ago

Couple hours from now. But I'm not making an API. Just a reusable library

coolnickname commented 6 years ago

@danielcardeenas Have you managed to finish this yet? I'm at the point where I need this too now.

eaba commented 6 years ago

@danielcardeenas am waiting.......badly!!!!!!!!!!

coolnickname commented 6 years ago

Is there still no update on this? Please just release what you have on a seperate branch or something so we can finish it.

sealabr commented 6 years ago

check my branch restful

https://github.com/sealabr/whatsapp-framework/tree/restful

you can send messages like: http://192.168.0.107:5122/SendPostMessage?msg=téste&number=5524992942594

you need to run restful.py

and when receives send requests to another web-server

image

** remember to change IP adress in restful.py and modules/restful_flask/message_receive.py

coolnickname commented 6 years ago

Thanks! It looks really useful! However I don't quite understand how to receive incoming messages. Could you clear that up for me?

sealabr commented 6 years ago

restful_flask/message_receive.py is a module in whatsapp-framework, ok

when receives a messages (TEXT message), make a request a another webservice (like a node.js to store this message to database)

image [give a zoom in this pic plz]

a little concept of microservices. particularly i dont like to handle database persistence in python+yowsup.. I prefer to send a HTTP request to another webservice to store this message..

coolnickname commented 6 years ago

@sealabr That branch is horribly out of date, comparing to the the master branch on this repo. Please update it because otherwise the risk of getting banned is just too big.

It might just be Github acting up because it seems like you did a force push.

eaba commented 6 years ago

Couple hours from now. But I'm not making an API. Just a reusable library @danielcardeenas a decade has passed and couples of hours from now has still not arrived

coolnickname commented 5 years ago

Is there any update on this yet? It's been nearly a year @danielcardeenas

armandochavez commented 5 years ago

aun funciona ??