Skip to content

Commit bd14d32

Browse files
committed
Update API docs
1 parent 7fb5417 commit bd14d32

File tree

11 files changed

+707
-51
lines changed

11 files changed

+707
-51
lines changed

docs/api-docs/slack_sdk/index.html

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,17 +209,28 @@ <h2 class="section-title" id="header-classes">Classes</h2>
209209
<h2 id="attributes">Attributes</h2>
210210
<dl>
211211
<dt><strong><code>token</code></strong> :&ensp;<code>str</code></dt>
212-
<dd>A string specifying an xoxp or xoxb token.</dd>
212+
<dd>A string specifying an <code>xoxp-*</code> or <code>xoxb-*</code> token.</dd>
213213
<dt><strong><code>base_url</code></strong> :&ensp;<code>str</code></dt>
214214
<dd>A string representing the Slack API base URL.
215-
Default is 'https://www.slack.com/api/'</dd>
215+
Default is <code>'https://www.slack.com/api/'</code></dd>
216216
<dt><strong><code>timeout</code></strong> :&ensp;<code>int</code></dt>
217217
<dd>The maximum number of seconds the client will wait
218218
to connect and receive a response from Slack.
219219
Default is 30 seconds.</dd>
220+
<dt><strong><code>ssl</code></strong> :&ensp;<code>SSLContext</code></dt>
221+
<dd>An <a href="https://docs.python.org/3/library/ssl.html#ssl.SSLContext"><code>ssl.SSLContext</code></a> instance, helpful for specifying
222+
your own custom certificate chain.</dd>
223+
<dt><strong><code>proxy</code></strong> :&ensp;<code>str</code></dt>
224+
<dd>String representing a fully-qualified URL to a proxy through
225+
which to route all requests to the Slack API. Even if this parameter
226+
is not specified, if any of the following environment variables are
227+
present, they will be loaded into this parameter: <code>HTTPS_PROXY</code>,
228+
<code>https_proxy</code>, <code>HTTP_PROXY</code> or <code>http_proxy</code>.</dd>
229+
<dt><strong><code>headers</code></strong> :&ensp;<code>dict</code></dt>
230+
<dd>Additional request headers to attach to all requests.</dd>
220231
</dl>
221232
<h2 id="methods">Methods</h2>
222-
<p>api_call: Constructs a request and executes the API call to Slack.</p>
233+
<p><code>api_call</code>: Constructs a request and executes the API call to Slack.</p>
223234
<p>Example of recommended usage:</p>
224235
<pre><code class="language-python"> import os
225236
from slack_sdk import WebClient
@@ -263,15 +274,23 @@ <h2 id="note">Note</h2>
263274
as well as parsing any responses received into a `SlackResponse`.
264275

265276
Attributes:
266-
token (str): A string specifying an xoxp or xoxb token.
277+
token (str): A string specifying an `xoxp-*` or `xoxb-*` token.
267278
base_url (str): A string representing the Slack API base URL.
268-
Default is &#39;https://www.slack.com/api/&#39;
279+
Default is `&#39;https://www.slack.com/api/&#39;`
269280
timeout (int): The maximum number of seconds the client will wait
270281
to connect and receive a response from Slack.
271282
Default is 30 seconds.
283+
ssl (SSLContext): An [`ssl.SSLContext`][1] instance, helpful for specifying
284+
your own custom certificate chain.
285+
proxy (str): String representing a fully-qualified URL to a proxy through
286+
which to route all requests to the Slack API. Even if this parameter
287+
is not specified, if any of the following environment variables are
288+
present, they will be loaded into this parameter: `HTTPS_PROXY`,
289+
`https_proxy`, `HTTP_PROXY` or `http_proxy`.
290+
headers (dict): Additional request headers to attach to all requests.
272291

273292
Methods:
274-
api_call: Constructs a request and executes the API call to Slack.
293+
`api_call`: Constructs a request and executes the API call to Slack.
275294

