karixtech / karix-python

Python client for Karix API
MIT License
6 stars 4 forks source link

media files support #1

Open sendbeedev opened 4 years ago

sendbeedev commented 4 years ago

Hi,

According to the official API documentation, Karix supports media files in Whatsapp messages: http://docs.karix.io/v2/#operation/sendMessage

Unfortunately, media files are not supported by this python library. Are you planing to implement this support any time soon?

Best regards.

felipemarin commented 4 years ago

+1

sendbeedev commented 4 years ago

Here's the workaround:

from karix.models import Message

def content_type(self, content_type):
    self._content_type = content_type

Message.content_type = content_type

So, just monkeypatch contant_type method to bypass content type validation.