aboutsummaryrefslogtreecommitdiffstats
path: root/typings
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-01-15 22:16:00 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commit5c9c8bd357b2d6a94745c45cd39c312dc48b055e (patch)
treef3fe2619a508b680d83858f10283b5154b8f2773 /typings
parent5b15729e8bce1a951b741e3e983d14fd7913f879 (diff)
downloadwee-slack-5c9c8bd357b2d6a94745c45cd39c312dc48b055e.tar.gz
Fetch multiple users/bots in the same request
Turns out you can query for multiple users/bots with users.info/bots.info even though it's not documented. Use that to query for multiple users/bots in one request, instead of making tons of requests.
Diffstat (limited to 'typings')
-rw-r--r--typings/slack_api/slack_bots_info.pyi7
-rw-r--r--typings/slack_api/slack_users_info.pyi15
2 files changed, 22 insertions, 0 deletions
diff --git a/typings/slack_api/slack_bots_info.pyi b/typings/slack_api/slack_bots_info.pyi
index 4072975..966d097 100644
--- a/typings/slack_api/slack_bots_info.pyi
+++ b/typings/slack_api/slack_bots_info.pyi
@@ -18,3 +18,10 @@ class SlackBotInfoSuccessResponse(TypedDict):
bot: SlackBotInfo
SlackBotInfoResponse = SlackBotInfoSuccessResponse | SlackErrorResponse
+
+@final
+class SlackBotsInfoSuccessResponse(TypedDict):
+ ok: Literal[True]
+ bots: List[SlackBotInfo]
+
+SlackBotsInfoResponse = SlackBotsInfoSuccessResponse | SlackErrorResponse
diff --git a/typings/slack_api/slack_users_info.pyi b/typings/slack_api/slack_users_info.pyi
index ab43378..3d6a39b 100644
--- a/typings/slack_api/slack_users_info.pyi
+++ b/typings/slack_api/slack_users_info.pyi
@@ -121,3 +121,18 @@ SlackUserInfoBotResponse = (
SlackUserInfoSuccessResponse[SlackUserInfoBot] | SlackErrorResponse
)
SlackUserInfoResponse = SlackUserInfoSuccessResponse[SlackUserInfo] | SlackErrorResponse
+
+@final
+class SlackUsersInfoSuccessResponse(TypedDict, Generic[T]):
+ ok: Literal[True]
+ users: List[T]
+
+SlackUsersInfoPersonResponse = (
+ SlackUsersInfoSuccessResponse[SlackUserInfoPerson] | SlackErrorResponse
+)
+SlackUsersInfoBotResponse = (
+ SlackUsersInfoSuccessResponse[SlackUserInfoBot] | SlackErrorResponse
+)
+SlackUsersInfoResponse = (
+ SlackUsersInfoSuccessResponse[SlackUserInfo] | SlackErrorResponse
+)