SCScript

A class that works with the server-side scripts of the application


.run(scriptID, pool, callback)

A method that calls a server-side script

Parameter Type Properties Description Value example
scriptID String Mandatory Server script ID "57484fb91c5666544db25675"
pool [String: AnyObject] Data pool to be passed to the server-side script ["data": {"array": [0,1,2,3,"строка"], "logic": false}, "weekday": "friday"]
callback (Bool, SCError?) -> Void Callback for the request being executed

Example

SCScript.run("57484fb91c5666544db25675", ["collname": "items", "key": "relToQuests", "val": ["CF4Gk9WP6L", "MwORD9llTM", "Jw4INX328A"]]) {
    success, error in
}