runFormula method
Future<FormulaRunResult>
runFormula(
- String id, {
- required String formula,
- required FormulaAction action,
- String? version,
Runs a formula action and waits for the answer.
Fine for verify; an install can outlive the Hub's request timeout, and
a caller that waits for one is told a failure that did not happen. Use
runFormulaAsync for those.
Implementation
Future<FormulaRunResult> runFormula(
String id, {
required String formula,
required FormulaAction action,
String? version,
}) async => FormulaRunResult.fromJson(
await _object(
await post('/nodes/$id/formula', {
'formula': formula,
'action': action.name,
'version': ?version,
}),
),
);