MIT License
Implementation of test case for Gamee App.
You should create two API endpoits - one for storing a gamescore, second for providing top 10 players in particular game (game ID is specified in request parameters).
Client (JavaScript) creates a xhr request on this api endpoint and uses jsonrpc schema (http://www.jsonrpc.org/specification).
Request payload is carrying game ID (int), user ID (int) and game score (int),
PHP application receives this request, stores gameplay data into the game leaderboard and returns a success response.
It doesn't matter whether the application runs on php fpm, some php server or anything different
Technical requirements:
Input data validation:
Bonus points:
docker-compose up
Run composer install
after cloning this project.
Read postman_collection.json
for more information.
/scores
- Endpoint for data storing./games
- Endpoint for data fetching.Require installed docker engine and docker-compose release notes
Url
localhost:8080
Composer scripts
composer drun
run local dev servercomposer drb
rebuild local dev servercomposer dkill
kill local dev servercomposer drm
remove local dev servercomposer dps
list instances on local dev server