From 653d773f735bc5d6e8242f52ee92ea17ee5b88df Mon Sep 17 00:00:00 2001 From: Hynek Urban Date: Fri, 12 Jul 2024 21:01:19 +0200 Subject: [PATCH] Fix the README. --- README.md | 4 ++-- rocketchat_async/core.py | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a511938..d1748b9 100644 --- a/README.md +++ b/README.md @@ -110,9 +110,9 @@ Like `RocketChat.subscribe_to_channel_changes` except the callback gets passed t Like `RocketChat.subscribe_to_channel_messages` except the callback gets passed the raw message object coming from the API. -#### `RocketChat.get_channels_raw(callback)` +#### `RocketChat.get_channels_raw()` -Like `RocketChat.get_channels` except the callback gets passed the list of raw channel objects coming from the API. +Like `RocketChat.get_channels` except the method returns the list of raw channel objects coming from the API. #### `RocketChat.unsubscribe(subscription_id)` diff --git a/rocketchat_async/core.py b/rocketchat_async/core.py index f001a9c..cbf2a59 100644 --- a/rocketchat_async/core.py +++ b/rocketchat_async/core.py @@ -86,16 +86,20 @@ async def _resume(self, token): # --> Public API methods start here. <-- async def get_channels(self): - """Get a list of channels user is currently member of. + """ + Get a list of channels user is currently member of. Returns a list of (channel id, channel type) pairs. + """ return await GetChannels.call(self._dispatcher) async def get_channels_raw(self): - """Get a list of channels user is currently member of. + """ + Get a list of channels user is currently member of. Returns a list of channel objects. + """ return await GetChannelsRaw.call(self._dispatcher)