Constructor
new PushMessage(devicesopt, messageopt, subjectopt, optionsopt, badgeopt, dataopt)
Push message will be used to send a push notification to a set of devices
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
devices |
Iterable.<binding.Entity> |
<optional> |
The Set of device references which |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
message |
string |
<optional> |
The message of the push notification. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subject |
string |
<optional> |
The subject of the push notification. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
string | object |
<optional> |
The options object which can contain additional information and data |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
badge |
string | number |
<optional> |
The badge for iOS or Web Push devices |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data |
* |
<optional> |
The data object which can contain additional information. |
- Source:
Members
(readonly) devices :Set.<model.Device>
Set of devices
Type:
- Set.<model.Device>
- Source:
(readonly) message :string
Push notification message
Type:
- string
- Source:
(readonly) subject :string
Push notification subject
Type:
- string
- Source:
Methods
addDevice(device) → {void}
Adds a new object to the set of devices
Parameters:
Name | Type | Description |
---|---|---|
device |
binding.Entity | will be added to the device set to receive the push notification |
- Source:
Returns:
- Type
- void
toJSON() → {json}
Converts the push message to JSON
- Source:
Returns:
- Type
- json