ScheduleRawPushNotifications
Schedules raw notifications based on user local time.
Results
Name | Description |
---|---|
notificationJobs | Number of notification jobs/time zones targeted |
Service | Operation |
---|---|
pushNotification | SCHEDULE_RAW_NOTIFICATIONS |
Method Parameters
Parameter | Description |
---|---|
fcmContent | FCM dependent message content. |
iosContent | IOS dependent message content. |
facebookContent | Facebook dependent message content. |
segmentIdList | List of target segments. Omit to send to all users. |
localTime | The scheduled local arrival time. |
minimizeJobs | Optional flag to cause the server to scan players time zones to reduce scope. |
startDateUTC | Optional base date for local time calculation. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var fcmContent = {
"notification": {
"body": "content of message",
"title": "message title"
},
"data": {
"customfield1": "customValue1",
"customfield2": "customValue2"
},
"priority": "normal"
};
var iosContent = {
"aps": {
"alert": {
"body": "content of message",
"title": "message title"
},
"badge": 0,
"sound": "gggg"
}
};
var facebookContent = {
"template": "content of message"
};
var segments = [
1,
2
];
var localTime = "15:00";
var minimizeJobs = true;
var startDateUTC = 1437579786000;
var pushNotificationProxy = bridge.getPushNotificationServiceProxy();
var postResult = pushNotificationProxy.scheduleRawPushNotifications(fcmContent, iosContent, facebookContent, localTime, minimizeJobs, startDateUTC, );
if (postResult.status == 200) {
// Success!
}
{
"service": "pushNotification",
"operation": "SCHEDULE_RAW_NOTIFICATIONS",
"data": {
"fcmContent": {
"notification": {
"body": "content of message",
"title": "message title"
},
"data": {
"customfield1": "customValue1",
"customfield2": "customValue2"
},
"priority": "normal"
},
"iosContent": {
"aps": {
"alert": {
"body": "content of message",
"title": "message title"
},
"badge": 0,
"sound": "gggg"
}
},
"facebookContent": {
"template": "content of message"
},
"segmentIdList": [
1,
2
],
"localTime": "15:00",
"minimizeJobs": true,
"startDateUTC": 1437579786000
}
}
JSON Response
{
"packetId": 1,
"messageResponses": [
{
"status": 200,
"data": {
"notificationJobs": 5
}
}
]
}