@@ -49,12 +49,13 @@ <h1 class="title">Module <code>livechat.agent.web.base</code></h1>
49
49
API version. '''
50
50
@staticmethod
51
51
def get_client(
52
- access_token: str,
53
- version: str = stable_version,
54
- base_url: str = api_url,
55
- http2: bool = False,
56
- proxies: dict = None,
57
- verify: bool = True
52
+ access_token: str,
53
+ version: str = stable_version,
54
+ base_url: str = api_url,
55
+ http2: bool = False,
56
+ proxies: dict = None,
57
+ verify: bool = True,
58
+ disable_logging: bool = False,
58
59
) -> Union[AgentWebV33, AgentWebV34, AgentWebV35]:
59
60
''' Returns client for specific API version.
60
61
@@ -70,6 +71,7 @@ <h1 class="title">Module <code>livechat.agent.web.base</code></h1>
70
71
verify the identity of requested hosts. Either `True` (default CA bundle),
71
72
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
72
73
(which will disable verification). Defaults to `True`.
74
+ disable_logging (bool): indicates if logging should be disabled.
73
75
74
76
Returns:
75
77
API client object for specified version.
@@ -78,10 +80,18 @@ <h1 class="title">Module <code>livechat.agent.web.base</code></h1>
78
80
ValueError: If the specified version does not exist.
79
81
'''
80
82
client = {
81
- '3.3': AgentWebV33(access_token, base_url, http2, proxies, verify),
82
- '3.4': AgentWebV34(access_token, base_url, http2, proxies, verify),
83
- '3.5': AgentWebV35(access_token, base_url, http2, proxies, verify),
84
- '3.6': AgentWebV36(access_token, base_url, http2, proxies, verify),
83
+ '3.3':
84
+ AgentWebV33(access_token, base_url, http2, proxies, verify,
85
+ disable_logging),
86
+ '3.4':
87
+ AgentWebV34(access_token, base_url, http2, proxies, verify,
88
+ disable_logging),
89
+ '3.5':
90
+ AgentWebV35(access_token, base_url, http2, proxies, verify,
91
+ disable_logging),
92
+ '3.6':
93
+ AgentWebV36(access_token, base_url, http2, proxies, verify,
94
+ disable_logging),
85
95
}.get(version)
86
96
if not client:
87
97
raise ValueError('Provided version does not exist.')
@@ -112,12 +122,13 @@ <h2 class="section-title" id="header-classes">Classes</h2>
112
122
API version. '''
113
123
@staticmethod
114
124
def get_client(
115
- access_token: str,
116
- version: str = stable_version,
117
- base_url: str = api_url,
118
- http2: bool = False,
119
- proxies: dict = None,
120
- verify: bool = True
125
+ access_token: str,
126
+ version: str = stable_version,
127
+ base_url: str = api_url,
128
+ http2: bool = False,
129
+ proxies: dict = None,
130
+ verify: bool = True,
131
+ disable_logging: bool = False,
121
132
) -> Union[AgentWebV33, AgentWebV34, AgentWebV35]:
122
133
''' Returns client for specific API version.
123
134
@@ -133,6 +144,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
133
144
verify the identity of requested hosts. Either `True` (default CA bundle),
134
145
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
135
146
(which will disable verification). Defaults to `True`.
147
+ disable_logging (bool): indicates if logging should be disabled.
136
148
137
149
Returns:
138
150
API client object for specified version.
@@ -141,10 +153,18 @@ <h2 class="section-title" id="header-classes">Classes</h2>
141
153
ValueError: If the specified version does not exist.
142
154
'''
143
155
client = {
144
- '3.3': AgentWebV33(access_token, base_url, http2, proxies, verify),
145
- '3.4': AgentWebV34(access_token, base_url, http2, proxies, verify),
146
- '3.5': AgentWebV35(access_token, base_url, http2, proxies, verify),
147
- '3.6': AgentWebV36(access_token, base_url, http2, proxies, verify),
156
+ '3.3':
157
+ AgentWebV33(access_token, base_url, http2, proxies, verify,
158
+ disable_logging),
159
+ '3.4':
160
+ AgentWebV34(access_token, base_url, http2, proxies, verify,
161
+ disable_logging),
162
+ '3.5':
163
+ AgentWebV35(access_token, base_url, http2, proxies, verify,
164
+ disable_logging),
165
+ '3.6':
166
+ AgentWebV36(access_token, base_url, http2, proxies, verify,
167
+ disable_logging),
148
168
}.get(version)
149
169
if not client:
150
170
raise ValueError('Provided version does not exist.')
@@ -153,7 +173,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
153
173
< h3 > Static methods</ h3 >
154
174
< dl >
155
175
< dt id ="livechat.agent.web.base.AgentWeb.get_client "> < code class ="name flex ">
156
- < span > def < span class ="ident "> get_client</ span > </ span > (< span > access_token: str, version: str = '3.5', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True) ‑> Union[< a title ="livechat.agent.web.api.v33.AgentWebV33 " href ="api/v33.html#livechat.agent.web.api.v33.AgentWebV33 "> AgentWebV33</ a > , < a title ="livechat.agent.web.api.v34.AgentWebV34 " href ="api/v34.html#livechat.agent.web.api.v34.AgentWebV34 "> AgentWebV34</ a > , < a title ="livechat.agent.web.api.v35.AgentWebV35 " href ="api/v35.html#livechat.agent.web.api.v35.AgentWebV35 "> AgentWebV35</ a > ]</ span >
176
+ < span > def < span class ="ident "> get_client</ span > </ span > (< span > access_token: str, version: str = '3.5', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True, disable_logging: bool = False ) ‑> Union[< a title ="livechat.agent.web.api.v33.AgentWebV33 " href ="api/v33.html#livechat.agent.web.api.v33.AgentWebV33 "> AgentWebV33</ a > , < a title ="livechat.agent.web.api.v34.AgentWebV34 " href ="api/v34.html#livechat.agent.web.api.v34.AgentWebV34 "> AgentWebV34</ a > , < a title ="livechat.agent.web.api.v35.AgentWebV35 " href ="api/v35.html#livechat.agent.web.api.v35.AgentWebV35 "> AgentWebV35</ a > ]</ span >
157
177
</ code > </ dt >
158
178
< dd >
159
179
< div class ="desc "> < p > Returns client for specific API version.</ p >
@@ -176,6 +196,8 @@ <h2 id="args">Args</h2>
176
196
verify the identity of requested hosts. Either < code > True</ code > (default CA bundle),
177
197
a path to an SSL certificate file, an < code > ssl.SSLContext</ code > , or < code > False</ code >
178
198
(which will disable verification). Defaults to < code > True</ code > .</ dd >
199
+ < dt > < strong > < code > disable_logging</ code > </ strong > : < code > bool</ code > </ dt >
200
+ < dd > indicates if logging should be disabled.</ dd >
179
201
</ dl >
180
202
< h2 id ="returns "> Returns</ h2 >
181
203
< p > API client object for specified version.</ p >
@@ -190,12 +212,13 @@ <h2 id="raises">Raises</h2>
190
212
</ summary >
191
213
< pre > < code class ="python "> @staticmethod
192
214
def get_client(
193
- access_token: str,
194
- version: str = stable_version,
195
- base_url: str = api_url,
196
- http2: bool = False,
197
- proxies: dict = None,
198
- verify: bool = True
215
+ access_token: str,
216
+ version: str = stable_version,
217
+ base_url: str = api_url,
218
+ http2: bool = False,
219
+ proxies: dict = None,
220
+ verify: bool = True,
221
+ disable_logging: bool = False,
199
222
) -> Union[AgentWebV33, AgentWebV34, AgentWebV35]:
200
223
''' Returns client for specific API version.
201
224
@@ -211,6 +234,7 @@ <h2 id="raises">Raises</h2>
211
234
verify the identity of requested hosts. Either `True` (default CA bundle),
212
235
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
213
236
(which will disable verification). Defaults to `True`.
237
+ disable_logging (bool): indicates if logging should be disabled.
214
238
215
239
Returns:
216
240
API client object for specified version.
@@ -219,10 +243,18 @@ <h2 id="raises">Raises</h2>
219
243
ValueError: If the specified version does not exist.
220
244
'''
221
245
client = {
222
- '3.3': AgentWebV33(access_token, base_url, http2, proxies, verify),
223
- '3.4': AgentWebV34(access_token, base_url, http2, proxies, verify),
224
- '3.5': AgentWebV35(access_token, base_url, http2, proxies, verify),
225
- '3.6': AgentWebV36(access_token, base_url, http2, proxies, verify),
246
+ '3.3':
247
+ AgentWebV33(access_token, base_url, http2, proxies, verify,
248
+ disable_logging),
249
+ '3.4':
250
+ AgentWebV34(access_token, base_url, http2, proxies, verify,
251
+ disable_logging),
252
+ '3.5':
253
+ AgentWebV35(access_token, base_url, http2, proxies, verify,
254
+ disable_logging),
255
+ '3.6':
256
+ AgentWebV36(access_token, base_url, http2, proxies, verify,
257
+ disable_logging),
226
258
}.get(version)
227
259
if not client:
228
260
raise ValueError('Provided version does not exist.')
@@ -262,4 +294,4 @@ <h4><code><a title="livechat.agent.web.base.AgentWeb" href="#livechat.agent.web.
262
294
< p > Generated by < a href ="https://pdoc3.github.io/pdoc " title ="pdoc: Python API documentation generator "> < cite > pdoc</ cite > 0.10.0</ a > .</ p >
263
295
</ footer >
264
296
</ body >
265
- </ html >
297
+ </ html >
0 commit comments