Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 21 additions & 10 deletions docs/english/_sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@
"className": "sidebar-title"
},
"tools/bolt-python/getting-started",
{ "type": "html", "value": "<hr>" },
{
"type": "html",
"value": "<hr>"
},
"tools/bolt-python/creating-an-app",
{
"type": "category",
"label": "AI & Agents",
"link": {
"type": "doc",
"id": "tools/bolt-python/concepts/adding-agent-features"
},
},
"items": [
"tools/bolt-python/concepts/adding-agent-features",
"tools/bolt-python/concepts/using-the-assistant-class"
Expand Down Expand Up @@ -100,9 +103,14 @@
{
"type": "category",
"label": "Legacy",
"items": ["tools/bolt-python/legacy/steps-from-apps"]
"items": [
"tools/bolt-python/legacy/steps-from-apps"
]
},
{
"type": "html",
"value": "<hr>"
},
{ "type": "html", "value": "<hr>" },
{
"type": "category",
"label": "Tutorials",
Expand All @@ -116,13 +124,14 @@
"tools/bolt-python/tutorial/modals/modals"
]
},
{ "type": "html", "value": "<hr>" },
{
"type": "link",
"label": "Reference",
"href": "https://docs.slack.dev/tools/bolt-python/reference/index.html"
"type": "html",
"value": "<hr>"
},
{
"type": "html",
"value": "<hr>"
},
{ "type": "html", "value": "<hr>" },
{
"type": "category",
"label": "日本語 (日本)",
Expand Down Expand Up @@ -199,7 +208,9 @@
{
"type": "category",
"label": "レガシー(非推奨)",
"items": ["tools/bolt-python/ja-jp/legacy/steps-from-apps"]
"items": [
"tools/bolt-python/ja-jp/legacy/steps-from-apps"
]
}
]
}
Expand Down
16 changes: 16 additions & 0 deletions docs/english/reference/adapter/aiohttp/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
sidebar_label: aiohttp
title: slack_bolt.adapter.aiohttp
---

#### to\_bolt\_request

```python
async def to_bolt_request(request: web.Request) -> AsyncBoltRequest
```

#### to\_aiohttp\_response

```python
async def to_aiohttp_response(bolt_resp: BoltResponse) -> web.Response
```
58 changes: 58 additions & 0 deletions docs/english/reference/adapter/asgi/aiohttp/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
sidebar_label: aiohttp
title: slack_bolt.adapter.asgi.aiohttp
---

## AsyncSlackRequestHandler Objects

```python
class AsyncSlackRequestHandler(SlackRequestHandler)
```

#### app: `AsyncApp`

#### \_\_init\_\_

```python
def __init__(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
# Python
app = AsyncApp()
api = SlackRequestHandler(app)

# bash
export SLACK_SIGNING_SECRET=***
export SLACK_BOT_TOKEN=xoxb-***
uvicorn app:api --port 3000 --log-level debug
```

**Arguments**:

- `app` _AsyncApp_ - Your bolt application
- `path` _str_ - The path to handle request from Slack (Default: `/slack/events`)

#### dispatch

```python
async def dispatch(request: AsgiHttpRequest) -> BoltResponse
```

#### handle\_installation

```python
async def handle_installation(request: AsgiHttpRequest) -> BoltResponse
```

#### handle\_callback

```python
async def handle_callback(request: AsgiHttpRequest) -> BoltResponse
```
58 changes: 58 additions & 0 deletions docs/english/reference/adapter/asgi/async_handler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
sidebar_label: async_handler
title: slack_bolt.adapter.asgi.async_handler
---

## AsyncSlackRequestHandler Objects

```python
class AsyncSlackRequestHandler(SlackRequestHandler)
```

#### app: `AsyncApp`

#### \_\_init\_\_

