You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An optional fourth argument may be used to send additional parameters to the API, for example to [exclude a single connection from receiving the event](https://pusher.com/docs/channels/server_api/excluding-event-recipients).
This will continue to work, but has been replaced by `channels_client.trigger` which supports one or multiple channels.
154
+
This will continue to work, but has been replaced by `pusher.trigger` which supports one or multiple channels.
155
155
156
156
### Getting information about the channels in your Pusher Channels app
157
157
158
158
This gem provides methods for accessing information from the [Channels HTTP API](https://pusher.com/docs/channels/library_auth_reference/rest-api). The documentation also shows an example of the responses from each of the API endpoints.
159
159
160
160
The following methods are provided by the gem.
161
161
162
-
-`channels_client.channel_info('channel_name')` returns information about that channel.
162
+
-`pusher.channel_info('channel_name')` returns information about that channel.
163
163
164
-
-`channels_client.channel_users('channel_name')` returns a list of all the users subscribed to the channel.
164
+
-`pusher.channel_users('channel_name')` returns a list of all the users subscribed to the channel.
165
165
166
-
-`channels_client.channels` returns information about all the channels in your Channels application.
166
+
-`pusher.channels` returns information about all the channels in your Channels application.
167
167
168
168
### Asynchronous requests
169
169
@@ -176,9 +176,9 @@ Asynchronous calls are supported either by using an event loop (eventmachine, pr
176
176
177
177
The following methods are available (in each case the calling interface matches the non-async version):
178
178
179
-
*`channels_client.get_async`
180
-
*`channels_client.post_async`
181
-
*`channels_client.trigger_async`
179
+
*`pusher.get_async`
180
+
*`pusher.post_async`
181
+
*`pusher.trigger_async`
182
182
183
183
It is of course also possible to make calls to the Channels HTTP API via a job queue. This approach is recommended if you're sending a large number of events.
184
184
@@ -190,7 +190,7 @@ It is of course also possible to make calls to the Channels HTTP API via a job q
190
190
The `_async` methods return an `EM::Deferrable` which you can bind callbacks to:
These work in a very similar way, but require a unique identifier for the user being authenticated, and optionally some attributes that are provided to clients via presence events:
A WebHook object may be created to validate received WebHooks against your app credentials, and to extract events. It should be created with the `Rack::Request` object (available as `request` in Rails controllers or Sinatra handlers for example).
0 commit comments