Versions Compared

Key

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

...

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

ParameterDatatypeRequired
<url><string>YES
<base><string>YES

The "base" key will have a value that contains the domain name where your krl file is located. ex:  "http://raw.githubusercontent.com"

The "url" key will complete the path appended to the base. ex: "/repository1/file.txt"

If the "pico_id" and "rid" keys are provided like in engine:installRuleset, the following directive error is given: {"error" : "registerRuleset expects, pico_id and rid or url+base"}.

Code Block
titleregisterRuleset
response = engine:registerRuleset({"url": url, "base": base}).klog("Response Structure: ")
/*
 Response Structure:
	"myRuleset"
 Simply returns the rulesetID as a string. The rulesetID is the ruleset's name. 
*/


unregisterRuleset(rid)

Info
titleDisclaimer

unregisterRuleset does not accept a map, but a single ruleset ID (rid) value as its parameter.

...

Unregisters the ruleset given by the rid. It will throw an error if the ruleset is installed on any picos, or depended on by another ruleset.

ParameterDatatypeRequired
<rid><string>YES

If your filename is myRuleset.krl, then the ruleset id will be "myRuleset".

...

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> } );


/*
 Response Structure:
	"myRuleset"
 Simply returns the rulesetID as a string. The rulesetID is the ruleset's name. 
*/

...