Skip to content

Commit d686b05

Browse files
zimegClaude
andcommitted
feat: add admin.slackbot.skills.list method example
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent 99c24d7 commit d686b05

9 files changed

Lines changed: 62 additions & 0 deletions

File tree

‎methods/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ $ slack run chat_post_message.py # Make the request
1616

1717
## What's on call
1818

19+
### admin
20+
21+
- **[admin.slackbot.skills.list](https://docs.slack.dev/reference/methods/admin.slackbot.skills.list)**: Lists metadata for skills owned by the organization, including invite-only skills. [Implementation](./src/admin/slackbot/skills/admin_slackbot_skills_list.py).
22+
1923
### agents
2024

2125
- **[agents.conversations.archive](https://docs.slack.dev/reference/methods/agents.conversations.archive)**: Archive a code channel. [Implementation](./src/agents/conversations/agents_conversations_archive.py).

‎methods/src/admin/__init__.py‎

Whitespace-only changes.

‎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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
auto_enabled_status="enabled",
14+
category="productivity",
15+
creator_ids=["U0123ABCD"],
16+
limit=100,
17+
publish_status="published",
18+
sort="usage_count",
19+
sort_dir="desc",
20+
)
21+
22+
# Inspect the response
23+
print(response)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"display_information": {
3+
"name": "Slack API Methods",
4+
"description": "Example implementations to call \"admin.slackbot.skills\" methods"
5+
},
6+
"features": {
7+
"bot_user": {
8+
"display_name": "Slack API Methods",
9+
"always_online": true
10+
}
11+
},
12+
"oauth_config": {
13+
"scopes": {
14+
"user": ["admin.skills:read"]
15+
}
16+
},
17+
"settings": {
18+
"org_deploy_enabled": true,
19+
"socket_mode_enabled": true,
20+
"token_rotation_enabled": false
21+
}
22+
}

0 commit comments

Comments
 (0)