./README.md in houston-2.1.0 vs ./README.md in houston-2.2.0
- old
+ new
@@ -33,17 +33,35 @@
# Create a notification that alerts a message to the user, plays a sound, and sets the badge on the app
notification = Houston::Notification.new(device: token)
notification.alert = "Hello, World!"
-# Notifications can also change the badge count, have a custom sound, indicate available Newsstand content, or pass along arbitrary data.
+# Notifications can also change the badge count, have a custom sound, have a category identifier, indicate available Newsstand content, or pass along arbitrary data.
notification.badge = 57
notification.sound = "sosumi.aiff"
+notification.category = "INVITE_CATEGORY"
notification.content_available = true
notification.custom_data = {foo: "bar"}
# And... sent! That's all it takes.
APN.push(notification)
+```
+
+### Error Handling
+
+If an error occurs when sending a particular notification, its `error` attribute will be populated:
+
+```ruby
+puts "Error: #{notification.error}." if notification.error
+```
+
+### Silent Notifications
+
+To send a silent push notification, set `sound` to an empty string (`''`):
+
+```ruby
+Houston::Notification.new(:sound => '',
+ :content_available => true)
```
### Persistent Connections
If you want to manage your own persistent connection to Apple push services, such as for background workers, here's how to do it: