module Exponent

Basic Usage:

Create new client client = Exponent::Push::Client.new(**args)

Send UPTO ~~100~~ messages per call, docs.expo.io/versions/latest/guides/push-notifications/#message-format response_handler = client.send_messages([list of formatted messages])

Check the response to see if any errors were re response_handler.errors?

To process each error, iterate over the errors array which contains each Error class instance response_handler.errors

There is an array of invalid ExponentPushTokens that were found in the initial /send call response_handler.invalid_push_tokens[‘ExponentPushToken']

You can use the handler to get receipt_ids response_handler.receipt_ids

You can pass an array of receipt_ids to verify_deliveries method and it will populate a new ResponseHandler with any errors receipt_response = client.verify_deliveries(receipt_ids)

Constants

VERSION

Public Class Methods

is_exponent_push_token?(token) click to toggle source
# File lib/exponent-server-sdk.rb, line 33
def self.is_exponent_push_token?(token)
  token.start_with?('ExponentPushToken')
end