All requests must include credentials, cookies are used to identify users ( see XMLHttpRequest.withCredentials).
Returns game list:
[
{
"description": "",
"visible": true,
"mobileRoot": "/bloomingdale_mobile",
"id": "bloomingdale",
"name": "Bloomingdale",
"category": null,
"root": "/bloomingdale",
"dataUrl": "/Build/uncompressed.data",
"frameworkUrl": "/Build/uncompressed.framework.js",
"codeUrl": "/Build/uncompressed.wasm",
"img": "/img/bloom-play.png",
"loadingImg": "/img/bloom_2048x1536_preload.png",
"tips": [
"__Train your information processing skills by remembering flowers you last saw__",
"__Skills you will train:__\n- Cognitive flexibility\n- Flexible thinking\n- Adapting to various situations\n"
],
"colors": {
"loadingBar": "white"
},
"loadingImgFit": "cover",
"mobileLoadingImg": "/img/bloom_1080x1920_mobile_preload.png"
}
// more results...
]
:game
:game.id
from/games
last
: returns the most recently saved metrichigh
: returns the highest valued metric:metric
: statistic name, eg.score
for game score,played
for play counter... (be consistent!!!):count
: defaults to 1, number of records to return
Response if count == 1
(or :count
omitted):
{
"date": "2021-12-14T16:11:29.000Z",
"metric": "score",
"value": 3195
}
Response if count > 1
:
[
{
"date": "2021-12-14T16:11:29.000Z",
"metric": "score",
"value": 3195
}
// more results...
]
Parameters same as above.
Response:
{
"count": 0
}
Parameters same as above.
Returns aggregates of requested metric:
{
"min": 0,
"max": 0,
"avg": 0,
"count": 0,
"sum": 0
}
Saves statistics data.
:game
:game.id
from/games
Body:
application/x-www-form-urlencoded
:
score=5400&correct_answers=24
application/json
{
"score": 5400,
"correct_answers": 24
}
Body is parsed as typescript type Record<string, number>
(a hash with string keys and numeric values).
Response is empty, with status 201 on success, or 500 on error.