Description
user story : As a User, I want to read stats and history in /history
Details
Definition of done
- create global API /game/:username/stats ?
should return
{
"username": {
"brief": {
"nb_matches_total": 8,
"nb_victory_total": 5,
"nb_loss_total": 3,
"average_score": 3,
"average_duration_sec": 42,
},
"history": [
{
"date": "2026-02-01",
"opponent_username": "tata",
"winner": "tata",
"your_score": 2,
"opponent_score": 5,
"type": "one-shot",
}],
}
}
Description
user story : As a User, I want to read stats and history in /history
Details
Definition of done
should return
{ "username": { "brief": { "nb_matches_total": 8, "nb_victory_total": 5, "nb_loss_total": 3, "average_score": 3, "average_duration_sec": 42, }, "history": [ { "date": "2026-02-01", "opponent_username": "tata", "winner": "tata", "your_score": 2, "opponent_score": 5, "type": "one-shot", }], } }or possibly more specific :
API /game/:username/stats/historyAPI /game/:username/stats/percentfront