How to use the messagebird.http_client.HttpClient 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 _get_http_client(self, type=REST_TYPE):
        if self.http_client:
            return self.http_client

        if type == CONVERSATION_TYPE:
            return HttpClient(self.conversation_api_root, self.access_key, USER_AGENT)

        if type == VOICE_TYPE:
            return HttpClient(VOICE_API_ROOT, self.access_key, USER_AGENT)

        if type == NUMBER_TYPE:
            return HttpClient(NUMBER_API_ROOT, self.access_key, USER_AGENT)

        return HttpClient(ENDPOINT, self.access_key, USER_AGENT)
github messagebird / python-rest-api / messagebird / client.py View on Github external
def _get_http_client(self, type=REST_TYPE):
        if self.http_client:
            return self.http_client

        if type == CONVERSATION_TYPE:
            return HttpClient(self.conversation_api_root, self.access_key, USER_AGENT)

        if type == VOICE_TYPE:
            return HttpClient(VOICE_API_ROOT, self.access_key, USER_AGENT)

        if type == NUMBER_TYPE:
            return HttpClient(NUMBER_API_ROOT, self.access_key, USER_AGENT)

        return HttpClient(ENDPOINT, self.access_key, USER_AGENT)
github messagebird / python-rest-api / messagebird / client.py View on Github external
def _get_http_client(self, type=REST_TYPE):
        if self.http_client:
            return self.http_client

        if type == CONVERSATION_TYPE:
            return HttpClient(self.conversation_api_root, self.access_key, USER_AGENT)

        if type == VOICE_TYPE:
            return HttpClient(VOICE_API_ROOT, self.access_key, USER_AGENT)

        if type == NUMBER_TYPE:
            return HttpClient(NUMBER_API_ROOT, self.access_key, USER_AGENT)

        return HttpClient(ENDPOINT, self.access_key, USER_AGENT)
github messagebird / python-rest-api / messagebird / client.py View on Github external
def _get_http_client(self, type=REST_TYPE):
        if self.http_client:
            return self.http_client

        if type == CONVERSATION_TYPE:
            return HttpClient(self.conversation_api_root, self.access_key, USER_AGENT)

        if type == VOICE_TYPE:
            return HttpClient(VOICE_API_ROOT, self.access_key, USER_AGENT)

        if type == NUMBER_TYPE:
            return HttpClient(NUMBER_API_ROOT, self.access_key, USER_AGENT)

        return HttpClient(ENDPOINT, self.access_key, USER_AGENT)
github messagebird / python-rest-api / messagebird / conversation_client.py View on Github external
def __init__(self, access_key, http_client=None):
        self.access_key = access_key

        if http_client is None:
            http_client = HttpClient(CONVERSATION_API_ROOT, access_key, USER_AGENT)

        self.client = Client(access_key, http_client)