Skip to content

Commit cc6efd8

Browse files
committed
Update documentation, pt2
1 parent cab1477 commit cc6efd8

File tree

11 files changed

+429
-368
lines changed

11 files changed

+429
-368
lines changed

docs/agent/web/api/v34.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ <h1 class="title">Module <code>livechat.agent.web.api.v34</code></h1>
476476
httpx.Response: The Response object from `httpx` library,
477477
which contains a server’s response to an HTTP request. &#39;&#39;&#39;
478478
return self.session.post(f&#39;{self.api_url}/upload_file&#39;,
479-
content=file.read(),
479+
file=file,
480480
headers=headers)
481481

482482
def send_rich_message_postback(self,
@@ -1551,7 +1551,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
15511551
httpx.Response: The Response object from `httpx` library,
15521552
which contains a server’s response to an HTTP request. &#39;&#39;&#39;
15531553
return self.session.post(f&#39;{self.api_url}/upload_file&#39;,
1554-
content=file.read(),
1554+
file=file,
15551555
headers=headers)
15561556

15571557
def send_rich_message_postback(self,
@@ -4384,7 +4384,7 @@ <h2 id="returns">Returns</h2>
43844384
httpx.Response: The Response object from `httpx` library,
43854385
which contains a server’s response to an HTTP request. &#39;&#39;&#39;
43864386
return self.session.post(f&#39;{self.api_url}/upload_file&#39;,
4387-
content=file.read(),
4387+
file=file,
43884388
headers=headers)</code></pre>
43894389
</details>
43904390
</dd>

docs/agent/web/api/v35.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ <h1 class="title">Module <code>livechat.agent.web.api.v35</code></h1>
476476
httpx.Response: The Response object from `httpx` library,
477477
which contains a server’s response to an HTTP request. &#39;&#39;&#39;
478478
return self.session.post(f&#39;{self.api_url}/upload_file&#39;,
479-
content=file.read(),
479+
file=file,
480480
headers=headers)
481481

482482
def send_rich_message_postback(self,
@@ -1551,7 +1551,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
15511551
httpx.Response: The Response object from `httpx` library,
15521552
which contains a server’s response to an HTTP request. &#39;&#39;&#39;
15531553
return self.session.post(f&#39;{self.api_url}/upload_file&#39;,
1554-
content=file.read(),
1554+
file=file,
15551555
headers=headers)
15561556

15571557
def send_rich_message_postback(self,
@@ -4384,7 +4384,7 @@ <h2 id="returns">Returns</h2>
43844384
httpx.Response: The Response object from `httpx` library,
43854385
which contains a server’s response to an HTTP request. &#39;&#39;&#39;
43864386
return self.session.post(f&#39;{self.api_url}/upload_file&#39;,
4387-
content=file.read(),
4387+
file=file,
43884388
headers=headers)</code></pre>
43894389
</details>
43904390
</dd>

docs/agent/web/base.html

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ <h1 class="title">Module <code>livechat.agent.web.base</code></h1>
5151
access_token: str,
5252
version: str = stable_version,
5353
base_url: str = api_url,
54-
http2: bool = False
54+
http2: bool = False,
55+
proxies: dict = None,
56+
verify: bool = True
5557
) -&gt; Union[AgentWebV33, AgentWebV34, AgentWebV35]:
5658
&#39;&#39;&#39; Returns client for specific API version.
5759

@@ -62,6 +64,11 @@ <h1 class="title">Module <code>livechat.agent.web.base</code></h1>
6264
base_url (str): API&#39;s base url. Defaults to API&#39;s production URL.
6365
http2 (bool): A boolean indicating if HTTP/2 support should be
6466
enabled. Defaults to `False`.
67+
proxies (dict): A dictionary mapping proxy keys to proxy URLs.
68+
verify (bool): SSL certificates (a.k.a CA bundle) used to
69+
verify the identity of requested hosts. Either `True` (default CA bundle),
70+
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
71+
(which will disable verification). Defaults to `True`.
6572

6673
Returns:
6774
API client object for specified version.
@@ -70,9 +77,9 @@ <h1 class="title">Module <code>livechat.agent.web.base</code></h1>
7077
ValueError: If the specified version does not exist.
7178
&#39;&#39;&#39;
7279
client = {
73-
&#39;3.3&#39;: AgentWebV33(access_token, base_url, http2),
74-
&#39;3.4&#39;: AgentWebV34(access_token, base_url, http2),
75-
&#39;3.5&#39;: AgentWebV35(access_token, base_url, http2),
80+
&#39;3.3&#39;: AgentWebV33(access_token, base_url, http2, proxies, verify),
81+
&#39;3.4&#39;: AgentWebV34(access_token, base_url, http2, proxies, verify),
82+
&#39;3.5&#39;: AgentWebV35(access_token, base_url, http2, proxies, verify),
7683
}.get(version)
7784
if not client:
7885
raise ValueError(&#39;Provided version does not exist.&#39;)
@@ -106,7 +113,9 @@ <h2 class="section-title" id="header-classes">Classes</h2>
106113
access_token: str,
107114
version: str = stable_version,
108115
base_url: str = api_url,
109-
http2: bool = False
116+
http2: bool = False,
117+
proxies: dict = None,
118+
verify: bool = True
110119
) -&gt; Union[AgentWebV33, AgentWebV34, AgentWebV35]:
111120
&#39;&#39;&#39; Returns client for specific API version.
112121

@@ -117,6 +126,11 @@ <h2 class="section-title" id="header-classes">Classes</h2>
117126
base_url (str): API&#39;s base url. Defaults to API&#39;s production URL.
118127
http2 (bool): A boolean indicating if HTTP/2 support should be
119128
enabled. Defaults to `False`.
129+
proxies (dict): A dictionary mapping proxy keys to proxy URLs.
130+
verify (bool): SSL certificates (a.k.a CA bundle) used to
131+
verify the identity of requested hosts. Either `True` (default CA bundle),
132+
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
133+
(which will disable verification). Defaults to `True`.
120134

121135
Returns:
122136
API client object for specified version.
@@ -125,9 +139,9 @@ <h2 class="section-title" id="header-classes">Classes</h2>
125139
ValueError: If the specified version does not exist.
126140
&#39;&#39;&#39;
127141
client = {
128-
&#39;3.3&#39;: AgentWebV33(access_token, base_url, http2),
129-
&#39;3.4&#39;: AgentWebV34(access_token, base_url, http2),
130-
&#39;3.5&#39;: AgentWebV35(access_token, base_url, http2),
142+
&#39;3.3&#39;: AgentWebV33(access_token, base_url, http2, proxies, verify),
143+
&#39;3.4&#39;: AgentWebV34(access_token, base_url, http2, proxies, verify),
144+
&#39;3.5&#39;: AgentWebV35(access_token, base_url, http2, proxies, verify),
131145
}.get(version)
132146
if not client:
133147
raise ValueError(&#39;Provided version does not exist.&#39;)
@@ -136,7 +150,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
136150
<h3>Static methods</h3>
137151
<dl>
138152
<dt id="livechat.agent.web.base.AgentWeb.get_client"><code class="name flex">
139-
<span>def <span class="ident">get_client</span></span>(<span>access_token: str, version: str = '3.4', base_url: str = 'api.livechatinc.com', http2: 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>
153+
<span>def <span class="ident">get_client</span></span>(<span>access_token: str, version: str = '3.4', 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>
140154
</code></dt>
141155
<dd>
142156
<div class="desc"><p>Returns client for specific API version.</p>
@@ -152,6 +166,13 @@ <h2 id="args">Args</h2>
152166
<dt><strong><code>http2</code></strong> :&ensp;<code>bool</code></dt>
153167
<dd>A boolean indicating if HTTP/2 support should be
154168
enabled. Defaults to <code>False</code>.</dd>
169+
<dt><strong><code>proxies</code></strong> :&ensp;<code>dict</code></dt>
170+
<dd>A dictionary mapping proxy keys to proxy URLs.</dd>
171+
<dt><strong><code>verify</code></strong> :&ensp;<code>bool</code></dt>
172+
<dd>SSL certificates (a.k.a CA bundle) used to
173+
verify the identity of requested hosts. Either <code>True</code> (default CA bundle),
174+
a path to an SSL certificate file, an <code>ssl.SSLContext</code>, or <code>False</code>
175+
(which will disable verification). Defaults to <code>True</code>.</dd>
155176
</dl>
156177
<h2 id="returns">Returns</h2>
157178
<p>API client object for specified version.</p>
@@ -169,7 +190,9 @@ <h2 id="raises">Raises</h2>
169190
access_token: str,
170191
version: str = stable_version,
171192
base_url: str = api_url,
172-
http2: bool = False
193+
http2: bool = False,
194+
proxies: dict = None,
195+
verify: bool = True
173196
) -&gt; Union[AgentWebV33, AgentWebV34, AgentWebV35]:
174197
&#39;&#39;&#39; Returns client for specific API version.
175198

@@ -180,6 +203,11 @@ <h2 id="raises">Raises</h2>
180203
base_url (str): API&#39;s base url. Defaults to API&#39;s production URL.
181204
http2 (bool): A boolean indicating if HTTP/2 support should be
182205
enabled. Defaults to `False`.
206+
proxies (dict): A dictionary mapping proxy keys to proxy URLs.
207+
verify (bool): SSL certificates (a.k.a CA bundle) used to
208+
verify the identity of requested hosts. Either `True` (default CA bundle),
209+
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
210+
(which will disable verification). Defaults to `True`.
183211

184212
Returns:
185213
API client object for specified version.
@@ -188,9 +216,9 @@ <h2 id="raises">Raises</h2>
188216
ValueError: If the specified version does not exist.
189217
&#39;&#39;&#39;
190218
client = {
191-
&#39;3.3&#39;: AgentWebV33(access_token, base_url, http2),
192-
&#39;3.4&#39;: AgentWebV34(access_token, base_url, http2),
193-
&#39;3.5&#39;: AgentWebV35(access_token, base_url, http2),
219+
&#39;3.3&#39;: AgentWebV33(access_token, base_url, http2, proxies, verify),
220+
&#39;3.4&#39;: AgentWebV34(access_token, base_url, http2, proxies, verify),
221+
&#39;3.5&#39;: AgentWebV35(access_token, base_url, http2, proxies, verify),
194222
}.get(version)
195223
if not client:
196224
raise ValueError(&#39;Provided version does not exist.&#39;)

0 commit comments

Comments
 (0)