# `scorpiox-scorpioplayer-plus-web-api-client` (`spplus_`)

Pure-C99 cross-platform shared library and CLI client for the SCORPIO+ web front (`https://plus.scorpiox.net` and self-hosted `scorpiox-plus-web`).

- **Version:** `1.1.0` (ABI `1`, 100% backward-compatible with v1.0.0)
- **Exports:** 51 `spplus_*` symbols (`exports.json` == `spplus.map` == `nm -D` on all 7 targets)
- **Dependencies:** Vendored `yyjson` + vendored `scorpiox-http-transport` (`scorpiox-http.h` ABI v1). Zero external libraries on Apple / Android / UWP.

## Build & Test (Linux)

```bash
make all       # build/libscorpiox-scorpioplayer-plus-web-api-client.so + build/spplus
make test      # offline fake-backend unit suite (237 checks) + CLI selftest + exports-check (51 symbols)
make asan      # AddressSanitizer + UndefinedBehaviorSanitizer + LeakSanitizer clean run
make fuzz      # libFuzzer >= 120,000 runs over JSON parsers, image rewriter, detail resolvers & URL codecs
```

## Cross-Platform Builds

```bash
# On .6 lazarus (via sx-build-capped):
./release.sh all          # linux-x86_64, linux-aarch64, windows-x64, windows-x64-uwp, android-arm64-v8a, android-x86_64

# On .25 macOS:
./release.sh apple        # apple-xcframework (iOS, iOS-sim, macOS, tvOS, tvOS-sim; RFC-1034 CFBundleIdentifier)
```

## CLI Quickstart

```bash
./build/spplus selftest
./build/spplus login user@example.com secret
./build/spplus --token "$SX_TOKEN" home 15
./build/spplus --token "$SX_TOKEN" title tt1375666
./build/spplus --token "$SX_TOKEN" watch tt1375666 --native
./build/spplus --base http://127.0.0.1:8154 --password mypw home 15
```

## Integration

See `SPEC.md` and `include/spplus.h` for the complete API contract, and `scorpiox-scorpioplayer-plus-web-api-client.console/Interop.cs` for the canonical C# P/Invoke reference (WinUI3 & Xbox UWP).
