Skip to main content
Version: 5.7.0

RunPeerScript

Run a cloud script in a peer app.

tip

Note that the data object will contain anything returned from the script

ServiceOperation
scriptRUN_PEER_SCRIPT

Method Parameters

ParameterDescription
scriptNameThe name of the script with its absolute path to be run.
scriptDataData to be sent to the script in json format.
peerIdentifies the peer app.

Usage

http://localhost:3000
string scriptName = "path/to/script1";
string scriptData = "{\"parm\":\"value\"}";
string peer = "serviceCode";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.ScriptService.RunPeerScript(scriptName, scriptData, peer, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"success": true
}
}