README.md in expo-server-sdk-0.1.2 vs README.md in expo-server-sdk-0.1.3

- old
+ new

@@ -66,11 +66,11 @@ # - #sound # - #channel_id # - #category_id # messages << client.notification - .to(pushToken) + .to(push_token) .sound('default') .body('This is a test notification') .data({ withSome: 'data' }) end @@ -92,14 +92,11 @@ # You can #explain(error) to attempt to explain nested errors. For example, say # a batch contains failed errors, or completely failed pages: # tickets.each_error do |error| - if error.is_a?(Error) - puts error.message - # => "This indicates the entire request had an error" - else + if error.respond_t?(:explain) puts error.explain # => "The device cannot receive push notifications anymore and you should # stop sending messages to the corresponding Expo push token." puts error.message @@ -109,10 +106,13 @@ # In the case of an DeviceNotRegistered, you can attempt to extract the # faulty push token: error.original_push_token # => ExpoPushToken[xxxxxxxxxxxxxxxxxxxxxx] - end + else + puts error.message + # => "This indicates the entire request had an error" + else end # Later, after the Expo push notification service has delivered the # notifications to Apple or Google (usually quickly, but allow the the service # up to 30 minutes when under load), a "receipt" for each notification is