README.md in pushpad-0.3.0 vs README.md in pushpad-0.3.1

- old
+ new

@@ -44,23 +44,23 @@ - `auth_token` can be found in the user account settings. - `project_id` can be found in the project settings. If your application uses multiple projects, you can pass the `project_id` as a param to methods (e.g. `notification.deliver_to user, project_id: 123`). ## Collecting user subscriptions to push notifications -Pushpad offers two different ways to collect subscriptions. [Learn more](https://pushpad.xyz/docs#simple_vs_custom_api_docs) +Pushpad offers two different products. [Learn more](https://pushpad.xyz/docs) -### Custom API +### Pushpad Pro -Choose the Custom API if you want to use Javascript for a seamless integration. [Read the docs](https://pushpad.xyz/docs#custom_api_docs) +Choose Pushpad Pro if you want to use Javascript for a seamless integration. [Read the docs](https://pushpad.xyz/docs/pushpad_pro_getting_started) If you need to generate the HMAC signature for the `uid` you can use this helper: ```ruby Pushpad.signature_for current_user.id ``` -### Simple API +### Pushpad Express Add a link to let users subscribe to push notifications: ```erb <a href="<%= Pushpad.path %>">Subscribe anonymous to push notifications</a> @@ -94,15 +94,17 @@ # deliver to segments notification.broadcast tags: ['segment1', 'segment2'] # deliver to everyone notification.broadcast -# => {"scheduled": 12} ``` If no user with that id has subscribed to push notifications, that id is simply ignored. -The methods above return an hash: `"scheduled"` is the number of devices to which the notification will be sent. +The methods above return an hash: + +- `"scheduled"` is the number of devices to which the notification will be sent +- `"uids"` (`deliver_to` only) are the user IDs that will be actually reached by the notification (unless they have unsubscribed since the last notification) ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).