RunBatchUserScriptAndCompletionScript
Runs a script against the users targetted by the provided segments or all players, and then a completion script at the end.
Service | Operation |
---|---|
script | RUN_BATCH_USER_SCRIPT |
Method Parameters
Parameter | Description |
---|---|
scriptName | The name of the script with its path to be run against each user |
scriptData | Data to be sent to the script in JSON format. |
completionScript | The name of the script with its path to be run after all users have been processed. |
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 scriptName = "path/to/script1";
var completionScript = "path/to/script2";
var scriptData = {
"queryStat": "xp"
};
var scriptProxy = bridge.getScriptServiceProxy();
var postResult = scriptProxy.runBatchUserScriptAndCompletionScript(scriptName, scriptData, completionScript);
if (postResult.status == 200) {
// Success!
}
{
"service": "script",
"operation": "RUN_BATCH_USER_SCRIPT",
"data": {
"scriptName": "calcUser",
"scriptData": {
"queryStat": "xp"
},
"completionScript": "processResults"
}
}
JSON Response
{
"packetId": 1,
"messageResponses": [
{
"status": 200,
"data": {}
}
]
}