Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,9 @@ jobs:
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ env.LATEST_SUPPORTED_PY }}
# Regenerating also runs the MDX/acorn hazard gate inside the generator,
# so a stale tree or an unfenced code example both fail here.
- name: Regenerate the API reference
- name: Generate API reference
run: ./scripts/generate_api_docs.sh
- name: Fail if the committed reference is out of date
- name: Verify committed reference is up to date
run: git diff --exit-code -- docs/english/reference

unittest:
Expand Down
39 changes: 12 additions & 27 deletions docs/english/_sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@
"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 @@ -103,14 +100,9 @@
{
"type": "category",
"label": "Legacy",
"items": [
"tools/bolt-python/legacy/steps-from-apps"
]
},
{
"type": "html",
"value": "<hr>"
"items": ["tools/bolt-python/legacy/steps-from-apps"]
},
{ "type": "html", "value": "<hr>" },
{
"type": "category",
"label": "Tutorials",
Expand All @@ -124,24 +116,19 @@
"tools/bolt-python/tutorial/modals/modals"
]
},
{
"type": "html",
"value": "<hr>"
},
{ "type": "html", "value": "<hr>" },
{
"type": "category",
"label": "Reference",
"link": {
"type": "doc",
"id": "tools/bolt-python/reference/index"
},
"items": [
{
"type": "autogenerated",
"dirName": "tools/bolt-python/reference"
}
{ "type": "autogenerated", "dirName": "tools/bolt-python/reference" }
]
},
{
"type": "html",
"value": "<hr>"
},
{ "type": "html", "value": "<hr>" },
{
"type": "category",
"label": "日本語 (日本)",
Expand Down Expand Up @@ -218,9 +205,7 @@
{
"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
10 changes: 0 additions & 10 deletions docs/english/reference/adapter/aiohttp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,4 @@ 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
```
41 changes: 8 additions & 33 deletions docs/english/reference/adapter/asgi/aiohttp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@ sidebar_label: aiohttp
title: slack_bolt.adapter.asgi.aiohttp
---

## AsyncSlackRequestHandler Objects
## `AsyncSlackRequestHandler`

```python
class AsyncSlackRequestHandler(SlackRequestHandler)
AsyncSlackRequestHandler(app, path='/slack/events')
```

#### app: `AsyncApp`

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

```python
def __init__(app: AsyncApp, path: str = '/slack/events')
```
Bases: SlackRequestHandler

Setup Bolt as an ASGI web framework, this will make your application compatible with ASGI web servers.

Expand All @@ -25,36 +19,17 @@ 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
```bash
export SLACK_SIGNING_SECRET=***
export SLACK_BOT_TOKEN=xoxb-***
uvicorn app:api --port 3000 --log-level debug
```

**Parameters:**

**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
```
- **app** (AsyncApp) – Your bolt application
- **path** (str) – The path to handle request from Slack (Default: `/slack/events`)
41 changes: 8 additions & 33 deletions docs/english/reference/adapter/asgi/async_handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@ sidebar_label: async_handler
title: slack_bolt.adapter.asgi.async_handler
---

## AsyncSlackRequestHandler Objects
## `AsyncSlackRequestHandler`

```python
class AsyncSlackRequestHandler(SlackRequestHandler)
AsyncSlackRequestHandler(app, path='/slack/events')
```

#### app: `AsyncApp`

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

```python
def __init__(app: AsyncApp, path: str = '/slack/events')
```
Bases: SlackRequestHandler

Setup Bolt as an ASGI web framework, this will make your application compatible with ASGI web servers.

Expand All @@ -25,36 +19,17 @@ 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
```bash
export SLACK_SIGNING_SECRET=***
export SLACK_BOT_TOKEN=xoxb-***
uvicorn app:api --port 3000 --log-level debug
```

**Parameters:**

**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
```
- **app** (AsyncApp) – Your bolt application
- **path** (str) – The path to handle request from Slack (Default: `/slack/events`)
26 changes: 9 additions & 17 deletions docs/english/reference/adapter/asgi/base_handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,28 @@ sidebar_label: base_handler
title: slack_bolt.adapter.asgi.base_handler
---

## BaseSlackRequestHandler Objects
## `BaseSlackRequestHandler`

```python
class BaseSlackRequestHandler()
```

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

#### path: `str`

#### dispatch
### `dispatch`

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

Dispatches a request to the Bolt App.

#### handle\_installation
### `handle_callback`

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

Handles installation of the OAuthFlow.
Handles the callback of the OAuthFlow.

#### handle\_callback
### `handle_installation`

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

Handles the callback of the OAuthFlow.
Handles installation of the OAuthFlow.
39 changes: 8 additions & 31 deletions docs/english/reference/adapter/asgi/builtin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ sidebar_label: builtin
title: slack_bolt.adapter.asgi.builtin
---

## SlackRequestHandler Objects
## `SlackRequestHandler`

```python
class SlackRequestHandler(BaseSlackRequestHandler)
SlackRequestHandler(app, path='/slack/events')
```

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

```python
def __init__(app: App, path: str = '/slack/events')
```
Bases: BaseSlackRequestHandler

Setup Bolt as an ASGI web framework, this will make your application compatible with ASGI web servers.

Expand All @@ -23,36 +19,17 @@ 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
```bash
export SLACK_SIGNING_SECRET=***
export SLACK_BOT_TOKEN=xoxb-***
uvicorn app:api --port 3000 --log-level debug
```

**Parameters:**

**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
```
- **app** (App) – Your bolt application
- **path** (str) – The path to handle request from Slack (Default: `/slack/events`)
24 changes: 0 additions & 24 deletions docs/english/reference/adapter/asgi/http_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,4 @@ 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
```
Loading