unit-framework
v0.0.10
Published
graph pice
Downloads
3
Readme
Graph
{
"unit-name": {
"command": "php /path/to/script.php",
"parameters": {
"list": ["param1", "param2"],
"format": "${value}"
},
"type": "String"
},
"external-unit-name": {
"url": "https://yourdomain/path/to/",
"method": "get", // (get|post|put)
"parameters": {
"list": ["param1", "param2"],
"format": "${value}"
}
}
}
Unit example
let unit = new Unit(config, 'unit-name')
unit.run({
param1: "value1",
param2: "value2"
})
.then(data => {
//put your code here
})
External unit example
let unit = new ExternalUnit(config, 'external-unit-name')
unit.run({
param1: "value1",
param2: "value2"
})
.then(data => {
//put your code here
})