This API allows you to interact with the Akinator game. It is built using the Hono framework and the akinatorjs library.
POST /start-game
{
"lang": "en",
"childMode": "false"
}
lang
: The language in which to start the game. Supported values are:- "en"
- "ar"
- "cn"
- "de"
- "es"
- "fr"
- "it"
- "jp"
- "kr"
- "nl"
- "pl"
- "pt"
- "ru"
- "tr"
- "id"
childMode
(optional): Whether to enable child mode. Supported values are "true" and "false".
{
"id": "session_id",
"question": "Is your character real?",
...
}
POST /answer
{
"id": "session_id",
"lang": "en",
"childMode": "false",
"answer": "yes"
}
id
: The session ID of the game.lang
: The language of the game.childMode
(optional): Whether to enable child mode. Supported values are "true" and "false".answer
: The answer to the current question. Supported values are:- "Yes"
- "No"
- "IdontKnow"
- "Probably"
- "ProbablyNot"
- "y"
- "yes"
- "n"
- "no"
- "idk"
- "i don't know"
- "p"
- "probably"
- "pn"
- "probably not"
{
"id": "session_id",
"question": "Is your character from a TV show?",
...
}
-
Clone the repository:
git clone https://github.com/dev-rio/akinator-api.git cd akinator-api
-
Install dependencies:
npm install
-
Run the server:
npm run dev
-
The server will be running on
http://localhost:3000
.
This project is licensed under the MIT License.