Conversation
Codecov Report
@@ Coverage Diff @@
## docs #78 +/- ##
=======================================
Coverage ? 82.57%
=======================================
Files ? 128
Lines ? 3530
Branches ? 0
=======================================
Hits ? 2915
Misses ? 615
Partials ? 0 Continue to review full report at Codecov.
|
docs/_basic/web_api.md
Outdated
| def say_hello(client, payload): | ||
| # Unix Epoch time for September 30, 2020 11:59:59 PM | ||
| when_september_ends = 1601510399 | ||
| channel_id = payload['event']['channel'] | ||
| client.chat_scheduleMessage(channel=channel_id, | ||
| post_at=when_september_ends, | ||
| text="Summer has come and passed") |
There was a problem hiding this comment.
| def say_hello(client, payload): | |
| # Unix Epoch time for September 30, 2020 11:59:59 PM | |
| when_september_ends = 1601510399 | |
| channel_id = payload['event']['channel'] | |
| client.chat_scheduleMessage(channel=channel_id, | |
| post_at=when_september_ends, | |
| text="Summer has come and passed") | |
| def say_hello(client, message): | |
| # Unix Epoch time for September 30, 2020 11:59:59 PM | |
| when_september_ends = 1601510399 | |
| channel_id = message['channel'] | |
| client.chat_scheduleMessage(channel=channel_id, | |
| post_at=when_september_ends, | |
| text="Summer has come and passed") |
There was a problem hiding this comment.
TODO: channel: message.channel.id in Bolt JS is incorrect.
|
I've mainly taken a look at code snippets but I haven't verified many of them actually work yet. |
|
Some of my comments above include TODOs in Bolt for JS documents. If anyone can take the tasks, it'd be appreciated. |
|
|
||
| Bolt for Python will create a **Redirect URL** `slack/oauth_redirect`, which Slack uses to redirect users after they complete your app’s installation flow. You will need to add this **Redirect URL** in your app configuration settings under **OAuth and Permissions**. This path can be configured in the `OAuthSettings` argument described below. | ||
|
|
||
| Bolt for Python will also create a `slack/install` route, where you can find an **Add to Slack** button for your app to perform direct installs of your app. If you need any additional authorizations (user tokens) from users inside a team when your app is already installed or a reason to dynamically generate an install URL, you can pass your own custom URL generator to `oauth_settings` as `authorize_url_generator`. |
There was a problem hiding this comment.
Similar to Bolt for JS, I think it'd be helpful to link to OAuth docs when discussing authorize_url_generator if there are more detailed docs on that piece.
There was a problem hiding this comment.
The same OAuth docs linked above, I assume? BoltJS's docs link to a specific anchor, but as this page doesn't exist yet, I'm not sure what this link will be.
| def handle_submission(ack, body, client, view): | ||
| # Acknowledge the view_submission event | ||
| ack() | ||
| |
There was a problem hiding this comment.
@seratch I've managed to lose the validation request you placed here. Could you possibly provide a snippet of what you had in mind so I can fold it in?
There was a problem hiding this comment.
@misscoded How about having simpler ones such as length-check? Here is an example I recently created: https://github.com/seratch/apidays-workshop-2020/blob/87f623356f90fbdb9f5112e114dc51c157698ac7/python/app.py#L272-L283
I sent a PR: slackapi/bolt-js#628 |
|
|
||
| ```python | ||
| # Matches all messages from bot users | ||
| @app.message({"subtype": "message_changed"}) |
There was a problem hiding this comment.
@misscoded This code doesn't work even with Bolt for JS. Use another example. app.event? #89
| def handle_submission(ack, body, client, view): | ||
| # Acknowledge the view_submission event | ||
| ack() | ||
| |
There was a problem hiding this comment.
@misscoded How about having simpler ones such as length-check? Here is an example I recently created: https://github.com/seratch/apidays-workshop-2020/blob/87f623356f90fbdb9f5112e114dc51c157698ac7/python/app.py#L272-L283
| </div> | ||
|
|
||
| ```python | ||
| from slack_bolt.oauth.oauth_settings import OAuthSettings |
There was a problem hiding this comment.
@misscoded Just in case
| from slack_bolt.oauth.oauth_settings import OAuthSettings | |
| import os | |
| from slack_bolt.oauth.oauth_settings import OAuthSettings |
| install_path="/slack/install", | ||
| redirect_uri_path="/slack/oauth_redirect", | ||
| state_store=FileOAuthStateStore(expiration_seconds=600), | ||
| callback_options=CallbackOptions(success=success, |
There was a problem hiding this comment.
@misscoded we should have samples for success / failure functions like this:
bolt-python/tests/slack_bolt/oauth/test_oauth_flow.py
Lines 141 to 148 in c1641f8
You don't need to have the type hints in docs.
|
The App Home page has been added in JS: slackapi/bolt-js#626 |
|
hmm, I'm unable to reopen this. @misscoded Could you reopen or create a new PR? |
|
I found that the reason was the deletion of the @misscoded We no longer use |
|
We're going to merge #94 - thanks @misscoded for your great work here! |

Basic Concepts section of Bolt for Python documentation (based on Bolt for JavaScript: Basic Concepts).
Preview for Review + Readability: https://misscoded.github.io/bolt-python/concepts
Part of Issue #70 (Add Getting Started Guide)
Category (place an
xin each of the[ ])slack_bolt.Appand/or its core componentsslack_bolt.async_app.AsyncAppand/or its core componentsslack_bolt.adapterRequirements (place an
xin each[ ])Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
./scripts/run_tests.shafter making the changes.