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
-[Getting Information For All Channels](#getting-information-for-all-channels)
27
26
-[Getting Information For A Specific Channel](#getting-information-for-a-specific-channel)
@@ -159,63 +158,6 @@ pusher.trigger_batch([
159
158
])
160
159
```
161
160
162
-
## Push Notifications (BETA)
163
-
164
-
Pusher now allows sending native notifications to iOS and Android devices. Check out the [documentation](https://pusher.com/docs/push_notifications) for information on how to set up push notifications on Android and iOS. There is no additional setup required to use it with this library. It works out of the box with the same Pusher instance. All you need are the same pusher credentials.
165
-
166
-
### Sending native pushes
167
-
168
-
The native notifications API is hosted at `nativepush-cluster1.pusher.com` and only accepts https requests.
169
-
170
-
You can send pushes by using the `notify` method, either globally or on the instance. The method takes two parameters:
171
-
172
-
-`interests`: An Array of strings which represents the interests your devices are subscribed to. These are akin to channels in the DDN with less of an ephemeral nature. Note that currently, you can only publish to, at most, _ten_ interests.
173
-
-`data`: The content of the notification represented by a Hash. You must supply either the `gcm` or `apns` key. For a detailed list of the acceptable keys, take a look at the [docs](https://pusher.com/docs/push_notifications#payload).
174
-
175
-
Example:
176
-
177
-
```python
178
-
data = {
179
-
'apns': {
180
-
'priority': 5,
181
-
'aps': {
182
-
'alert': {
183
-
'body': 'tada'
184
-
}
185
-
}
186
-
}
187
-
}
188
-
189
-
pusher.notify(["my-favourite-interest"], data)
190
-
```
191
-
192
-
### Errors
193
-
194
-
Push notification requests, once submitted to the service are executed asynchronously. To make reporting errors easier, you can supply a `webhook_url` field in the body of the request. This will be used by the service to send a webhook to the supplied URL if there are errors.
195
-
196
-
For example:
197
-
198
-
```python
199
-
data = {
200
-
"apns": {
201
-
"aps": {
202
-
"alert": {
203
-
"body": "hello"
204
-
}
205
-
}
206
-
},
207
-
'gcm': {
208
-
'notification': {
209
-
"title": "hello",
210
-
"icon": "icon"
211
-
}
212
-
},
213
-
"webhook_url": "http://yolo.com"
214
-
}
215
-
```
216
-
217
-
**NOTE:** This is currently a BETA feature and there might be minor bugs and issues. Changes to the API will be kept to a minimum, but changes are expected. If you come across any bugs or issues, please do get in touch via [support](support@pusher.com) or create an issue here.
0 commit comments