Repository contain simple microservice for managing movies. It is connected with approving-microservice. At the beginning there are 4 films available. Reviews should be automatically added after 1 minute.
Create movie
-
URL: /movies
-
Method:
POST
-
RequestBody: { "title": "Inception", "rating": 8.3, "director": "Christopher Nolan", "actors":["Leonardo DiCaprio", "Ellen Page"] }
Required:
title=[String]
- Title must have at least 3 characters up to 50 and can contain only letters.rating=[Double]
- Rating should be between 1 and 10.director=[String]
actors=[List<String>]
Get movie
-
URL: /movies/{id}
-
Method:
GET
Update movie
-
URL: /movies/{id}
-
Method:
PUT
-
RequestBody: { "title": "Inception", "rating": 8.3, "director": "Christopher Nolan", "actors":["Leonardo DiCaprio", "Ellen Page"] }
Required:
title=[String]
- Title must have at least 3 characters up to 50 and can contain only letters.rating=[Double]
- Rating should be between 1 and 10.director=[String]
actors=[List<String>]
Delete movie
-
URL: /movies/{id}
-
Method:
DELETE
Get list of movies
-
URL: /movies
-
Method:
GET
Get list of movies with rating greater than
-
URL: /movies/ratingGreaterThan/{rating}
-
Method:
GET
Get list of sorted movies by rating
-
URL: /movies/sortedByRating
-
Method:
GET
Add review for movie
-
URL: /movies/{id}/review
-
Method:
PUT
-
RequestBody: { "reviewContent": "I loved this movie. I thought it was one of the best of the year. The visuals were incredible, and the story was creative sci-fi adventure.", "rating": 9, "userName": "Leonardo" }
Required:
reviewContent=[String]
- Conent must have at least 10 characters up to 250.rating=[Double]
- Rating should be between 1 and 10.userName=[String]
- Username must have at least 3 characters up to 15.