Repository navigation
Expand file tree
/
Copy pathbandwidth_client.py
More file actions
42 lines (34 loc) · 1.73 KB
/
Copy pathbandwidth_client.py
File metadata and controls
42 lines (34 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# -*- coding: utf-8 -*-
"""
bandwidth
This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""
from bandwidth.decorators import lazy_property
from bandwidth.configuration import Configuration
from bandwidth.configuration import Environment
from bandwidth.messaging.messaging_client import MessagingClient
from bandwidth.voice.voice_client import VoiceClient
class BandwidthClient(object):
@lazy_property
def messaging_client(self):
return MessagingClient(config=self.config)
@lazy_property
def voice_client(self):
return VoiceClient(config=self.config)
def __init__(self, timeout=60, max_retries=3, backoff_factor=0,
environment=Environment.PRODUCTION,
messaging_basic_auth_user_name='TODO: Replace',
messaging_basic_auth_password='TODO: Replace',
voice_basic_auth_user_name='TODO: Replace',
voice_basic_auth_password='TODO: Replace', config=None):
if config is None:
self.config = Configuration(timeout=timeout,
max_retries=max_retries,
backoff_factor=backoff_factor,
environment=environment,
messaging_basic_auth_user_name=messaging_basic_auth_user_name,
messaging_basic_auth_password=messaging_basic_auth_password,
voice_basic_auth_user_name=voice_basic_auth_user_name,
voice_basic_auth_password=voice_basic_auth_password)
else:
self.config = config