SEP-VIA-GROUP5 / SEP6

6th Semester Project
0 stars 1 forks source link

API requests for FE #29

Closed bis-code closed 1 year ago

bis-code commented 1 year ago

This issue is related to what APIs we would need for the application:

Movies

  1. getMovies -> return Movie list
  2. getMovies (movieId) -> return Movie by the movieId
  3. 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

  1. getPeople -> return People list
  2. getPerson (personId) - return Person by the personId
  3. 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

  1. getDirectors -> return Directors list
  2. 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)
  3. getDirectors (by person name matching, year of birth matching, movie matching) ...more probably

Stars

  1. getStars(movieId) -> return stars list for a specific movieId (this can be also handled in the movie model)
  2. getStars(personId) -> return stars list for a specific personId (this can be also handled in the person model) ...more probably

Rating

  1. getRatings(movieId) -> return ratings list for a specific movieId (this can be also handled in the movie model)
  2. getRatings(personId) -> return ratings list a person gave (this can be also handled in the person model) ...more probably