Develop an API project based on a public API to meet a set of requirements. Project developed using Movie API: Get movie recommendations based on inputted criteria, e.g. year/genre/actor/ratings/certification. Checks added for the age of who will be watching. This project was developed using Java 17.
- Backend-only app
- Users need to interact with API using Postman
- Create API endpoints with the appropriate HTTP verbs
- API must call the public API and use the returned data to solve the problem
- API base URL and endpoints must be appropriately named
- Good separation of concerns, clean and readable
- Good coverage of tests
- Applied error and exception handling considerations in API design
- Include a /health endpoint to give the health of the application
- User has access to postman and is aware of end points (included below)
- Application will use movies only (no tv programmes)
- Adult movies will not be included
- Sketch and plan ideas first
- Draw UML
- Model View Controller (MVC) approach with Spring boot
- Custom Exceptions to account for invalid requests
- Testing periodically visited (more Agile than TDD)
- To run this application - run from "ApiApplication.java"
- Access the API from software such as Postman (or browser)
- Runs from http://localhost:8081/api/v1/
- For endpoints and usage, see below:
/movie/{movieId}
Returns: movie object
Get the movie info. for a movie with a particular id
e.g. /movie/20
/movie/{movieId}/recommendations
Returns: list of movie objects
Get a list of movie recommendations based on the movie with the given Id
E.g. /movie/20/recommendations
/movie/{movieId}/similar
Returns: list of movie objects
Get a list of similar movies based on the movie with the given id
E.g. /movie/20/similar
/movie/actor?actor1={actor1Id}&actor2={actor2Id}
Returns: list of movie objects
Get a list of movies that the actors with the given ids has appeared it. Actor 2 is optional.
E.g. /movie/actor?actor1=31&actor2=12898
/movie/actor?actor1=31
/movie/{movieId}/director
Returns: a director object
Get the director name based on the movie with the given id
E.g. /movie/20/director
/movie/genrelist
Returns: list of genre objects
Get the genres (categories) available for movies
E.g. /movie/genrelist
/movie/popularMovies
Returns: list of movie objects
Get all the currently popular movies
E.g. /movie/popularMovies
/movie/topRatedMovies
Returns: list of movie objects
Get all the top rated movies
E.g. /movie/topRatedMovies
/movie/latestMovie
Returns: a movie object
Get the latest movie that has been added to the external api
E.g. /movie/latestMovie
/movie/{movieId}/actors
Returns: list of actor objects
Get the actors that appear in the movie with the given id
E.g. /movie/20/actors
/movie/findMovies
Returns: a list of movie objects
Get movies using certain parameters (ALL optional)
- Rating - gte
- Release from date (default 1900-01-01 in YYYY-MM-DD format) - gte
- Genre
- Runtime (in minutes) - gte
E.g. /movie/findMovies?rating=9.0&genre=28&date_from=2000-10-02&time_available=90
/movie/random
Returns: a random movie
Get a completely random movie
E.g. movie/random
movie/rating?rateMin={rateMin}&rateMax={rateMax}
Returns a list of movie objects
Get a list of movie objects between a specific minimum rating and maximum rating. The maximum rating is optional
E.g. movie/rating?rateMin=7.2&rateMax=9.2
/rating?rateMin=9.0
/movie/upcoming
Returns: list of movie objects
Get a list of movies
E.g. /movie/upcoming
/actor/{actorId}
Returns: an actor object
Get the actor by the given id
E.g. /actor/2
/actor/popular
Returns: list of actor objects
Get the current popular actors
E.g. /actor/popular
/search/movie/{searchTerm}
Returns: a list of movie objects
Get a list of movies based on a search term
E.g. /search/movie/”the lord of the rings”
/search/actor/{searchTerm}
Returns: a list of actor objects
Get a list of actors based on a search term
E.g. /search/actor/”tom”
/movie/{movieId}/reviews
Returns a list of review objects
Get a list of review objects for a particular movie with the given Id
E.g. /movie/28/reviews
- Create frontend
- Create accounts
- Users can create a list of movies to watch
- Create list of users
- Each user can have a list with favourite movies/actors
- Review Movies
- Suggest movie considering the weather
- User can share list of own favourite movies
- Tell platform (netflix, amazon, HBO, …) where you can watch that movie
- Rate Movies
- Deploy API into a cloud service (AWS, GCP, Azure)
- API usage for TV programmes
- Add Database
- User can give suggestions for API improvement
- Each movie has a recommendation of food/drinks (from food API) and order from delivery apps (UberEats, Deliveroo)
- User can have a list of movies to watch in a day selected by user or random criteria