Thanks to visit codestin.com
Credit goes to github.com

Skip to content

probert999/movie-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Movie Recommender API

Introduction

It can take sometimes take longer to chose a movie than to watch it!

This Movie API allows users to retrieve movie recommendations based on a search criteria - only 3 movie recommendations are returned based on the iMDB ratings.

Movie API Specification

This API recommends provides the following end points:

  • No filter, e.g. /movies
  • Year, e.g. movies/year/2019 or year/startYear=1990&endYear=1995
  • Genre, e.g. movies/genre/family
  • Person, e.g. movies/person/Harrison Ford
  • Name of movie, e.g. movies/name/Star Wars

and returns a result in JSON format.

An optional emailAddress parameter can be used to send the recommendations via email through integration with Twilio's SendGrid platform.

The full specification can be seen at: http://api.movi3.me.uk/swagger-ui/index.html

Pre-Requisites

  • Java SE Development Kit 11
  • Maven

Technologies

  • Java
  • Spring Boot
  • MySQL
  • Lombok
  • H2 Database
  • Swagger
  • AWS
  • Docker
  • SendGrid

Running the Unit Tests

  • You can run the unit tests in IntelliJ, or you can go to your terminal and inside the root of this directory, run:

mvn test

Setup and Installation

  1. Download or clone the repository from GitHub git clone https://github.com/sairaawan/movie-api.git

  2. Database set-up
    The data used for this project is from iMDb.

    A subset of the data available is described at https://www.imdb.com/interfaces is used, which can be downloaded from https://datasets.imdbws.com.

    Instructions are available here - DB Setup instructions

  3. Configuration of application properties and environment variables
    The application requires configuration of the following environment variables to run:

prod_movieDBe.g. yourdomain:3306/imdb
prod_db_useruser account for production database
prod_db_pwdpassword for prod db user
test_movieDBe.g. localhost:3306/imdb
test_db_useruser account for test database/imdb
test_db_pwdpassword for test db user
sendgrid_api_keyyour SendGrid API key
mail_fromemail from address
test_emailemail address to use for testing
  1. Running the application
    mvn clean install
    java -jar target/api-movies-data-0.0.1

The application default port is 8080 and hence all endpoints can be accessed starting from http://localhost:8080

Deployment

The project is deployed as Docker image on AWS Elastic beanstalk. Visit http://api.movi3.me.uk/movies to view the API.

The Main Entry Point for the application is: MovieApiApplication.java

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.6%
  • Dockerfile 0.4%