/bartle-test-api

API para el proyecto https://github.com/quecot/bartle-test

Primary LanguageTypeScript

bartle-test-api

Current endpoints:

GET '/': Hello, world!
GET '/votes': Get all votes
GET '/votes/:id': Get votes from node. For example, :id = 1.1 (level.nodeNumber)
GET '/global-votes': Get answer (not result!) percentages

POST '/classify-question-1/:id': Classifies answers to the question "HOW WOULD YOU DESCRIBE YOURSELF USING A FEW WORDS?" in Bartle's four categories.
POST '/classify-question-2/:id': Classifies answers to the question "HOW DO YOU LIKE TO SPEND YOUR FREE TIME?" in Bartle's four categories.
POST '/classify-question-3/:id': Classifies answers to the question "WHAT SHOULD HAPPEN FOR YOU TO BE HAPPY?" in Bartle's four categories.
POST '/classify-question-4/:id': Classifies answers to the question "WHAT ARE YOUR GOALS IN LIFE?" in Bartle's four categories.

*IMPORTANT: POST endpoints accept bodies with a JSON like {"answer":"colonizing mars"}, :id parameter represents the node number

Also, add your COHERE_API_KEY key in .env (get it from https://midu.link/ia)