Skip to content

The Akinator API allows users to play the Akinator game programmatically. Built with the Hono framework and akinatorjs library, it supports multiple languages and includes an optional child mode for safer gaming.

License

Notifications You must be signed in to change notification settings

pageton/akinator-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Akinator API

This API allows you to interact with the Akinator game. It is built using the Hono framework and the akinatorjs library.

Endpoints

Start a new game

POST /start-game

Request Body

{
    "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".

Response

{
    "id": "session_id",
    "question": "Is your character real?",
    ...
}

Answer a question

POST /answer

Request Body

{
    "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"

Response

{
    "id": "session_id",
    "question": "Is your character from a TV show?",
    ...
}

Built With

How to Run

  1. Clone the repository:

    git clone https://github.com/dev-rio/akinator-api.git
    cd akinator-api
  2. Install dependencies:

    npm install
  3. Run the server:

    npm run dev
  4. The server will be running on http://localhost:3000.

License

This project is licensed under the MIT License.

About

The Akinator API allows users to play the Akinator game programmatically. Built with the Hono framework and akinatorjs library, it supports multiple languages and includes an optional child mode for safer gaming.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published