Skip to content

Commit

Permalink
Update API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Apr 29, 2022
1 parent a2189c3 commit 3e1d1ca
Show file tree
Hide file tree
Showing 41 changed files with 130 additions and 95 deletions.
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/adapter/aws_lambda/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.aws_lambda</code></h1>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from .handler import SlackRequestHandler</code></pre>
<pre><code class="python">from .handler import SlackRequestHandler # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/adapter/bottle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.bottle</code></h1>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from .handler import SlackRequestHandler</code></pre>
<pre><code class="python">from .handler import SlackRequestHandler # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/adapter/cherrypy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.cherrypy</code></h1>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from .handler import SlackRequestHandler</code></pre>
<pre><code class="python">from .handler import SlackRequestHandler # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
8 changes: 4 additions & 4 deletions docs/api-docs/slack_bolt/adapter/django/handler.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ <h1 class="title">Module <code>slack_bolt.adapter.django.handler</code></h1>
# it&#39;s okay to skip calling the same connection clean-up method at the listener completion.
message = &#34;&#34;&#34;As you&#39;ve already set app.listener_runner.listener_start_handler to your own one,
Bolt skipped to set it to slack_sdk.adapter.django.DjangoListenerStartHandler.
If you go with your own handler here, we highly recommend having the following lines of code

If you go with your own handler here, we highly recommend having the following lines of code
in your handle() method to clean up unmanaged stale/old database connections:

from django.db import close_old_connections
Expand Down Expand Up @@ -461,8 +461,8 @@ <h3>Inherited members</h3>
# it&#39;s okay to skip calling the same connection clean-up method at the listener completion.
message = &#34;&#34;&#34;As you&#39;ve already set app.listener_runner.listener_start_handler to your own one,
Bolt skipped to set it to slack_sdk.adapter.django.DjangoListenerStartHandler.
If you go with your own handler here, we highly recommend having the following lines of code

If you go with your own handler here, we highly recommend having the following lines of code
in your handle() method to clean up unmanaged stale/old database connections:

from django.db import close_old_connections
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/adapter/django/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.django</code></h1>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from .handler import SlackRequestHandler</code></pre>
<pre><code class="python">from .handler import SlackRequestHandler # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/adapter/falcon/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.falcon</code></h1>
<span>Expand source code</span>
</summary>
<pre><code class="python"># Don&#39;t add async module imports here
from .resource import SlackAppResource</code></pre>
from .resource import SlackAppResource # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/adapter/flask/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.flask</code></h1>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from .handler import SlackRequestHandler</code></pre>
<pre><code class="python">from .handler import SlackRequestHandler # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/adapter/pyramid/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.pyramid</code></h1>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from .handler import SlackRequestHandler</code></pre>
<pre><code class="python">from .handler import SlackRequestHandler # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/adapter/sanic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.sanic</code></h1>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from .async_handler import AsyncSlackRequestHandler</code></pre>
<pre><code class="python">from .async_handler import AsyncSlackRequestHandler # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
4 changes: 2 additions & 2 deletions docs/api-docs/slack_bolt/adapter/socket_mode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ <h1 class="title">Module <code>slack_bolt.adapter.socket_mode</code></h1>
* `slack_bolt.adapter.socket_mode.websocket_client`
* `slack_bolt.adapter.socket_mode.aiohttp`
* `slack_bolt.adapter.socket_mode.websockets`
&#34;&#34;&#34;
&#34;&#34;&#34; # noqa: E501

