sendEach method

JSPromise<BatchResponse> sendEach(
  1. JSArray<Message> messages, [
  2. bool dryRun
])

Sends each message in the given array via Firebase Cloud Messaging.

Unlike {@link Messaging.sendAll}, this method makes a single RPC call for each message in the given array.

The responses list obtained from the return value corresponds to the order of messages. An error from this method or a BatchResponse with all failures indicates a total failure, meaning that none of the messages in the list could be sent. Partial failures or no failures are only indicated by a BatchResponse return value.

@param messages - A non-empty array containing up to 500 messages. @param dryRun - Whether to send the messages in the dry-run (validation only) mode. @returns A Promise fulfilled with an object representing the result of the send operation.

Implementation

external JSPromise<BatchResponse> sendEach(
  JSArray<Message> messages, [
  bool dryRun,
]);