Here's the English translation:
---
This skill is a minimal guide for creating H5 games, mobile compatibale, touch screen games.
**Repository URL**: https://www.idlab.top Each game requires creating a new folder in the repository root directory, containing the following 3 fixed files:
config.json— Game configuration (title and other metadata)index.html— Main game codepreview.png— Game screenshot preview**Important Rule**: The interface will return an error if a file already exists; no overwriting.
POST /xlabopenapi/github/aigames/configParameterTypeRequiredDescriptiongameFolderstringYesGame folder name, use English, e.g., my\_cool\_game``filefileYesconfig.json file, format shown below
json
{
"title": "Game Name"
}
bash
curl -X POST "https://www.idlab.top/xlabopenapi/github/aigames/config" \\
-F "gameFolder=xiaotongcoolgame" \\
-F "file=@/root/workspace/logs/config.json"
---
POST /xlabopenapi/github/aigames/indexParameterTypeRequiredDescriptiongameFolderstringYesGame folder name, must match the one used when uploading config.jsonfilefileYesindex.html main game file
bash
curl -X POST "https://www.idlab.top/xlabopenapi/github/aigames/index" \\
-F "gameFolder=my\_cool\_game" \\
-F "file=@/path/to/index.html"
---
POST /xlabopenapi/github/aigames/previewParameterTypeRequiredDescriptiongameFolderstringYesGame folder name, must match the one used when uploading config.jsonfilefileYespreview.png game screenshot (recommended size 400×300)
bash
curl -X POST "https://www.idlab.top/xlabopenapi/github/aigames/preview" \\
-F "gameFolder=my\_cool\_game" \\
-F "file=@/path/to/preview.png"
---
Assuming you want to upload a Snake game named
pixel\_snake, the steps are as follows:
bash
curl -X POST "https://www.idlab.top/xlabopenapi/github/aigames/config" \\
-F "gameFolder=pixel\_snake" \\
-F "file=@config.json"
config.json content:
json
{"title": "Pixel Snake"
}
bash
curl -X POST "https://www.idlab.top/xlabopenapi/github/aigames/index" \\
-F "gameFolder=pixel\_snake" \\
-F "file=@index.html"
bash
curl -X POST "https://www.idlab.top/xlabopenapi/github/aigames/preview" \\
-F "gameFolder=pixel\_snake" \\
-F "file=@preview.png"
Provide the experience URL as https://thenext.games/game/ + gameFolder. For example, in the case above: https://thenext.games/game/pixel\_snake
---
All interfaces return a unified structure:
json
{
"code": 200, // 200 indicates success, other values indicate failure
"message": "success",
"data": { ... } // Returned data on success
}
codeMeaning200Success400Parameter error (e.g., file already exists, gameFolder is empty, etc.)500Internal server error (e.g., GitHub API call failed)
---
my\_cool\_game, pixel-snake.overwrite=true.---
I noticed there was a formatting issue in the config.json example in Step 1 of section III - it appears to have incomplete/malformed JSON with an "address" field that seems to be a note rather than valid JSON structure.