From 34cfebf89c61ad548d7f63d53cca18ec00a5c521 Mon Sep 17 00:00:00 2001 From: Timerix Date: Sun, 6 Apr 2025 16:19:03 +0500 Subject: [PATCH] documented routes --- ParadoxSaveParser.WebAPI/README.md | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ParadoxSaveParser.WebAPI/README.md diff --git a/ParadoxSaveParser.WebAPI/README.md b/ParadoxSaveParser.WebAPI/README.md new file mode 100644 index 0000000..5daa402 --- /dev/null +++ b/ParadoxSaveParser.WebAPI/README.md @@ -0,0 +1,39 @@ +# WebAPI +Simple web application created using DTLib.Web. + +# Routes + +### POST `/uploadSave/eu4` +- **Request:** `application/octet-stream` - .eu4 file +- **Response:** + ```json + { "saveId": "string" } + ``` + or `{ "errorMessage": "string" }` + +### GET `/getSaveStatus` +- **Query Params:** + - `id` - id of uploaded save file +- **Response:** [SaveFileMetadata](./SaveFileMetadata.cs) + ```json + { + "id": "string", + "game": "string", + "status": "string", + "errorMessage": "string?" + } + ``` + +### GET `/getSaveData` +- **Query Params:** + - `id` - id of uploaded save file +- **Response:** + ```json5 + { + "key0": [ "objects" ], + "key1": [ "objects" ], + //... + } + ``` + or `{ "errorMessage": "string" }` +