```python
def __init__(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
# Python
app = AsyncApp()
api = SlackRequestHandler(app)

# bash
export SLACK_SIGNING_SECRET=***
export SLACK_BOT_TOKEN=xoxb-***
uvicorn app:api --port 3000 --log-level debug
```

**Arguments**:

- `app` _AsyncApp_ - Your bolt application
- `path` _str_ - The path to handle request from Slack (Default: `/slack/events`)

#### dispatch

```python
async def dispatch(request: AsgiHttpRequest) -> BoltResponse
```

#### handle\_installation

```python
async def handle_installation(request: AsgiHttpRequest) -> BoltResponse
```

#### handle\_callback

```python
async def handle_callback(request: AsgiHttpRequest) -> BoltResponse
```
38 changes: 38 additions & 0 deletions docs/english/reference/adapter/asgi/base_handler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
sidebar_label: base_handler
title: slack_bolt.adapter.asgi.base_handler
---

## BaseSlackRequestHandler Objects

```python
class BaseSlackRequestHandler()
```

#### app: `Union[App, AsyncApp]`

#### path: `str`

#### dispatch

```python
async def dispatch(request: AsgiHttpRequest) -> BoltResponse
```

Dispatches a request to the Bolt App

#### handle\_installation

```python
async def handle_installation(request: AsgiHttpRequest) -> BoltResponse
```

Handles installation of the OAuthFlow

#### handle\_callback

```python
async def handle_callback(request: AsgiHttpRequest) -> BoltResponse
```

Handles the callback of the OAuthFlow
56 changes: 56 additions & 0 deletions docs/english/reference/adapter/asgi/builtin/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
sidebar_label: builtin
title: slack_bolt.adapter.asgi.builtin
---

## SlackRequestHandler Objects

```python
class SlackRequestHandler(BaseSlackRequestHandler)
```

#### \_\_init\_\_

```python
def __init__(app: App, 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
# Python
app = App()
api = SlackRequestHandler(app)

# bash
export SLACK_SIGNING_SECRET=***
export SLACK_BOT_TOKEN=xoxb-***
uvicorn app:api --port 3000 --log-level debug
```

**Arguments**:

- `app` _App_ - Your bolt application
- `path` _str_ - The path to handle request from Slack (Default: `/slack/events`)

#### dispatch

```python
async def dispatch(request: AsgiHttpRequest) -> BoltResponse
```

#### handle\_installation

```python
async def handle_installation(request: AsgiHttpRequest) -> BoltResponse
```

#### handle\_callback

```python
async def handle_callback(request: AsgiHttpRequest) -> BoltResponse
```
30 changes: 30 additions & 0 deletions docs/english/reference/adapter/asgi/http_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
sidebar_label: http_request
title: slack_bolt.adapter.asgi.http_request
---

## AsgiHttpRequest Objects

```python
class AsgiHttpRequest()
```

#### \_\_init\_\_

```python
def __init__(scope: scope_type, receive: Callable)
```

#### raw\_headers: `Iterable[Tuple[bytes, bytes]]`

#### get\_headers

```python
def get_headers() -> Dict[str, Union[str, Sequence[str]]]
```

#### get\_raw\_body

```python
async def get_raw_body() -> str
```
34 changes: 34 additions & 0 deletions docs/english/reference/adapter/asgi/http_response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
sidebar_label: http_response
title: slack_bolt.adapter.asgi.http_response
---

## AsgiHttpResponse Objects

```python
class AsgiHttpResponse()
```

#### \_\_init\_\_

```python
def __init__(status: int, headers: Dict[str, Sequence[str]] = {}, body: str = '')
```

#### status: `int`

#### body: `bytes`

#### raw\_headers: `List[Tuple[bytes, bytes]]`

#### get\_response\_start

```python
def get_response_start() -> Dict[str, Union[str, int, Iterable[Tuple[bytes, bytes]]]]
```

#### get\_response\_body

```python
def get_response_body() -> Dict[str, Union[str, bytes, bool]]
```
Loading