# Don&#39;t add async module imports here
from .builtin import SocketModeHandler # noqa</code></pre>
from .builtin import SocketModeHandler # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/adapter/starlette/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.starlette</code></h1>
<span>Expand source code</span>
</summary>
<pre><code class="python"># Don&#39;t add async module imports here
from .handler import SlackRequestHandler</code></pre>
from .handler import SlackRequestHandler # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/adapter/tornado/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 class="title">Module <code>slack_bolt.adapter.tornado</code></h1>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from .handler import SlackEventsHandler, SlackOAuthHandler</code></pre>
<pre><code class="python">from .handler import SlackEventsHandler, SlackOAuthHandler # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
34 changes: 26 additions & 8 deletions docs/api-docs/slack_bolt/app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -1481,13 +1481,19 @@ <h1 class="title">Module <code>slack_bolt.app.app</code></h1>
request_path, _, query = self.path.partition(&#34;?&#34;)
if request_path == _bolt_oauth_flow.install_path:
bolt_req = BoltRequest(
body=&#34;&#34;, query=query, headers=self.headers
body=&#34;&#34;,
query=query,
# email.message.Message&#39;s mapping interface is dict compatible
headers=self.headers, # type:ignore
)
bolt_resp = _bolt_oauth_flow.handle_installation(bolt_req)
self._send_bolt_response(bolt_resp)
elif request_path == _bolt_oauth_flow.redirect_uri_path:
bolt_req = BoltRequest(
body=&#34;&#34;, query=query, headers=self.headers
body=&#34;&#34;,
query=query,
# email.message.Message&#39;s mapping interface is dict compatible
headers=self.headers, # type:ignore
)
bolt_resp = _bolt_oauth_flow.handle_callback(bolt_req)
self._send_bolt_response(bolt_resp)
Expand All @@ -1505,7 +1511,10 @@ <h1 class="title">Module <code>slack_bolt.app.app</code></h1>
len_header = self.headers.get(&#34;Content-Length&#34;) or 0
request_body = self.rfile.read(int(len_header)).decode(&#34;utf-8&#34;)
bolt_req = BoltRequest(
body=request_body, query=query, headers=self.headers
body=request_body,
query=query,
# email.message.Message&#39;s mapping interface is dict compatible
headers=self.headers, # type:ignore
)
bolt_resp: BoltResponse = _bolt_app.dispatch(bolt_req)
self._send_bolt_response(bolt_resp)
Expand All @@ -1531,7 +1540,7 @@ <h1 class="title">Module <code>slack_bolt.app.app</code></h1>
for k, vs in headers.items():
for v in vs:
self.send_header(k, v)
self.send_header(&#34;Content-Length&#34;, len(body_bytes))
self.send_header(&#34;Content-Length&#34;, str(len(body_bytes)))
self.end_headers()
self.wfile.write(body_bytes)

Expand Down Expand Up @@ -4516,13 +4525,19 @@ <h2 id="args">Args</h2>
request_path, _, query = self.path.partition(&#34;?&#34;)
if request_path == _bolt_oauth_flow.install_path:
bolt_req = BoltRequest(
body=&#34;&#34;, query=query, headers=self.headers
body=&#34;&#34;,
query=query,
# email.message.Message&#39;s mapping interface is dict compatible
headers=self.headers, # type:ignore
)
bolt_resp = _bolt_oauth_flow.handle_installation(bolt_req)
self._send_bolt_response(bolt_resp)
elif request_path == _bolt_oauth_flow.redirect_uri_path:
bolt_req = BoltRequest(
body=&#34;&#34;, query=query, headers=self.headers
body=&#34;&#34;,
query=query,
# email.message.Message&#39;s mapping interface is dict compatible
headers=self.headers, # type:ignore
)
bolt_resp = _bolt_oauth_flow.handle_callback(bolt_req)
self._send_bolt_response(bolt_resp)
Expand All @@ -4540,7 +4555,10 @@ <h2 id="args">Args</h2>
len_header = self.headers.get(&#34;Content-Length&#34;) or 0
request_body = self.rfile.read(int(len_header)).decode(&#34;utf-8&#34;)
bolt_req = BoltRequest(
body=request_body, query=query, headers=self.headers
body=request_body,
query=query,
# email.message.Message&#39;s mapping interface is dict compatible
headers=self.headers, # type:ignore
)
bolt_resp: BoltResponse = _bolt_app.dispatch(bolt_req)
self._send_bolt_response(bolt_resp)
Expand All @@ -4566,7 +4584,7 @@ <h2 id="args">Args</h2>
for k, vs in headers.items():
for v in vs:
self.send_header(k, v)
self.send_header(&#34;Content-Length&#34;, len(body_bytes))
self.send_header(&#34;Content-Length&#34;, str(len(body_bytes)))
self.end_headers()
self.wfile.write(body_bytes)

Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1 class="title">Module <code>slack_bolt.app</code></h1>
&#34;&#34;&#34;

# Don&#39;t add async module imports here
from .app import App # type: ignore</code></pre>
from .app import App # noqa: F401 type: ignore</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/async_app.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h3 id="creating-an-async-app">Creating an async app</h3>
Apps can be run the same way as the synchronous example above. If you&#39;d prefer another async Web framework (e.g., Sanic, FastAPI, Starlette), take a look at [the built-in adapters](https://github.com/slackapi/bolt-python/tree/main/slack_bolt/adapter) and their corresponding [examples](https://github.com/slackapi/bolt-python/tree/main/examples).

Refer to `slack_bolt.app.async_app` for more details.
&#34;&#34;&#34;
&#34;&#34;&#34; # noqa: E501
from .app.async_app import AsyncApp # noqa
from .context.ack.async_ack import AsyncAck # noqa
from .context.async_context import AsyncBoltContext # noqa
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/authorization/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h1 class="title">Module <code>slack_bolt.authorization</code></h1>

Refer to https://slack.dev/bolt-python/concepts#authorization for details.
&#34;&#34;&#34;
from .authorize_result import AuthorizeResult</code></pre>
from .authorize_result import AuthorizeResult # noqa</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/context/ack/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1 class="title">Module <code>slack_bolt.context.ack</code></h1>
<span>Expand source code</span>
</summary>
<pre><code class="python"># Don&#39;t add async module imports here
from .ack import Ack</code></pre>
from .ack import Ack # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/context/ack/internals.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h1 class="title">Module <code>slack_bolt.context.ack.internals</code></h1>
)
else:
raise ValueError(
f&#34;errors field is required for response_action: errors&#34;
&#34;errors field is required for response_action: errors&#34;
)
else:
body = {&#34;response_action&#34;: response_action}
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/context/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h1 class="title">Module <code>slack_bolt.context</code></h1>
&#34;&#34;&#34;

# Don&#39;t add async module imports here
from .context import BoltContext</code></pre>
from .context import BoltContext # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/context/respond/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond</code></h1>
<span>Expand source code</span>
</summary>
<pre><code class="python"># Don&#39;t add async module imports here
from .respond import Respond</code></pre>
from .respond import Respond # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/context/say/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1 class="title">Module <code>slack_bolt.context.say</code></h1>
<span>Expand source code</span>
</summary>
<pre><code class="python"># Don&#39;t add async module imports here
from .say import Say</code></pre>
from .say import Say # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
8 changes: 4 additions & 4 deletions docs/api-docs/slack_bolt/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<title>slack_bolt API documentation</title>
<meta name="description" content="A Python framework to build Slack apps in a flash with the latest platform features. Read the [getting started …" />
<meta name="description" content="A Python framework to build Slack apps in a flash with the latest platform features.Read the [getting started …" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/typography.min.css" integrity="sha256-7l/o7C8jubJiy74VsKTidCy1yBkRtiUGbVkYBylBqUg=" crossorigin>
<link rel="stylesheet preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/github.min.css" crossorigin>
Expand All @@ -22,7 +22,7 @@
<h1 class="title">Package <code>slack_bolt</code></h1>
</header>
<section id="section-intro">
<p>A Python framework to build Slack apps in a flash with the latest platform features. Read the <a href="https://slack.dev/bolt-python/tutorial/getting-started">getting started guide</a> and look at our <a href="https://github.com/slackapi/bolt-python/tree/main/examples">code examples</a> to learn how to build apps using Bolt.</p>
<p>A Python framework to build Slack apps in a flash with the latest platform features.Read the <a href="https://slack.dev/bolt-python/tutorial/getting-started">getting started guide</a> and look at our <a href="https://github.com/slackapi/bolt-python/tree/main/examples">code examples</a> to learn how to build apps using Bolt.</p>
<ul>
<li>Website: <a href="https://slack.dev/bolt-python/">https://slack.dev/bolt-python/</a></li>
<li>GitHub repository: <a href="https://github.com/slackapi/bolt-python">https://github.com/slackapi/bolt-python</a></li>
Expand All @@ -33,12 +33,12 @@ <h1 class="title">Package <code>slack_bolt</code></h1>
<span>Expand source code</span>
</summary>
<pre><code class="python">&#34;&#34;&#34;
A Python framework to build Slack apps in a flash with the latest platform features. Read the [getting started guide](https://slack.dev/bolt-python/tutorial/getting-started) and look at our [code examples](https://github.com/slackapi/bolt-python/tree/main/examples) to learn how to build apps using Bolt.
A Python framework to build Slack apps in a flash with the latest platform features.Read the [getting started guide](https://slack.dev/bolt-python/tutorial/getting-started) and look at our [code examples](https://github.com/slackapi/bolt-python/tree/main/examples) to learn how to build apps using Bolt.

* Website: https://slack.dev/bolt-python/
* GitHub repository: https://github.com/slackapi/bolt-python
* The class representing a Bolt app: `slack_bolt.app.app`
&#34;&#34;&#34;
&#34;&#34;&#34; # noqa: E501
# Don&#39;t add async module imports here
from .app import App # noqa
from .context import BoltContext # noqa
Expand Down
4 changes: 2 additions & 2 deletions docs/api-docs/slack_bolt/kwargs_injection/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ <h1 class="title">Module <code>slack_bolt.kwargs_injection</code></h1>
&#34;&#34;&#34;

# Don&#39;t add async module imports here
from .args import Args
from .utils import build_required_kwargs</code></pre>
from .args import Args # noqa: F401
from .utils import build_required_kwargs # noqa: F401</code></pre>
</details>
</section>
<section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/kwargs_injection/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h1 class="title">Module <code>slack_bolt.kwargs_injection.utils</code></h1>
<pre><code class="python"># pytype: skip-file
import inspect
import logging
from typing import Callable, Dict, Optional, Any, Sequence, List
from typing import Callable, Dict, Optional, Any, Sequence

from slack_bolt.request import BoltRequest
from slack_bolt.response import BoltResponse
Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/slack_bolt/lazy_listener/async_runner.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 class="title">Module <code>slack_bolt.lazy_listener.async_runner</code></h1>
</summary>
<pre><code class="python">from abc import abstractmethod, ABCMeta
from logging import Logger
from typing import Callable, Awaitable, Any, Coroutine
from typing import Callable, Awaitable

from slack_bolt.lazy_listener.async_internals import to_runnable_function
from slack_bolt.request.async_request import AsyncBoltRequest
Expand Down
4 changes: 1 addition & 3 deletions docs/api-docs/slack_bolt/listener/builtins.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ <h1 class="title">Module <code>slack_bolt.listener.builtins</code></h1>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from slack_sdk.oauth import InstallationStore

from slack_bolt.context.context import BoltContext
<pre><code class="python">from slack_bolt.context.context import BoltContext
from slack_sdk.oauth.installation_store.installation_store import InstallationStore


Expand Down
3 changes: 1 addition & 2 deletions docs/api-docs/slack_bolt/listener_matcher/builtins.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ <h1 class="title">Module <code>slack_bolt.listener_matcher.builtins</code></h1>
from re import _pattern_type as Pattern
else:
from re import Pattern
from typing import Callable, Awaitable, Any, Sequence, Optional, Union
from typing import Union, Optional, Dict
from typing import Callable, Awaitable, Any, Sequence, Optional, Union, Dict

from slack_bolt.kwargs_injection import build_required_kwargs
from slack_bolt.request import BoltRequest
Expand Down
10 changes: 8 additions & 2 deletions docs/api-docs/slack_bolt/logger/messages.html
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,10 @@ <h1 class="title">Module <code>slack_bolt.logger.messages</code></h1>
listener_name: str, status: int, body: str, starting_time: float
) -&gt; str:
millis = int((time.time() - starting_time) * 1000)
return f&#34;Responding with listener middleware&#39;s response - listener: {listener_name}, status: {status}, body: {body} ({millis} millis)&#34;</code></pre>
return (
&#34;Responding with listener middleware&#39;s response - &#34;
f&#34;listener: {listener_name}, status: {status}, body: {body} ({millis} millis)&#34;
)</code></pre>
</details>
</section>
<section>
Expand Down Expand Up @@ -438,7 +441,10 @@ <h2 class="section-title" id="header-functions">Functions</h2>
listener_name: str, status: int, body: str, starting_time: float
) -&gt; str:
millis = int((time.time() - starting_time) * 1000)
return f&#34;Responding with listener middleware&#39;s response - listener: {listener_name}, status: {status}, body: {body} ({millis} millis)&#34;</code></pre>
return (
&#34;Responding with listener middleware&#39;s response - &#34;
f&#34;listener: {listener_name}, status: {status}, body: {body} ({millis} millis)&#34;
)</code></pre>
</details>
</dd>
<dt id="slack_bolt.logger.messages.debug_running_lazy_listener"><code class="name flex">
Expand Down
Loading

0 comments on commit 3e1d1ca

Please sign in to comment.