@@ -43,7 +43,8 @@ <h1 class="title">Module <code>client</code></h1>
43
43
44
44
config = ConfigParser()
45
45
config.read('configs/main.ini')
46
- stable_version = config.get('api_versions', 'stable')
46
+ stable_version = config.get('api', 'stable')
47
+ api_url = config.get('api', 'url')
47
48
48
49
49
50
# pylint: disable=R0903
@@ -54,7 +55,7 @@ <h1 class="title">Module <code>client</code></h1>
54
55
def get_client(license_id: int = None,
55
56
access_token: str = None,
56
57
version: str = stable_version,
57
- base_url: str = 'api.livechatinc.com' ,
58
+ base_url: str = api_url ,
58
59
http2: bool = False,
59
60
organization_id: str = None) -> CustomerWebInterface:
60
61
''' Returns client for specific API version.
@@ -64,7 +65,7 @@ <h1 class="title">Module <code>client</code></h1>
64
65
token (str): Full token with type (Bearer/Basic) that will be
65
66
used as `Authorization` header in requests to API.
66
67
version (str): API's version. Defaults to the stable version of API.
67
- base_url (str): API's base url. Defaults to `api.livechatinc.com` .
68
+ base_url (str): API's base url. Defaults to API's production URL .
68
69
http2 (bool): A boolean indicating if HTTP/2 support should be
69
70
enabled. Defaults to `False`.
70
71
organization_id (str): Organization ID, replaced license ID in v3.4.
@@ -1265,7 +1266,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
1265
1266
def get_client(license_id: int = None,
1266
1267
access_token: str = None,
1267
1268
version: str = stable_version,
1268
- base_url: str = 'api.livechatinc.com' ,
1269
+ base_url: str = api_url ,
1269
1270
http2: bool = False,
1270
1271
organization_id: str = None) -> CustomerWebInterface:
1271
1272
''' Returns client for specific API version.
@@ -1275,7 +1276,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
1275
1276
token (str): Full token with type (Bearer/Basic) that will be
1276
1277
used as `Authorization` header in requests to API.
1277
1278
version (str): API's version. Defaults to the stable version of API.
1278
- base_url (str): API's base url. Defaults to `api.livechatinc.com` .
1279
+ base_url (str): API's base url. Defaults to API's production URL .
1279
1280
http2 (bool): A boolean indicating if HTTP/2 support should be
1280
1281
enabled. Defaults to `False`.
1281
1282
organization_id (str): Organization ID, replaced license ID in v3.4.
@@ -1336,7 +1337,7 @@ <h2 id="args">Args</h2>
1336
1337
< dt > < strong > < code > version</ code > </ strong > : < code > str</ code > </ dt >
1337
1338
< dd > API's version. Defaults to the stable version of API.</ dd >
1338
1339
< dt > < strong > < code > base_url</ code > </ strong > : < code > str</ code > </ dt >
1339
- < dd > API's base url. Defaults to < code > api.livechatinc.com </ code > .</ dd >
1340
+ < dd > API's base url. Defaults to API's production URL .</ dd >
1340
1341
< dt > < strong > < code > http2</ code > </ strong > : < code > bool</ code > </ dt >
1341
1342
< dd > A boolean indicating if HTTP/2 support should be
1342
1343
enabled. Defaults to < code > False</ code > .</ dd >
@@ -1359,7 +1360,7 @@ <h2 id="raises">Raises</h2>
1359
1360
def get_client(license_id: int = None,
1360
1361
access_token: str = None,
1361
1362
version: str = stable_version,
1362
- base_url: str = 'api.livechatinc.com' ,
1363
+ base_url: str = api_url ,
1363
1364
http2: bool = False,
1364
1365
organization_id: str = None) -> CustomerWebInterface:
1365
1366
''' Returns client for specific API version.
@@ -1369,7 +1370,7 @@ <h2 id="raises">Raises</h2>
1369
1370
token (str): Full token with type (Bearer/Basic) that will be
1370
1371
used as `Authorization` header in requests to API.
1371
1372
version (str): API's version. Defaults to the stable version of API.
1372
- base_url (str): API's base url. Defaults to `api.livechatinc.com` .
1373
+ base_url (str): API's base url. Defaults to API's production URL .
1373
1374
http2 (bool): A boolean indicating if HTTP/2 support should be
1374
1375
enabled. Defaults to `False`.
1375
1376
organization_id (str): Organization ID, replaced license ID in v3.4.
0 commit comments