From a5e4ceef95b55a9d8a9efefd69954527bc1089bf Mon Sep 17 00:00:00 2001 From: memo Date: Sun, 19 Nov 2023 12:05:46 +0100 Subject: [PATCH] add API and server command --- docs/_sidebar.md | 1 + docs/api.md | 8 ++++++++ docs/cli.md | 20 +++++++++++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 docs/api.md diff --git a/docs/_sidebar.md b/docs/_sidebar.md index ed6fcf09..8f78ba65 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -1,6 +1,7 @@ - Guide * [Getting started](/) * [CLI](cli.md) + * [API](api.md) * [About](about.md) - Packages * [Highlights](packages.md) diff --git a/docs/api.md b/docs/api.md new file mode 100644 index 00000000..b4e0f996 --- /dev/null +++ b/docs/api.md @@ -0,0 +1,8 @@ +?> This documentation page is for developers. Skip to the next page: [About](about.md). + +[sc4pac-tools-api](https://raw.githubusercontent.com/memo33/sc4pac-tools/main/api.md ':include') + + + +--- +Next up: [About](about.md) diff --git a/docs/cli.md b/docs/cli.md index 3f63bb11..260e377b 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -170,4 +170,22 @@ sc4pac channel build --output "channel/json/" "channel/yaml/" --- -Next up: [About](about.md) +## server + +**Usage:** `sc4pac server [options]` + +Start a local server to use the HTTP [API](api). + +**Example:** +``` +sc4pac server --indent 2 --scope-root scopes/scope-1/ +``` + +**Options:** +- `--port number` (default: 51515) +- `--indent number` indentation of JSON responses (default: -1, no indentation) +- `--scope-root path` root directory containing `sc4pac-plugins.json` (default: current working directory), newly created if necessary; can be used for managing multiple different plugins folders + + +--- +Next up: [API](api.md)