MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / get_channels_data

Method get_channels_data

api/integrations/slack/slack.py:47–58  ·  view source on GitHub ↗

Returns non archived public channels.

(self, **kwargs)

Source from the content-addressed store, hash-verified

45 raise SlackChannelJoinError(e.response.get("error")) from e
46
47 def get_channels_data(self, **kwargs) -> ChannelsDataResponse: # type: ignore[no-untyped-def]
48 """
49 Returns non archived public channels.
50 """
51
52 response = self._client.conversations_list(exclude_archived=True, **kwargs)
53 channels = response["channels"]
54 channels = [
55 SlackChannel(channel["name"], channel["id"]) for channel in channels
56 ]
57 cursor = response["response_metadata"]["next_cursor"]
58 return ChannelsDataResponse(channels=channels, cursor=cursor)
59
60 @property
61 def _client(self) -> WebClient:

Calls 2

SlackChannelClass · 0.85