-
Notifications
You must be signed in to change notification settings - Fork 0
Language Word Endpoints
dionisggr edited this page Feb 27, 2021
·
1 revision
URL: /api/language
Method: GET
Auth required: Yes
Bearer <JSON Web Token>
Requires headers: {'Content-Type': 'application/json'}
Code: 200 OK
Content example
{
"nextWord": "casa",
"totalScore": 2,
"wordCorrectCount": 0,
"wordIncorrectCount": 0,
"answer: "house",
isCorrect: true,
}
URL: /api/language/head
Method: GET
Auth required: Yes
Bearer <JSON Web Token>
Requires headers: {'Content-Type': 'application/json'}
Code: 200 OK
Content example
{
"nextWord": "casa",
"totalScore": 2,
"wordCorrectCount": 0,
"wordIncorrectCount": 0,
"answer: "house",
isCorrect: true,
}
URL: /api/language/guess
Method: POST
Auth required: Yes
Bearer <JSON Web Token>
Requires headers: {'Content-Type': 'application/json'}
{
"name": "Dwight Schrute"
"username": "dwight",
"password": "pass"
}
Name | Type | In | Description |
---|---|---|---|
nextWord |
text | header | Next word after guess |
totalScore |
integer | header | Score among all words guess |
wordCorrectCount |
integer | header | Word correct answer score |
wordIncorrectCount |
integer | header | Word incorrect answer score |
answer |
text | header | Correct answer |
isCorrect |
boolean | header | Feedback for previous guess |
Code: 200 OK
Content example
{
"nextWord": "casa",
"totalScore": 2,
"wordCorrectCount": 0,
"wordIncorrectCount": 0,
"answer: "house",
isCorrect: true,
}