Skip to content

Commit 799a7e4

Browse files
author
Anya Zenkina
authored
improve docs for presence channels methods (#154)
1 parent a1b2875 commit 799a7e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,11 @@ This gem provides methods for accessing information from the [Channels HTTP API]
159159

160160
The following methods are provided by the gem.
161161

162-
- `pusher.channel_info('channel_name')` returns information about that channel.
162+
- `pusher.channel_info('channel_name', {info:"user_count,subscription_count"})` returns a hash describing the state of the channel([docs](https://pusher.com/docs/channels/library_auth_reference/rest-api#get-channels-fetch-info-for-multiple-channels-)).
163163

164-
- `pusher.channel_users('channel_name')` returns a list of all the users subscribed to the channel.
164+
- `pusher.channel_users('presence-channel_name')` returns a list of all the users subscribed to the channel (only for Presence Channels) ([docs](https://pusher.com/docs/channels/library_auth_reference/rest-api#get-channels-fetch-info-for-multiple-channels-)).
165165

166-
- `pusher.channels` returns information about all the channels in your Channels application.
166+
- `pusher.channels({filter_by_prefix: 'presence-', info: 'user_count'})` returns a hash of occupied channels (optionally filtered by prefix, f.i. `presence-`), and optionally attributes for these channels ([docs](https://pusher.com/docs/channels/library_auth_reference/rest-api#get-channels-fetch-info-for-multiple-channels-)).
167167

168168
### Asynchronous requests
169169

0 commit comments

Comments
 (0)