This issue is related to what APIs we would need for the application:
Movies
getMovies -> return Movie list
getMovies (movieId) -> return Movie by the movieId
getBestMovies -> return Movie list with best movies. This needs some extra functionality. You would need to check how many stars that movie has and limit the list to only have at least the first 10 items.
...more probably
Model proposal:
We can also include the stars given in the Movie model, as a list of Stars
We can also include the average stars, as stars/count of stars
We can also include its ratings given to the movie, as a list of reviews
Person
getPeople -> return People list
getPerson (personId) - return Person by the personId
getActivePeople -> this will return People list with the most active People. You can get the most active People by the reviews count that they have.
Model proposal:
I would say that it would make sense to have one more variable in the Person which should be isDirector: boolean. Instead of searching for that specific person and movie in the getDirector method, we can easily check if a specific person is also a Director.
We can also include the stars given in the Person model, as a list of Stars
We can also include its ratings given to the movies, as a list of reviews
....more probably
Director
getDirectors -> return Directors list
getDirector (movieId, personId) -> return director if exists, if not, return empty. In java you have Optional.of(Object) or Optional.empty(). If it's empty, it means that specific director searched is not actually a director, but this can be also handled from the Person API (see Model proposal)
getDirectors (by person name matching, year of birth matching, movie matching)
...more probably
Stars
getStars(movieId) -> return stars list for a specific movieId (this can be also handled in the movie model)
getStars(personId) -> return stars list for a specific personId (this can be also handled in the person model)
...more probably
Rating
getRatings(movieId) -> return ratings list for a specific movieId (this can be also handled in the movie model)
getRatings(personId) -> return ratings list a person gave (this can be also handled in the person model)
...more probably
This issue is related to what APIs we would need for the application:
Movies
Model proposal: We can also include the stars given in the Movie model, as a list of Stars We can also include the average stars, as stars/count of stars We can also include its ratings given to the movie, as a list of reviews
Person
Model proposal: I would say that it would make sense to have one more variable in the Person which should be isDirector: boolean. Instead of searching for that specific person and movie in the getDirector method, we can easily check if a specific person is also a Director. We can also include the stars given in the Person model, as a list of Stars We can also include its ratings given to the movies, as a list of reviews ....more probably
Director
getDirectors (by person name matching, year of birth matching, movie matching) ...more probably
Stars
getStars(personId) -> return stars list for a specific personId (this can be also handled in the person model) ...more probably
Rating