Skip to content

Commit df42514

Browse files
docs - only finished reorg ideas
1 parent a242057 commit df42514

File tree

7 files changed

+519
-374
lines changed

7 files changed

+519
-374
lines changed

docs/content/concepts/steps-from-apps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Steps from apps
33
lang: en
4-
slug: /concepts/steps-from-apps
4+
slug: /legacy/steps-from-apps
55
---
66

77
:::danger

docs/content/getting-started.md

Lines changed: 49 additions & 260 deletions
Large diffs are not rendered by default.

docs/content/tutorial/getting-started-http.md

Lines changed: 322 additions & 0 deletions
Large diffs are not rendered by default.

docs/docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const config = {
4949
redirects: [
5050
{
5151
to: "/getting-started",
52-
from: ["/tutorial/getting-started", "/tutorial/getting-started-http"],
52+
from: ["/tutorial/getting-started"],
5353
},
5454
{
5555
to: "/",

docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/getting-started.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ slug: getting-started
44
lang: ja-jp
55
---
66

7+
# Bolt 入門ガイド
8+
79
このガイドでは、Bolt for Python を使った Slack アプリの設定と起動の方法について説明します。ここで説明する手順では、まず新しい Slack アプリを作成し、ローカルの開発環境をセットアップし、Slack ワークスペースからのメッセージをリッスンして応答するアプリを開発するという流れになります。
810

11+
912
この手順を全て終わらせたら、あなたはきっと ⚡️[Slack アプリのはじめ方](https://github.com/slackapi/bolt-python/tree/main/examples/getting_started)のサンプルアプリを動作させたり、それに変更を加えたり、自分のアプリを作ったりすることができるようになるでしょう。
1013

1114
:::tip
1215

13-
REMOVE
1416
このガイドでは[ソケットモード](https://api.slack.com/apis/connections/socket) を利用します。ソケットモードは、Slack アプリ開発をとりあえず始めてみるときやあなたのチームだけのためのアプリをつくるときにおすすめのやり方です。もしすでに HTTP をアプリのコミュニケーションプロトコルとするとわかっている場合は、HTTP の方式に対応した同様のドキュメントである [Bolt 入門ガイド(HTTP)](/tutorial/getting-started-http) を参照してください。
1517

1618
:::
@@ -22,7 +24,7 @@ REMOVE
2224

2325
:::tip
2426

25-
通常の業務の妨げにならないよう、別の開発用のワークスペースを使用することをおすすめします。[新しいワークスペースは無料で作成できます](https://api.slack.com/developer-program)
27+
通常の業務の妨げにならないよう、別の開発用のワークスペースを使用することをおすすめします。[新しいワークスペースは無料で作成できます](https://slack.com/get-started#create)
2628

2729
:::。
2830

@@ -106,6 +108,7 @@ export SLACK_APP_TOKEN=<アプリレベルトークン>
106108

107109
> 🔒 全てのトークンは安全に保管してください。少なくともパブリックなバージョン管理にチェックインするようなことは避けるべきでしょう。また、上にあった例のように環境変数を介してアクセスするようにしてください。詳細な情報は [アプリのセキュリティのベストプラクティス](https://api.slack.com/authentication/best-practices)のドキュメントを参照してください。
108110
111+
109112
完了したら、いよいよアプリを作っていきましょう。以下のコマンドを使って、仮想環境に Python の `slack_bolt` パッケージをインストールします。
110113

111114
```shell

docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorial/getting-started-http.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,41 @@ title: Bolt 入門ガイド(HTTP)
33
slug: getting-started-http
44
lang: ja-jp
55
---
6+
7+
# Bolt 入門ガイド(HTTP)
8+
9+
このガイドでは、**HTTP上で Bolt for Python** を使った Slack アプリの設定と起動する方法について説明します。ここで説明する手順は、新しい Slack アプリを作成し、ローカルの開発環境をセットアップし、Slack ワークスペースからのメッセージをリッスンして応答するアプリを開発するという流れになります。
10+
11+
この手順を全て終わらせたら、あなたはきっと ⚡️[Slack アプリのはじめ方](https://github.com/slackapi/bolt-python/tree/main/examples/getting_started)のサンプルアプリを動作させたり、それに変更を加えたり、自分のアプリを作ったりすることができるようになるでしょう。
12+
613
---
714

15+
### アプリを作成する {#create-an-app}
16+
最初にやるべきこと : Bolt での開発を始める前に、[Slack アプリを作成](https://api.slack.com/apps/new)します。
17+
18+
:::tip
19+
20+
いつもの仕事のさまたげにならないように、別の開発用のワークスペースを使用することをおすすめします。[新しいワークスペースは無料で作成できます](https://slack.com/get-started#create)
21+
22+
:::
23+
24+
アプリ名を入力し(_後で変更可能_)、インストール先のワークスペースを選択したら、「`Create App`」ボタンをクリックすると、アプリの **Basic Information** ページが表示されます。
25+
26+
このページでは、アプリの概要を確認できます。また、「**App Credentials**」ヘッダーの下では「`Signing Secret`」などの重要な認証情報も確認できます。これらの認証情報は後で必要になります。
27+
28+
![Basic Information ページ](/img/boltpy/basic-information-page.png "Basic Information ページ")
29+
30+
ひと通り確認し、アプリのアイコンと説明を追加したら、アプリの構成 🔩 を始めましょう。
31+
832
---
933

34+
### トークンとアプリのインストール {#tokens-and-installing-apps}
35+
Slack アプリでは、[Slack API へのアクセスの管理に OAuth を使用します](https://api.slack.com/docs/oauth)。アプリがインストールされると、トークンが発行されます。アプリはそのトークンを使って API メソッドを呼び出すことができます。
36+
37+
Slack アプリで使用できるトークンには、ユーザートークン(`xoxp`)とボットトークン(`xoxb`)、アプリレベルトークン(`xapp`)の 3 種類があります。
38+
- [ユーザートークン](https://api.slack.com/authentication/token-types#user) を使用すると、ユーザーがアプリをインストールまたは認証した後、アプリがそのユーザーを代理して API メソッドを呼び出すことができます。1 つのワークスペースに複数のユーザートークンが存在する可能性があります。
39+
- [ボットトークン](https://api.slack.com/authentication/token-types#bot) はボットユーザーに関連づけられ、1 つのワークスペースでは最初に誰かがそのアプリをインストールした際に一度だけ発行されます。どのユーザーがインストールを実行しても、アプリが使用するボットトークンは同じになります。_ほとんど_のアプリで使用されるのは、ボットトークンです。
40+
- [アプリレベルトークン](https://api.slack.com/authentication/token-types#app) は、組織に渡ってあなたのアプリを表すものです。所属する組織内の全てのワークスペースに、全ての個人ユーザによってインストールされたアプリについても同様です。アプリレベルトークンは WebSocket 通信を行うアプリを作る際に通常使われます。
1041

1142
説明を簡潔にするために、このガイドではボットトークンを使用します。
1243

@@ -66,6 +97,7 @@ export SLACK_BOT_TOKEN=xoxb-<your-bot-token>
6697

6798
> 🔒 全てのトークンは安全に保管してください。最低限、パブリックなバージョンコントロールにチェックインすることは避けてください。また、上記の例のように環境変数を介してアクセスするようにしてください。詳細な情報は [best practices for app security](https://api.slack.com/authentication/best-practices).のドキュメントを参照してください。
6899
100+
69101
完了したら、アプリを作ってみましょう。以下のコマンドを使って、仮想環境に Python の `slack_bolt` パッケージをインストールします。
70102

71103
```shell

docs/sidebars.js

Lines changed: 109 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,114 @@
11
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
22
const sidebars = {
3-
sidebarBoltPy: [
4-
{
5-
type: 'doc',
6-
id: 'index',
7-
label: 'Bolt for Python',
8-
className: 'sidebar-title',
9-
},
10-
'getting-started',
11-
{
12-
type: "category",
13-
label: "Slack API calls",
14-
items: ["concepts/message-sending", "concepts/web-api"],
15-
},
16-
{
17-
type: "category",
18-
label: "Events API",
19-
items: ["concepts/message-listening", "concepts/event-listening"],
20-
},
21-
{
22-
type: "category",
23-
label: "App UI & Interactivity",
24-
items: [
25-
"concepts/acknowledge",
26-
"concepts/shortcuts",
27-
"concepts/commands",
28-
"concepts/actions",
29-
"concepts/opening-modals",
30-
"concepts/updating-pushing-views",
31-
"concepts/view-submissions",
32-
"concepts/select-menu-options",
33-
"concepts/app-home",
34-
],
35-
},
36-
'concepts/assistant',
37-
'concepts/custom-steps',
38-
{
39-
type: "category",
40-
label: "App Configuration",
41-
items: [
42-
"concepts/socket-mode",
43-
"concepts/errors",
44-
"concepts/logging",
45-
'concepts/async',
46-
],
47-
},
48-
{
49-
type: "category",
50-
label: "Middleware & Context",
51-
items: [
52-
"concepts/global-middleware",
53-
"concepts/listener-middleware",
54-
'concepts/context',
55-
],
56-
},
57-
'concepts/lazy-listeners',
58-
{
59-
type: "category",
60-
label: "Adaptors",
61-
items: [
62-
'concepts/adapters',
63-
'concepts/custom-adapters',
64-
],
65-
},
66-
{
67-
type: "category",
68-
label: "Authorization & Security",
69-
items: [
70-
"concepts/authenticating-oauth",
71-
"concepts/authorization",
72-
"concepts/token-rotation",
73-
],
74-
},
75-
{
76-
type: 'category',
77-
label: 'Legacy',
78-
items: [
79-
'concepts/steps-from-apps',
80-
],
81-
},
82-
{ type: 'html', value: '<hr>' },
83-
{
84-
type: 'category',
85-
label: 'Tutorials',
86-
items: [
87-
'tutorial/ai-chatbot'
88-
],
89-
},
90-
{ type: 'html', value: '<hr>' },
91-
{
92-
type: 'link',
93-
label: 'Reference',
94-
href: 'https://tools.slack.dev/bolt-python/api-docs/slack_bolt/',
95-
},
96-
{ type: 'html', value: '<hr>' },
97-
{
98-
type: 'link',
99-
label: 'Release notes',
100-
href: 'https://github.com/slackapi/bolt-python/releases',
101-
},
102-
{
103-
type: 'link',
104-
label: 'Code on GitHub',
105-
href: 'https://github.com/SlackAPI/bolt-python',
106-
},
107-
{
108-
type: 'link',
109-
label: 'Contributors Guide',
110-
href: 'https://github.com/SlackAPI/bolt-python/blob/main/.github/contributing.md',
111-
},
112-
],
3+
sidebarBoltPy: [
4+
{
5+
type: "category",
6+
label: "Guides",
7+
items: [
8+
{
9+
type: "doc",
10+
id: "index",
11+
label: "Bolt for Python",
12+
className: "sidebar-title",
13+
},
14+
"getting-started",
15+
{
16+
type: "category",
17+
label: "Slack API calls",
18+
items: ["concepts/message-sending", "concepts/web-api"],
19+
},
20+
{
21+
type: "category",
22+
label: "Events API",
23+
items: ["concepts/message-listening", "concepts/event-listening"],
24+
},
25+
{
26+
type: "category",
27+
label: "App UI & Interactivity",
28+
items: [
29+
"concepts/acknowledge",
30+
"concepts/shortcuts",
31+
"concepts/commands",
32+
"concepts/actions",
33+
"concepts/opening-modals",
34+
"concepts/updating-pushing-views",
35+
"concepts/view-submissions",
36+
"concepts/select-menu-options",
37+
"concepts/app-home",
38+
],
39+
},
40+
"concepts/assistant",
41+
"concepts/custom-steps",
42+
{
43+
type: "category",
44+
label: "App Configuration",
45+
items: [
46+
"concepts/socket-mode",
47+
"concepts/errors",
48+
"concepts/logging",
49+
"concepts/async",
50+
],
51+
},
52+
{
53+
type: "category",
54+
label: "Middleware & Context",
55+
items: [
56+
"concepts/global-middleware",
57+
"concepts/listener-middleware",
58+
"concepts/context",
59+
],
60+
},
61+
"concepts/lazy-listeners",
62+
{
63+
type: "category",
64+
label: "Adaptors",
65+
items: ["concepts/adapters", "concepts/custom-adapters"],
66+
},
67+
{
68+
type: "category",
69+
label: "Authorization & Security",
70+
items: [
71+
"concepts/authenticating-oauth",
72+
"concepts/authorization",
73+
"concepts/token-rotation",
74+
],
75+
},
76+
{
77+
type: "category",
78+
label: "Legacy",
79+
items: ["concepts/steps-from-apps"],
80+
},
81+
],
82+
},
83+
{ type: "html", value: "<hr>" },
84+
{
85+
type: "category",
86+
label: "Tutorials",
87+
items: ["tutorial/ai-chatbot", "tutorial/getting-started-http"],
88+
},
89+
{ type: "html", value: "<hr>" },
90+
{
91+
type: "link",
92+
label: "Reference",
93+
href: "https://tools.slack.dev/bolt-python/api-docs/slack_bolt/",
94+
},
95+
{ type: "html", value: "<hr>" },
96+
{
97+
type: "link",
98+
label: "Release notes",
99+
href: "https://github.com/slackapi/bolt-python/releases",
100+
},
101+
{
102+
type: "link",
103+
label: "Code on GitHub",
104+
href: "https://github.com/SlackAPI/bolt-python",
105+
},
106+
{
107+
type: "link",
108+
label: "Contributors Guide",
109+
href: "https://github.com/SlackAPI/bolt-python/blob/main/.github/contributing.md",
110+
},
111+
],
113112
};
114113

115114
export default sidebars;

0 commit comments

Comments
 (0)