Module: Push Notification API

Methods

(async, static) sendNotification(messageText, messageOptions) → {Promise}

Sends a push notification to all registered devices with the provided message.
Parameters:
Name Type Description
messageText string The content text of the push notification
messageOptions object Advanced options for sending push notifications. See Push API documentation for details
Returns:
Returns the response as provided by the Mobile Foundation Push service
Type
Promise

(async, static) sendNotificationByPlatform(messageText, platform, messageOptions) → {Promise}

Sends a push notification to all registered devices of specified platforms with the provided message.
Parameters:
Name Type Description
messageText string The content text of the push notification
platform Array The mobile platform to send notifications to. Valid values are 'android', 'ios'
messageOptions object Advanced options for sending push notifications. See Push API documentation for details
Returns:
Returns the response as provided by the Mobile Foundation Push service
Type
Promise

(async, static) sendNotificationByTags(messageText, tags, messageOptions) → {Promise}

Sends a push notification to all subscribed to one of more tags.
Parameters:
Name Type Description
messageText string The content text of the push notification
tags Array An array of tags to send notification to. E.g. ['sports','world']
messageOptions object Advanced options for sending push notifications. See Push API documentation for details
Returns:
Returns the response as provided by the Mobile Foundation Push service
Type
Promise