API done for Raketech test. It has a CRUD to one entity "Movie" and a provider for OmdbAPI films.
- Request for a API token at OmdbAPI. You problably will receive in e-mail and need to validate it
- Clone this repo and create a
.env
file copying the.env.example
file - Put your API token from OmdbAPI there, the rest of the file you can copy from the example
- run
yarn
- run
yarn docker:build
- run
yarn docker:start
- run
yarn typeorm migration:run
- run
yarn docker:restart
- run
yarn start:dev
If its working you may see in console:
Database connected successfully
Server running under http://localhost:$port
bold params are mandatory
- PARAMS id: string (imdb id of movie)
if you don't put params, it will return all movies
- QUERY search: string (title of the movie to search)
- QUERY year: string (year of the movie to match, needs to be exact)
- QUERY type: string (type of movie, it can be 'movie' | 'series' | 'episode')
- BODY imdbId: string (imdb if of movie)
- PARAMS id: string (imdb id of movie)
- BODY type: string (type field of movie)
- BODY title: string (title field of movie)
- BODY year: string (year field of movie)
- BODY poster_image: string (poster_image field of movie)
- BODY rated: string (rated field of movie)
- BODY released: string (released field of movie)
- BODY runtime: string (runtime field of movie)
- BODY genre: string (genre field of movie)
- BODY director: string (director field of movie)
- BODY writer: string (writer field of movie)
- BODY actors: string (actors field of movie)
- BODY plot: string (plot field of movie)
- BODY plot_full: string (plot_full field of movie)
- BODY language: string (language field of movie)
- BODY country: string (country field of movie)
- BODY awards: string (awards field of movie)
- BODY metascore: string (metascore field of movie)
- BODY imdbRating: string (imdbRating field of movie)
- BODY imdbVotes: string (imdbVotes field of movie)
- BODY imdbID: string (imdbID field of movie)
- BODY release_dvd: string (release_dvd field of movie)
- BODY boxOffice: string (boxOffice field of movie)
- BODY production: string (production field of movie)
- BODY website: string (website field of movie)
- PARAMS id: uuid string (id of movie)