276295
Example of recommended usage:
277296
```python
@@ -304,6 +323,8 @@ <h2 id="note">Note</h2>
304323
Any attributes or methods prefixed with _underscores are
305324
intended to be &#34;private&#34; internal use only. They may be changed or
306325
removed at anytime.
326+
327+
[1]: https://docs.python.org/3/library/ssl.html#ssl.SSLContext
307328
&#34;&#34;&#34;
308329

309330
def admin_analytics_getFile(
@@ -1786,6 +1807,19 @@ <h2 id="note">Note</h2>
17861807
&#34;&#34;&#34;
17871808
return self.api_call(&#34;auth.test&#34;, params=kwargs)
17881809

1810+
def auth_teams_list(
1811+
self,
1812+
cursor: Optional[str] = None,
1813+
limit: Optional[int] = None,
1814+
include_icon: Optional[bool] = None,
1815+
**kwargs,
1816+
) -&gt; SlackResponse:
1817+
&#34;&#34;&#34;List the workspaces a token can access.
1818+
https://api.slack.com/methods/auth.teams.list
1819+
&#34;&#34;&#34;
1820+
kwargs.update({&#34;cursor&#34;: cursor, &#34;limit&#34;: limit, &#34;include_icon&#34;: include_icon})
1821+
return self.api_call(&#34;auth.teams.list&#34;, params=kwargs)
1822+
17891823
def bookmarks_add(
17901824
self,
17911825
*,
@@ -7058,6 +7092,30 @@ <h3>Methods</h3>
70587092
return self.api_call(&#34;auth.revoke&#34;, http_verb=&#34;GET&#34;, params=kwargs)</code></pre>
70597093
</details>
70607094
</dd>
7095+
<dt id="slack_sdk.WebClient.auth_teams_list"><code class="name flex">
7096+
<span>def <span class="ident">auth_teams_list</span></span>(<span>self, cursor: Optional[str] = None, limit: Optional[int] = None, include_icon: Optional[bool] = None, **kwargs) ‑> <a title="slack_sdk.web.slack_response.SlackResponse" href="web/slack_response.html#slack_sdk.web.slack_response.SlackResponse">SlackResponse</a></span>
7097+
</code></dt>
7098+
<dd>
7099+
<div class="desc"><p>List the workspaces a token can access.
7100+
<a href="https://api.slack.com/methods/auth.teams.list">https://api.slack.com/methods/auth.teams.list</a></p></div>
7101+
<details class="source">
7102+
<summary>
7103+
<span>Expand source code</span>
7104+
</summary>
7105+
<pre><code class="python">def auth_teams_list(
7106+
self,
7107+
cursor: Optional[str] = None,
7108+
limit: Optional[int] = None,
7109+
include_icon: Optional[bool] = None,
7110+
**kwargs,
7111+
) -&gt; SlackResponse:
7112+
&#34;&#34;&#34;List the workspaces a token can access.
7113+
https://api.slack.com/methods/auth.teams.list
7114+
&#34;&#34;&#34;
7115+
kwargs.update({&#34;cursor&#34;: cursor, &#34;limit&#34;: limit, &#34;include_icon&#34;: include_icon})
7116+
return self.api_call(&#34;auth.teams.list&#34;, params=kwargs)</code></pre>
7117+
</details>
7118+
</dd>
70617119
<dt id="slack_sdk.WebClient.auth_test"><code class="name flex">
70627120
<span>def <span class="ident">auth_test</span></span>(<span>self, **kwargs) ‑> <a title="slack_sdk.web.slack_response.SlackResponse" href="web/slack_response.html#slack_sdk.web.slack_response.SlackResponse">SlackResponse</a></span>
70637121
</code></dt>
@@ -11730,6 +11788,12 @@ <h3>Inherited members</h3>
1173011788
<li><code><b><a title="slack_sdk.web.base_client.BaseClient" href="web/base_client.html#slack_sdk.web.base_client.BaseClient">BaseClient</a></b></code>:
1173111789
<ul class="hlist">
1173211790
<li><code><a title="slack_sdk.web.base_client.BaseClient.api_call" href="web/base_client.html#slack_sdk.web.base_client.BaseClient.api_call">api_call</a></code></li>
11791+
<li><code><a title="slack_sdk.web.base_client.BaseClient.base_url" href="web/base_client.html#slack_sdk.web.base_client.BaseClient.base_url">base_url</a></code></li>
11792+
<li><code><a title="slack_sdk.web.base_client.BaseClient.headers" href="web/base_client.html#slack_sdk.web.base_client.BaseClient.headers">headers</a></code></li>
11793+
<li><code><a title="slack_sdk.web.base_client.BaseClient.proxy" href="web/base_client.html#slack_sdk.web.base_client.BaseClient.proxy">proxy</a></code></li>
11794+
<li><code><a title="slack_sdk.web.base_client.BaseClient.ssl" href="web/base_client.html#slack_sdk.web.base_client.BaseClient.ssl">ssl</a></code></li>
11795+
<li><code><a title="slack_sdk.web.base_client.BaseClient.timeout" href="web/base_client.html#slack_sdk.web.base_client.BaseClient.timeout">timeout</a></code></li>
11796+
<li><code><a title="slack_sdk.web.base_client.BaseClient.token" href="web/base_client.html#slack_sdk.web.base_client.BaseClient.token">token</a></code></li>
1173311797
<li><code><a title="slack_sdk.web.base_client.BaseClient.validate_slack_signature" href="web/base_client.html#slack_sdk.web.base_client.BaseClient.validate_slack_signature">validate_slack_signature</a></code></li>
1173411798
</ul>
1173511799
</li>
@@ -12319,6 +12383,7 @@ <h4><code><a title="slack_sdk.WebClient" href="#slack_sdk.WebClient">WebClient</
1231912383
<li><code><a title="slack_sdk.WebClient.apps_event_authorizations_list" href="#slack_sdk.WebClient.apps_event_authorizations_list">apps_event_authorizations_list</a></code></li>
1232012384
<li><code><a title="slack_sdk.WebClient.apps_uninstall" href="#slack_sdk.WebClient.apps_uninstall">apps_uninstall</a></code></li>
1232112385
<li><code><a title="slack_sdk.WebClient.auth_revoke" href="#slack_sdk.WebClient.auth_revoke">auth_revoke</a></code></li>
12386+
<li><code><a title="slack_sdk.WebClient.auth_teams_list" href="#slack_sdk.WebClient.auth_teams_list">auth_teams_list</a></code></li>
1232212387
<li><code><a title="slack_sdk.WebClient.auth_test" href="#slack_sdk.WebClient.auth_test">auth_test</a></code></li>
1232312388
<li><code><a title="slack_sdk.WebClient.bookmarks_add" href="#slack_sdk.WebClient.bookmarks_add">bookmarks_add</a></code></li>
1232412389
<li><code><a title="slack_sdk.WebClient.bookmarks_edit" href="#slack_sdk.WebClient.bookmarks_edit">bookmarks_edit</a></code></li>

docs/api-docs/slack_sdk/models/blocks/block_elements.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ <h1 class="title">Module <code>slack_sdk.models.blocks.block_elements</code></h1
15181518

15191519
class OverflowMenuElement(InteractiveElement):
15201520
type = &#34;overflow&#34;
1521-
options_min_length = 2
1521+
options_min_length = 1
15221522
options_max_length = 5
15231523

15241524
@property
@@ -1529,7 +1529,7 @@ <h1 class="title">Module <code>slack_sdk.models.blocks.block_elements</code></h1
15291529
self,
15301530
*,
15311531
action_id: Optional[str] = None,
1532-
options: Sequence[Union[Option]],
1532+
options: Sequence[Option],
15331533
confirm: Optional[Union[dict, ConfirmObject]] = None,
15341534
**others: dict,
15351535
):
@@ -1552,7 +1552,7 @@ <h1 class="title">Module <code>slack_sdk.models.blocks.block_elements</code></h1
15521552
Should be unique among all other action_ids in the containing block.
15531553
Maximum length for this field is 255 characters.
15541554
options (required): An array of option objects to display in the menu.
1555-
Maximum number of options is 5, minimum is 2.
1555+
Maximum number of options is 5, minimum is 1.
15561556
confirm: A confirm object that defines an optional confirmation dialog that appears
15571557
after a menu item is selected.
15581558
&#34;&#34;&#34;
@@ -3606,7 +3606,7 @@ <h2 id="args">Args</h2>
36063606
Maximum length for this field is 255 characters.</dd>
36073607
<dt><strong><code>options</code></strong> :&ensp;<code>required</code></dt>
36083608
<dd>An array of option objects to display in the menu.
3609-
Maximum number of options is 5, minimum is 2.</dd>
3609+
Maximum number of options is 5, minimum is 1.</dd>
36103610
<dt><strong><code>confirm</code></strong></dt>
36113611
<dd>A confirm object that defines an optional confirmation dialog that appears
36123612
after a menu item is selected.</dd>
@@ -3617,7 +3617,7 @@ <h2 id="args">Args</h2>
36173617
</summary>
36183618
<pre><code class="python">class OverflowMenuElement(InteractiveElement):
36193619
type = &#34;overflow&#34;
3620-
options_min_length = 2
3620+
options_min_length = 1
36213621
options_max_length = 5
36223622

36233623
@property
@@ -3628,7 +3628,7 @@ <h2 id="args">Args</h2>
36283628
self,
36293629
*,
36303630
action_id: Optional[str] = None,
3631-
options: Sequence[Union[Option]],
3631+
options: Sequence[Option],
36323632
confirm: Optional[Union[dict, ConfirmObject]] = None,
36333633
**others: dict,
36343634
):
@@ -3651,7 +3651,7 @@ <h2 id="args">Args</h2>
36513651
Should be unique among all other action_ids in the containing block.
36523652
Maximum length for this field is 255 characters.
36533653
options (required): An array of option objects to display in the menu.
3654-
Maximum number of options is 5, minimum is 2.
3654+
Maximum number of options is 5, minimum is 1.
36553655
confirm: A confirm object that defines an optional confirmation dialog that appears
36563656
after a menu item is selected.
36573657
&#34;&#34;&#34;

docs/api-docs/slack_sdk/models/blocks/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4200,7 +4200,7 @@ <h2 id="args">Args</h2>
42004200
Maximum length for this field is 255 characters.</dd>
42014201
<dt><strong><code>options</code></strong> :&ensp;<code>required</code></dt>
42024202
<dd>An array of option objects to display in the menu.
4203-
Maximum number of options is 5, minimum is 2.</dd>
4203+
Maximum number of options is 5, minimum is 1.</dd>
42044204
<dt><strong><code>confirm</code></strong></dt>
42054205
<dd>A confirm object that defines an optional confirmation dialog that appears
42064206
after a menu item is selected.</dd>
@@ -4211,7 +4211,7 @@ <h2 id="args">Args</h2>
42114211
</summary>
42124212
<pre><code class="python">class OverflowMenuElement(InteractiveElement):
42134213
type = &#34;overflow&#34;
4214-
options_min_length = 2
4214+
options_min_length = 1
42154215
options_max_length = 5
42164216

42174217
@property
@@ -4222,7 +4222,7 @@ <h2 id="args">Args</h2>
42224222
self,
42234223
*,
42244224
action_id: Optional[str] = None,
4225-
options: Sequence[Union[Option]],
4225+
options: Sequence[Option],
42264226
confirm: Optional[Union[dict, ConfirmObject]] = None,
42274227
**others: dict,
42284228
):
@@ -4245,7 +4245,7 @@ <h2 id="args">Args</h2>
42454245
Should be unique among all other action_ids in the containing block.
42464246
Maximum length for this field is 255 characters.
42474247
options (required): An array of option objects to display in the menu.
4248-
Maximum number of options is 5, minimum is 2.
4248+
Maximum number of options is 5, minimum is 1.
42494249
confirm: A confirm object that defines an optional confirmation dialog that appears
42504250
after a menu item is selected.
42514251
&#34;&#34;&#34;

docs/api-docs/slack_sdk/version.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h1 class="title">Module <code>slack_sdk.version</code></h1>
2828
<span>Expand source code</span>
2929
</summary>
3030
<pre><code class="python">&#34;&#34;&#34;Check the latest version at https://pypi.org/project/slack-sdk/&#34;&#34;&#34;
31-
__version__ = &#34;3.16.2&#34;</code></pre>
31+
__version__ = &#34;3.17.0&#34;</code></pre>
3232
</details>
3333
</section>
3434
<section>

0 commit comments

Comments
 (0)