How to use the messagebird.voice_webhook.VoiceWebhook 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 / client.py View on Github external
def voice_update_webhook(self, id, update_webhook_request):
        """ Update a voice webhook. """
        if update_webhook_request is None:
            raise ValidationError('Update request is empty')

        uri = VOICE_API_ROOT + '/' + VOICE_WEB_HOOKS_PATH + '/' + str(id)
        return VoiceWebhook().load(self.request(uri, 'PUT', update_webhook_request.__dict__(), VOICE_TYPE))
github messagebird / python-rest-api / messagebird / voice_webhook.py View on Github external
def data(self, value):
        if isinstance(value, list):
            self._items = []
            for item in value:
                self._items.append(VoiceWebhook().load(item))
github messagebird / python-rest-api / messagebird / client.py View on Github external
def voice_create_webhook(self, create_webhook_request):
        """ Create a voice webhook. """
        if create_webhook_request is None:
            raise ValidationError('Create request is empty')

        uri = VOICE_API_ROOT + '/' + VOICE_WEB_HOOKS_PATH
        return VoiceWebhook().load(self.request(uri, 'POST', create_webhook_request.__dict__(), VOICE_TYPE))
github messagebird / python-rest-api / messagebird / client.py View on Github external
def voice_read_webhook(self, id):
        """
        Retrieve a voice webhook
        API Reference: https://developers.messagebird.com/api/voice-calling/#webhooks
        """
        uri = VOICE_API_ROOT + '/' + VOICE_WEB_HOOKS_PATH + '/' + str(id)
        return VoiceWebhook().load(self.request(uri, 'GET', None, VOICE_TYPE))