# MoonBit GaitLab API example

The public API can be used without the CLI. This example routes a sequence of `JointFrame` values through the default pipeline and renders the resulting report:

```moonbit
fn analyze_example(frames : Array[@gait.JointFrame]) -> String {
  let result = @pipeline.analyze_frames(
    frames,
    frames,
    @pipeline.default_config(),
  )
  if @pipeline.has_fatal_diagnostics(result) {
    "analysis failed"
  } else {
    @report.render_report(result.report, "markdown")
  }
}
```

The executable demo is available with:

```bash
moon run main -- --demo
moon run main -- --demo --format json
```

Run the package tests with `moon test --deny-warn --target all`.
