diff options
Diffstat (limited to 'slack/slack_api.py')
-rw-r--r-- | slack/slack_api.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/slack/slack_api.py b/slack/slack_api.py index 76d97cb..2f57e61 100644 --- a/slack/slack_api.py +++ b/slack/slack_api.py @@ -23,6 +23,7 @@ if TYPE_CHECKING: from slack_api.slack_conversations_replies import SlackConversationsRepliesResponse from slack_api.slack_emoji import SlackEmojiListResponse from slack_api.slack_rtm_connect import SlackRtmConnectResponse + from slack_api.slack_team_info import SlackTeamInfoResponse from slack_api.slack_usergroups_info import SlackUsergroupsInfoResponse from slack_api.slack_users_conversations import SlackUsersConversationsResponse from slack_api.slack_users_info import SlackUserInfoResponse, SlackUsersInfoResponse @@ -129,6 +130,13 @@ class SlackApi(SlackApiCommon): return response return response + async def fetch_team_info(self): + method = "team.info" + response: SlackTeamInfoResponse = await self._fetch(method) + if response["ok"] is False: + raise SlackApiError(self.workspace, method, response) + return response + async def fetch_rtm_connect(self): method = "rtm.connect" response: SlackRtmConnectResponse = await self._fetch(method) |