|
1 | | -Pusher REST Python library |
2 | | -========================== |
| 1 | +# Pusher REST Python library |
3 | 2 |
|
4 | | - |
| 3 | + |
5 | 4 |
|
6 | 5 | *status: Alpha* |
7 | 6 |
|
@@ -73,6 +72,20 @@ To trigger an event on one or more channels, use the `trigger` method on the `Pu |
73 | 72 |
|
74 | 73 | This call will trigger to `'a_channel'` and `'another_channel'`, and exclude the recipient with socket_id `"1234.12"`. |
75 | 74 |
|
| 75 | +```python |
| 76 | +pusher.trigger([u'a_channel', u'another_channel'], u'an_event', {u'some': u'data'}, "1234.12") |
| 77 | +``` |
| 78 | + |
| 79 | +#### Event Buffer |
| 80 | + |
| 81 | +Version 1.0.0 of the library introduced support for event buffering. The purpose of this functionality is to ensure that events that are triggered during whilst a client is offline for a short period of time will still be delivered upon reconnection. |
| 82 | + |
| 83 | +Note: this requires your Pusher application to be on a cluster that has the Event Buffer capability. |
| 84 | + |
| 85 | +As part of this the trigger function now returns a set of event_id values for each event triggered on a channel. These can then be used by the client to tell the Pusher service the last event it has received. If additional events have been triggered after that event ID the service has the opportunity to provide the client with those IDs. |
| 86 | + |
| 87 | +##### Example |
| 88 | + |
76 | 89 | ```python |
77 | 90 | events = pusher.trigger([u'a_channel', u'another_channel'], u'an_event', {u'some': u'data'}, "1234.12") |
78 | 91 |
|
@@ -232,14 +245,6 @@ webhook = pusher.config.validate_webhook( |
232 | 245 | print webhook["events"] |
233 | 246 | ``` |
234 | 247 |
|
235 | | -## Event Buffer |
236 | | - |
237 | | -Version 1.0.0 of the library introduced support for event buffering. The purpose of this functionality is to ensure that events that are triggered during whilst a client is offline for a short period of time will still be delivered upon reconnection. |
238 | | - |
239 | | -Note: this requires your Pusher application to be on a cluster that has the Event Buffer capability. |
240 | | - |
241 | | -As part of this the trigger function now returns a set of event_id values for each event triggered on a channel. These can then be used by the client to tell the Pusher service the last event it has received. If additional events have been triggered after that event ID the service has the opportunity to provide the client with those IDs. |
242 | | - |
243 | 248 | Running the tests |
244 | 249 | ----------------- |
245 | 250 |
|
|
0 commit comments