How to use the messagebird.message.Message function in messagebird

To help you get started, we’ve selected a few messagebird examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github messagebird / python-rest-api / messagebird / message.py View on Github external
def __init__(self):
        # We're expecting items of type Message
        super(MessageList, self).__init__(Message)
github messagebird / python-rest-api / messagebird / client.py View on Github external
def message_create(self, originator, recipients, body, params=None):
        """Create a new message."""
        if params is None:
            params = {}
        if type(recipients) == list:
            recipients = ','.join(recipients)

        params.update({'originator': originator, 'body': body, 'recipients': recipients})
        return Message().load(self.request('messages', 'POST', params))
github messagebird / python-rest-api / messagebird / client.py View on Github external
def message(self, id):
        """Retrieve the information of a specific message."""
        return Message().load(self.request('messages/' + str(id)))