Skip to main content
Standard
Server (GS: Java)
How to get a collection
var {shortenedCollectionName }Entry = API.getItem("{collectionName }", {collectionKey }).document();var {shortenedCollectionName }Data = {shortenedCollectionName }Entry.getData();
shortenedCollectionName = collectionName (collectionKey )
eval = evaluation (studentUid)
evalTeam = evaluationTeam (teamUid)
result = results (simUid)
sim = simulation (simUid)
team = teams (teamUid)
user = userdetails (userUid)
Set a Response
use sendMessageTo{Receiver}() when MODIFY data
messageType
Actions
deleted, changed, created
{dataObject}_{field}_{action}
{dataObject}_{fieldOne}_{fieldTwo}_{etc.}_{action}
ex.: sim_year_yearState_changed
{dataObject}_{fieldParent}_{fieldChild}_{etc.}_{action}
ex.: team_yearData_factory_changed
messageData
Information you want to send to the Client.
use Spark.setScriptData('{ObjectName}', {Object}) when you GET data
Client (VS15.9.8: C#)
Client (Unity)