diff --git a/README.md b/README.md index ffd69e8..4a1fddc 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,99 @@ or OpenVR Toolkit. turn on angle and window hiding so the window disappears when not lifted close to your face. Alternatively display it permanently at your waist. +## API Endpoints + +* `POST /api/command`:
+Request Schema: +```json +{ + "type": "object", + "properties": { + "command": { + "type": "string", + "description": "The command to enter at the Skyrim CLI" + } + } +} +``` +Response Schema: +```json +{ + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "OK if the request was successful." + } + } +} +``` +Example Request: +```json +POST /api/command +{ + "command": "player.equipitem ffffffff 0 right" +} +``` +Example Response: +```json +200 OK +{ + "status": "OK" +} +``` +* `GET /api/favorites`:
+Response Schema: +```json +{ + "type": "array", + "items": { + "type": "object", + "properties": { + "itemName": { + "type": "string", + "description": "The name of the item as interpreted by Dragonborn Speaks Naturally", + }, + "formId": { + "description": "The form ID, the main ID used in Creation Kit and other tools", + "type": "number", + }, + "itemId": { + "description": "Probably the Object Reference ID?", + "type": "number", + }, + "isSingleHanded": { + "description": "Can the item be wielded with one hand?", + "type": "boolean", + }, + "typeId": { + "description": "The type number of the favorite. Weapons = 1, Spells = 2, etc.", + "type": "number", + } + } + } +} +``` +Example Response: +```json +[ + { + "itemName": "Iron Shield", + "formId": 77494, + "itemId": -468392994, + "isSingleHanded": false, + "typeId": 1 + }, + { + "itemName": "Flames", + "formId": 77773, + "itemId": 0, + "isSingleHanded": true, + "typeId": 2 + }, +] +``` + ## Tip for getting DSN to work better Change your confidence value in the INI to around 0.2 if you can't get DSN to