Apprendere parole test

Users managment:

Register new user:

curl -i -X POST -H 'Content-Type: application/json' -d '{"name": "anna", "password": "ggg", "email": "none@nowhere.net", "researchOK": 1, "uppercase": 0, "born": 1973, "italiano": 1, "sordo":0, "lis":0}' https://genrule.dpss.psy.unipd.it/w/aP/adduser

Login (returns JWT bearer, referred below as {token}):

curl -i -X POST -H 'Content-Type: application/json' -d '{"name": "anna", "password": "ggg"}' https://genrule.dpss.psy.unipd.it/w/aP/login

Login check:

curl -i -X GET https://genrule.dpss.psy.unipd.it/w/aP/getuser

curl -i -X GET -H 'Authorization: Bearer {token}' https://genrule.dpss.psy.unipd.it/w/aP/getuser

Available GET query (behave differently if the \ is provided in the header, otherwise uses Anonymous):

taskList: gettasks

curl -i -X GET -H 'Authorization: Bearer {token}' https://genrule.dpss.psy.unipd.it/w/aP/gettasks

gettrial: gettrial?code=agge1

curl -i -X GET -H 'Authorization: Bearer {token}' https://genrule.dpss.psy.unipd.it/w/aP/gettrial?code=agge1

gettrial: gettrial?code=agge1&providedata=true

curl -i -X GET -H 'Authorization: Bearer {token}' https://genrule.dpss.psy.unipd.it/w/aP/gettrial?code=agge1&providedata=true

with providedata=true provides images in bas64 enocding

image: image?name=borsa-grande.png

directly gets image file with binary send

To send results to the server:

curl -i -X POST -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"taskcode": "agge1", "trials":[{ "trial_id": "123", "acc": 1, "rt": 400},{"trial_id": "444","acc": 1, "rt": 800}]}' https://genrule.dpss.psy.unipd.it/w/aP/senddata

curl -i -X POST -H 'Content-Type: application/json' -d '{"taskcode": "agge1", "trials":[{ "trial_id": "123", "acc": 1, "rt": 400},{"trial_id": "444","acc": 1, "rt": 800}]}' https://genrule.dpss.psy.unipd.it/w/aP/senddata