Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel3
indent15px

Functions

All parameters (if any) are passed into a any given engine methods method as a map of parameter value keyed to parameter name. The parameters given in the tables are the keys in the map that will represent the given values.

newPico

Creates a new pico and returns it's representation. i.e. `{id: "some-id"}`

removePico

id. No parameters are given.

ParameterDatatypeRequired
--------------------------------------------------------


Code Block
titlenewPico
response = engine:newPico().klog("Response Structure: ")
/*
  Response Structure:
	{
		"id" : <new_pico_id>
	}
*/



removePico

Info
titleDisclaimer

removePico does not accept a map, but a single id value as its parameter.


ParameterDatatypeRequired
<id><string>YES


Code Block
titleremovePico
response = engine:removePico(id).klog("engine:removePico Response Structure: ")//id is just a string variable
/*
 Response Structure:
	undefined
 //engine:removePico(id) does not return anything
*/



newChannel

Creates a new channel for a pico (identified to the engine by the pico_id parameter).

ParameterDatatypeRequired
<pico_id><string>YES
<name><string>YES
<channel_name>
<type><string>YES


Code Block
titlenewChannel
response = engine:newChannel({ "name": "channel_name", "type": "channel_type", "pico_id": id }).klog("Response Structure: ")
/*
 Response Structure:
	{
		"id" : id,
		"name": "channel_name",
		"type": "channel_type"
 	}
*/




removeChannel

Removes a channel whose eci matches the provided eci. This comparison and deletion takes place on the pico with the provided id.

ParameterDatatypeRequired
<pico_id><string>YES
<channel_type>
<eci><string>YES


Code Block
titleremoveChannel
response = engine:removeChannel({"pico_id": id, "eci": eci_of_channel}).klog("Response Structure: ")
/*
 Response Structure:
	undefined
 //engine:removeChannel({"pico_id": id, "eci": eci_of_channel}) does not return anything
*/


registerRuleset

unregisterRuleset(rid)

...

ParameterDatatypeRequired
<pico_id><string> YES
<rid>string | array

YES


Code Block
titleintall ruleset
response = engine:installRuleset( { "pico_id": ent:id, "rid": "wrangler" } );
response = engine:installRuleset( { "pico_id": ent:id, "rid": ["wrangler","Pds"] } );
response = engine:installRuleset( { "pico_id": ent:id, "base": <base>, "url": <url> } );

...