Script Objects
All about objects that contain Javascript
Last updated
All about objects that contain Javascript
This whole section needs to be done
Rather than recreate the Rules and parser that we had in OLab3, we have instead decided to create an API that can be accessed via Javascript. This opens up a whole range of possibilities. It also means that authors are no longer limited by the simplistic parsing engine but can take greater advantage of what Javascript offers.
Scripts can be standalone but have much more utility when they can interface with other objects within the OLab4 core, via the REST API.
List here the objects that can be manipulated
GET https://api.cakes.com/v1/cakes/:id
This endpoint allows you to get free cakes.
id
string
ID of the cake to get, for free of course.
recipe
string
The API will do its best to find a cake matching the provided recipe.
gluten
boolean
Whether the cake should be gluten-free or not.
Authentication
string
Authentication token to track down who is emptying our stocks.
insert some examples, well commented, showing how
As noted in the section on Object, Scripts can also be Scoped Objects. They can have the same scope levels e.g. global, server, map and node-level. See #scopeforobjects for more details on this.
Last updated
{
"name": "Cake's name",
"recipe": "Cake's recipe name",
"cake": "Binary cake"
}{
"message": "Ain't no cake like that."
}