Skip to content

Commit e7a06ec

Browse files
authored
Merge pull request #139 from pusher/update-readme
Remove Push Notifications (BETA)
2 parents 2c451f5 + 13166b5 commit e7a06ec

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

README.md

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -246,59 +246,3 @@ else
246246
render text: 'invalid', status: 401
247247
end
248248
```
249-
250-
## Push Notifications (BETA)
251-
252-
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.
253-
254-
### Sending native pushes
255-
256-
The native notifications API is hosted at `nativepush-cluster1.pusher.com` and only accepts https requests.
257-
258-
You can send pushes by using the `notify` method, either globally or on the instance. The method takes two parameters:
259-
260-
- `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 epehemeral nature. Note that currently, you can only publish to, at most, _ten_ interests.
261-
- `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 [iOS](https://pusher.com/docs/push_notifications/ios/server) and [Android](https://pusher.com/docs/push_notifications/android/server) docs.
262-
263-
Example:
264-
265-
```ruby
266-
data = {
267-
apns: {
268-
aps: {
269-
alert: {
270-
body: 'tada'
271-
}
272-
}
273-
}
274-
}
275-
276-
pusher.notify(["my-favourite-interest"], data)
277-
```
278-
279-
### Errors
280-
281-
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.
282-
283-
For example:
284-
285-
```ruby
286-
data = {
287-
apns: {
288-
aps: {
289-
alert: {
290-
body: "hello"
291-
}
292-
}
293-
},
294-
gcm: {
295-
notification: {
296-
title: "hello",
297-
icon: "icon"
298-
}
299-
},
300-
webhook_url: "http://yolo.com"
301-
}
302-
```
303-
304-
**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

Comments
 (0)