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
The Pusher gem contains a number of helpers for interacting with the service. As a general rule, the library adheres to a set of conventions that we have aimed to make universal.
97
+
The `pusher` gem contains a number of helpers for interacting with the API. As a general rule, the library adheres to a set of conventions that we have aimed to make universal.
98
98
99
99
### Handling errors
100
100
@@ -155,21 +155,21 @@ This will continue to work, but has been replaced by `channels_client.trigger` w
155
155
156
156
### Getting information about the channels in your Pusher Channels app
157
157
158
-
This gem provides methods for accessing information from the [Pusher HTTP API](https://pusher.com/docs/rest_api). The documentation also shows an example of the responses from each of the API endpoints.
158
+
This gem provides methods for accessing information from the [Channels HTTP API](https://pusher.com/docs/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
162
-`channels_client.channel_info('channel_name')` returns information about that channel.
163
163
164
164
-`channels_client.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 Pusher application.
166
+
-`channels_client.channels` returns information about all the channels in your Channels application.
167
167
168
168
### Asynchronous requests
169
169
170
170
There are two main reasons for using the `_async` methods:
171
171
172
-
* In a web application where the response from the Pusher Channels HTTP API is not used, but you'd like to avoid a blocking call in the request-response cycle
172
+
* In a web application where the response from the Channels HTTP API is not used, but you'd like to avoid a blocking call in the request-response cycle
173
173
* Your application is running in an event loop and you need to avoid blocking the reactor
174
174
175
175
Asynchronous calls are supported either by using an event loop (eventmachine, preferred), or via a thread.
@@ -180,7 +180,7 @@ The following methods are available (in each case the calling interface matches
180
180
*`channels_client.post_async`
181
181
*`channels_client.trigger_async`
182
182
183
-
It is of course also possible to make calls to the Pusher Channels HTTP API via a job queue. This approach is recommended if you're sending a large number of events.
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.
A HTTP error or an error response from pusher will cause the errback to be called with an appropriate error object.
200
+
A HTTP error or an error response from Channels will cause the errback to be called with an appropriate error object.
201
201
202
202
#### Without EventMachine
203
203
@@ -208,7 +208,7 @@ An `HTTPClient::Connection` object is returned immediately which can be [interro
208
208
209
209
## Authenticating subscription requests
210
210
211
-
It's possible to use the gem to authenticate subscription requests to private or presence channels. The `authenticate` method is available on a channel object for this purpose and returns a JSON object that can be returned to the client that made the request. More information on this authentication scheme can be found in the docs on <http://pusher.com>
211
+
It's possible to use the gem to authenticate subscription requests to private or presence channels. The `authenticate` method is available on a channel object for this purpose and returns a JSON object that can be returned to the client that made the request. More information on this authentication scheme can be found in the docs on <https://pusher.com/docs/channels/server_api/authenticating-users>
0 commit comments