For the description, use case and class diagrams of the project, see the project wiki here.
Run ./run.sh
from this directory to run both backend and frontend.
If the deployment is successful, the app should be available at http://localhost:8080/pa165.
Email: [email protected]
,
Password: jevoheslo
Email: [email protected]
,
Password: papiheslo
Email: [email protected]
,
Password: kikoheslo
Email: [email protected]
,
Password: radoheslo
The Swagger documentation is available at http://localhost:8080/pa165/rest/swagger-ui.html.
Below there are described examples of the CURL commands for each endpoint:
curl -X POST -i -H "Content-Type: application/json" --data '{"name": "Mads Mikkelsen", "bio": "He is cool.", "dateOfBirth": "1999-01-01"}' http://localhost:8080/pa165/rest/persons/create
curl -X GET -i http://localhost:8080/pa165/rest/persons/1
curl -X GET -i http://localhost:8080/pa165/rest/persons/find-by-name?name=Mads%20Mikkelsen
curl -X PUT -i -H "Content-Type: application/json" --data '{"id": "1", "name": "Mads Mikkelsen", "bio": "He is not that cool.", "dateOfBirth": "1999-01-01"}' http://localhost:8080/pa165/rest/persons/update
curl -X DELETE -i -H "Content-Type: application/json" --data '{"id": "1"}' http://localhost:8080/pa165/rest/persons/remove
curl -X POST -i -H "Content-Type: application/json" --data '{"title": "Dune", "releaseYear": "2021-10-01", "genres": ["SCIFI"]}' http://localhost:8080/pa165/rest/movies/create
curl -X GET -i http://localhost:8080/pa165/rest/movies/1
curl -X GET -i http://localhost:8080/pa165/rest/movies/find-by-title?title=Dune
curl -X GET -i http://localhost:8080/pa165/rest/movies/1/overall-score
curl -X GET -i http://localhost:8080/pa165/rest/movies/1/originality-score
curl -X GET -i http://localhost:8080/pa165/rest/movies/1/soundtrack-score
curl -X GET -i http://localhost:8080/pa165/rest/movies/1/narrative-score
curl -X GET -i http://localhost:8080/pa165/rest/movies/1/cinematography-score
curl -X GET -i http://localhost:8080/pa165/rest/movies/1/depth-score
curl -X PUT -i -H "Content-Type: application/json" --data '{"id": "1", "title": "Dune", "releaseYear": "2021-10-01", "genres": ["SCIFI", "ACTION"]}' http://localhost:8080/pa165/rest/movies/update
curl -X DELETE -i -H "Content-Type: application/json" --data '{"id": "1"}' http://localhost:8080/pa165/rest/movies/remove
curl -X GET -i http://localhost:8080/pa165/rest/movies/1/recommendations?amount=1
curl -X POST -i -H "Content-Type: application/json" --data '{"user":{"id":1},"movie":{"id":1},"originality":1,"soundtrack":1,"narrative":1,"cinematography":1,"depth":1}' http://localhost:8080/pa165/rest/ratings/create
curl -X PUT -i -H "Content-Type: application/json" --data '{"id":1,"user":{"id":1},"movie":{"id":1},"originality":5,"soundtrack":5,"narrative":5,"cinematography":5,"depth":5}' http://localhost:8080/pa165/rest/ratings/update
curl -X DELETE -i -H "Content-Type: application/json" --data '{"id":1}' http://localhost:8080/pa165/rest/ratings/remove
curl -X GET -i http://localhost:8080/pa165/rest/ratings/1
curl -X GET -i http://localhost:8080/pa165/rest/ratings/find-by-user?id=1
curl -X GET -i http://localhost:8080/pa165/rest/ratings/find-by-movie?id=1
curl -X GET -i http://localhost:8080/pa165/rest/ratings/1/overall-score
curl -X GET -i http://localhost:8080/pa165/rest/users
curl -X PUT -i -H "Content-Type: application/json" --data '{"username": "TomWiseau1", "emailAddress": "[email protected]", "password": "OhHiMark"}' http://localhost:8080/pa165/rest/users/register
curl -X GET -i http://localhost:8080/pa165/rest/users/1
curl -X GET -i http://localhost:8080/pa165/rest/users/find-by-username?username=TomWiseau1
curl -X GET -i http://localhost:8080/pa165/rest/users/find-by-mail?emailAddress=tom.wiseau%40gmail.com
curl -X POST -i -H "Content-Type: application/json" --data '{"emailAddress": "[email protected]", "password": "OhHiMark"}' http://localhost:8080/pa165/rest/users/auth
curl -X GET -i -H "Content-Type: application/json" --data '{"id": "1"}' http://localhost:8080/pa165/rest/users/is-admin
curl -X GET -i -H "Content-Type: application/json" --data '{"id": "1"}' http://localhost:8080/pa165/rest/users/is-disabled
curl -X POST -i -H "Content-Type: application/json" http://localhost:8080/pa165/rest/users/disable?id=1