Constructor
new SafariMpnBuilder(notificationFormatopt)
Creates an object to be used to create a push notification format.
Use setters methods to set the value of push notification fields or use a JSON structure to initialize the fields.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
notificationFormat |
<optional> |
A JSON structure representing a push notification format. |
Methods
build() → {String}
Produces the JSON structure for the push notification format specified by this object.
Returns:
the JSON structure for the push notification format.
- Type
- String
getAction() → {String}
Gets the value of aps.alert.action field.
Returns:
the value of aps.alert.action field, or null if absent.
- Type
- String
getBody() → {String}
Gets the value of aps.alert.body field.
Returns:
the value of aps.alert.body field, or null if absent.
- Type
- String
getTitle() → {String}
Gets the value of aps.alert.title field.
Returns:
the value of aps.alert.title field, or null if absent.
- Type
- String
getUrlArguments() → {Array.<String>}
Gets the value of aps.url-args field.
Returns:
the value of aps.url-args field, or null if absent.
- Type
- Array.<String>
setAction(action) → {SafariMpnBuilder}
Sets the aps.alert.action field.
Parameters:
| Name | Type | Description |
|---|---|---|
action |
String |
A string to be used for the |
Returns:
this MpnBuilder object, for fluent use.
- Type
- SafariMpnBuilder
setBody(body) → {SafariMpnBuilder}
Sets the aps.alert.body field.
Parameters:
| Name | Type | Description |
|---|---|---|
body |
String |
A string to be used for the |
Returns:
this MpnBuilder object, for fluent use.
- Type
- SafariMpnBuilder
setTitle(title) → {SafariMpnBuilder}
Sets the aps.alert.title field.
Parameters:
| Name | Type | Description |
|---|---|---|
title |
String |
A string to be used for the |
Returns:
this MpnBuilder object, for fluent use.
- Type
- SafariMpnBuilder
setUrlArguments(urlArguments) → {SafariMpnBuilder}
Sets the aps.url-args field.
Parameters:
| Name | Type | Description |
|---|---|---|
urlArguments |
Array.<String> |
An array to be used for the |
Returns:
this MpnBuilder object, for fluent use.
- Type
- SafariMpnBuilder
