diff --git a/docs/api-docs/slack_bolt/adapter/aiohttp/index.html b/docs/api-docs/slack_bolt/adapter/aiohttp/index.html index 693657840..54bee5e0f 100644 --- a/docs/api-docs/slack_bolt/adapter/aiohttp/index.html +++ b/docs/api-docs/slack_bolt/adapter/aiohttp/index.html @@ -2,18 +2,21 @@ - - + + slack_bolt.adapter.aiohttp API documentation - - - - - - + + + + + + - - + +
@@ -22,58 +25,6 @@

Module slack_bolt.adapter.aiohttp

-
- -Expand source code - -
import re
-
-from aiohttp import web
-
-from slack_bolt.request.async_request import AsyncBoltRequest
-from slack_bolt.response import BoltResponse
-
-
-async def to_bolt_request(request: web.Request) -> AsyncBoltRequest:
-    return AsyncBoltRequest(
-        body=await request.text(),
-        query=request.query_string,
-        headers=request.headers,
-    )
-
-
-async def to_aiohttp_response(bolt_resp: BoltResponse) -> web.Response:
-    content_type = bolt_resp.headers.pop(
-        "content-type",
-        ["application/json" if bolt_resp.body.startswith("{") else "text/plain"],
-    )[0]
-    content_type = re.sub(r";\s*charset=utf-8", "", content_type)
-    resp = web.Response(
-        status=bolt_resp.status,
-        body=bolt_resp.body,
-        headers=bolt_resp.first_headers_without_set_cookie(),
-        content_type=content_type,
-    )
-    for cookie in bolt_resp.cookies():
-        for name, c in cookie.items():
-            resp.set_cookie(
-                name=name,
-                value=c.value,
-                max_age=c.get("max-age"),
-                expires=c.get("expires"),
-                path=c.get("path"),
-                domain=c.get("domain"),
-                secure=True,
-                httponly=True,
-            )
-    return resp
-
-
-__all__ = [
-    "to_bolt_request",
-    "to_aiohttp_response",
-]
-
@@ -87,53 +38,12 @@

Functions

-
- -Expand source code - -
async def to_aiohttp_response(bolt_resp: BoltResponse) -> web.Response:
-    content_type = bolt_resp.headers.pop(
-        "content-type",
-        ["application/json" if bolt_resp.body.startswith("{") else "text/plain"],
-    )[0]
-    content_type = re.sub(r";\s*charset=utf-8", "", content_type)
-    resp = web.Response(
-        status=bolt_resp.status,
-        body=bolt_resp.body,
-        headers=bolt_resp.first_headers_without_set_cookie(),
-        content_type=content_type,
-    )
-    for cookie in bolt_resp.cookies():
-        for name, c in cookie.items():
-            resp.set_cookie(
-                name=name,
-                value=c.value,
-                max_age=c.get("max-age"),
-                expires=c.get("expires"),
-                path=c.get("path"),
-                domain=c.get("domain"),
-                secure=True,
-                httponly=True,
-            )
-    return resp
-
async def to_bolt_request(request: aiohttp.web_request.Request) ‑> AsyncBoltRequest
-
- -Expand source code - -
async def to_bolt_request(request: web.Request) -> AsyncBoltRequest:
-    return AsyncBoltRequest(
-        body=await request.text(),
-        query=request.query_string,
-        headers=request.headers,
-    )
-
@@ -141,7 +51,6 @@

Functions

- \ No newline at end of file + diff --git a/docs/api-docs/slack_bolt/adapter/asgi/aiohttp/index.html b/docs/api-docs/slack_bolt/adapter/asgi/aiohttp/index.html index 3bd13d292..6fa6de3a4 100644 --- a/docs/api-docs/slack_bolt/adapter/asgi/aiohttp/index.html +++ b/docs/api-docs/slack_bolt/adapter/asgi/aiohttp/index.html @@ -2,18 +2,21 @@ - - + + slack_bolt.adapter.asgi.aiohttp API documentation - - - - - - + + + + + + - - + +
@@ -22,64 +25,6 @@

Module slack_bolt.adapter.asgi.aiohttp

-
- -Expand source code - -
from slack_bolt.oauth.async_oauth_flow import AsyncOAuthFlow
-
-from slack_bolt.adapter.asgi.http_request import AsgiHttpRequest
-from slack_bolt.adapter.asgi.builtin import SlackRequestHandler
-
-from slack_bolt.async_app import AsyncApp
-
-from slack_bolt.async_app import AsyncBoltRequest
-from slack_bolt.response import BoltResponse
-
-
-class AsyncSlackRequestHandler(SlackRequestHandler):
-    app: AsyncApp
-
-    def __init__(self, app: AsyncApp, path: str = "/slack/events"):
-        """Setup Bolt as an ASGI web framework, this will make your application compatible with ASGI web servers.
-        This can be used for production deployment.
-
-        With the default settings, `http://localhost:3000/slack/events`
-        Run Bolt with [uvicron](https://www.uvicorn.org/)
-
-            # Python
-            app = AsyncApp()
-            api = SlackRequestHandler(app)
-
-            # bash
-            export SLACK_SIGNING_SECRET=***
-            export SLACK_BOT_TOKEN=xoxb-***
-            uvicorn app:api --port 3000 --log-level debug
-
-        Args:
-            app: Your bolt application
-            path: The path to handle request from Slack (Default: `/slack/events`)
-        """
-        self.path = path
-        self.app = app
-
-    async def dispatch(self, request: AsgiHttpRequest) -> BoltResponse:
-        return await self.app.async_dispatch(
-            AsyncBoltRequest(body=await request.get_raw_body(), query=request.query_string, headers=request.get_headers())
-        )
-
-    async def handle_installation(self, request: AsgiHttpRequest) -> BoltResponse:
-        oauth_flow: AsyncOAuthFlow = self.app.oauth_flow
-        return await oauth_flow.handle_installation(
-            AsyncBoltRequest(body=await request.get_raw_body(), query=request.query_string, headers=request.get_headers())
-        )
-
-    async def handle_callback(self, request: AsgiHttpRequest) -> BoltResponse:
-        oauth_flow: AsyncOAuthFlow = self.app.oauth_flow
-        return await oauth_flow.handle_callback(
-            AsyncBoltRequest(body=await request.get_raw_body(), query=request.query_string, headers=request.get_headers())
-        )
-
@@ -189,7 +134,6 @@

Inherited members

- \ No newline at end of file + diff --git a/docs/api-docs/slack_bolt/adapter/asgi/async_handler.html b/docs/api-docs/slack_bolt/adapter/asgi/async_handler.html index b93e472f9..f100b1161 100644 --- a/docs/api-docs/slack_bolt/adapter/asgi/async_handler.html +++ b/docs/api-docs/slack_bolt/adapter/asgi/async_handler.html @@ -2,18 +2,21 @@ - - + + slack_bolt.adapter.asgi.async_handler API documentation - - - - - - + + + + + + - - + +
@@ -22,14 +25,6 @@

Module slack_bolt.adapter.asgi.async_handler

-
- -Expand source code - -
from .aiohttp import AsyncSlackRequestHandler
-
-__all__ = ["AsyncSlackRequestHandler"]
-
@@ -139,7 +134,6 @@

Inherited members