Skip to content

Commit 3398abe

Browse files
committed
Merge remote-tracking branch 'origin/main' into zimeg-docs-slackbot-skills-readme-summaries
2 parents f69ac7c + 3b1df25 commit 3398abe

9 files changed

Lines changed: 66 additions & 0 deletions

File tree

‎methods/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ $ slack run chat_post_message.py # Make the request
1919
### admin
2020

2121
- **[admin.conversations.bulkSetProperties](https://docs.slack.dev/reference/methods/admin.conversations.bulkSetProperties)**: Set properties on channels in bulk. [Implementation](./src/admin/conversations/admin_conversations_bulk_set_properties.py).
22+
- **[admin.slackbot.skills.list](https://docs.slack.dev/reference/methods/admin.slackbot.skills.list)**: Lists metadata for Slackbot skills owned by an organization. [Implementation](./src/admin/slackbot/skills/admin_slackbot_skills_list.py).
23+
- **[admin.slackbot.skills.publish](https://docs.slack.dev/reference/methods/admin.slackbot.skills.publish)**: Publishes Slackbot skills to an organization's catalog. [Implementation](./src/admin/slackbot/skills/admin_slackbot_skills_publish.py).
2224

2325
### agents
2426

‎methods/src/admin/slackbot/__init__.py‎

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
apps.dev.json
2+
cache/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"manifest": {
3+
"source": "local"
4+
},
5+
"project_id": "00000000-0000-0000-0000-000000000000"
6+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"hooks": {
3+
"get-hooks": "python3 -m slack_cli_hooks.hooks.get_hooks"
4+
}
5+
}

‎methods/src/admin/slackbot/skills/__init__.py‎

Whitespace-only changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import os
2+
3+
from slack_sdk import WebClient
4+
5+
# Read a token from an environment variable
6+
token = os.environ.get("SLACK_TOKEN")
7+
8+
# Initialize
9+
client = WebClient(token=token)
10+
11+
# Call the admin.slackbot.skills.list method
12+
response = client.admin_slackbot_skills_list(
13+
category="productivity",
14+
creator_ids=["U0123ABCD"],
15+
)
16+
17+
# Inspect the response
18+
print(response)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import os
2+
3+
from slack_sdk import WebClient
4+
5+
# Read a token from an environment variable
6+
token = os.environ.get("SLACK_TOKEN")
7+
8+
# Initialize
9+
client = WebClient(token=token)
10+
11+
# Call the admin.slackbot.skills.publish method
12+
response = client.admin_slackbot_skills_publish(
13+
skill_ids=["F0123ABCD"],
14+
)
15+
16+
# Inspect the response
17+
print(response)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"display_information": {
3+
"name": "Slack API Methods",
4+
"description": "Example implementations to call \"admin.slackbot.skills\" methods"
5+
},
6+
"oauth_config": {
7+
"scopes": {
8+
"user": ["admin.skills:read", "admin.skills:write"]
9+
}
10+
},
11+
"settings": {
12+
"org_deploy_enabled": true,
13+
"socket_mode_enabled": false,
14+
"token_rotation_enabled": false
15+
}
16+
}

0 commit comments

Comments
 (0)