singleTypes update

This commit is contained in:
2026-05-10 20:38:05 +02:00
parent 147382bf48
commit b78900b909
5 changed files with 275 additions and 45 deletions

View File

@@ -64,10 +64,38 @@ The importer pulls every page for all configured datasets and both supported lan
- `GET /health`
- `GET /docs`
- `GET /openapi.json`
- `GET /api/item`
- `GET /api/item/{id}`
- `GET /api/skill`
- `GET /api/skill/{id}`
- `GET /api/recipe`
- `GET /api/recipe/{id}`
- `GET /api/placeable`
- `GET /api/placeable/{id}`
- `GET /api/npc`
- `GET /api/npc/{id}`
- `GET /api/{dataset}`
- `GET /api/{dataset}/{id}`
- `GET /api/search?q=...`
- `POST /api/import`
- `GET /api/import/status`
Datasets: `items`, `skills`, `recipes`, `placeables`, `npcs`.
Use singular datasets for detailed records. These collections store the full Questlog single-record payloads. For example, `item` includes item-specific `raw.stats` structures such as `weaponStats`, `fillableStats`, and wearable stats.
```text
GET /api/item?language=en&limit=25
GET /api/item/LongRifle_Unique_Poison_03?language=en
GET /api/items/LongRifle_Unique_Poison_03?language=en
GET /api/item/Bloodsack_02?language=de
GET /api/skill/skills_ability_poisonmine?language=en
GET /api/recipe/Bloodsack_2_Recipe?language=en
GET /api/placeable/Atre_Banner_Placeable?language=en
GET /api/npc/bs43q?language=en
GET /api/search?q=rifle&datasets=item,skill,recipe&language=en
```
Public API datasets: `item`, `skill`, `recipe`, `placeable`, `npc`, `items`, `skills`, `recipes`, `placeables`, `npcs`.
Plural datasets are the older paginated Questlog summary collections. For OpenClaw and other clients that need complete stats and relationships, prefer the singular datasets.
For convenience, `GET /api/{pluralDataset}/{id}` checks the matching detailed singular collection first when one exists, then falls back to the older summary record.