Coder Social home page Coder Social logo

movieinfo's Introduction

Readme

Architecture Overview

The architecture builds up from a Redis cache, MySQL server and the Spring Boot application.

Starting the architecture

For Development

  1. Run Redis and MySql services docker-compose -f docker-compose-redis-mysql.yaml up

For production

  1. Build the jar file ./mvnw clean install
  2. Rebuild Docker image docker-compose build --no-cache
  3. Start the architecture docker-compose up
  4. Endpoint available at: http://localhost:8080/movies

Configuration

omdb.apiKey=[YOUR_API_KEY]          
omdb.apiBaseUrl=http://www.omdbapi.com
omdb.pageSize=10            # page size as omdb does not provide paging information in the response

themoviedb.apiKey=[YOUR_API_KEY] 
themoviedb.apiBaseUrl=http://api.themoviedb.org/3

# 0 means we don't have a threshold, we query all pages
movieinfo.pagesThreshold=0

API description

Services:

  • movies: returns with a list of movies(title, year if presented, director if presented) matching the search patter using the selected provider
    •   { 
            movies: [
                {
                    "Title": "Dennis the menace",
                    "Year": 1993,
                    "Director": "Nick Castle"
                },
                {
                    "Title": "Dennis the menace 2",
                    "Year": 1995,
                    "Director": [ "Nick Castle", "Other Director" ]
                },
                {
                    "Title": "Dennis the menace 300",
                }
            ] 
        }
      

Parameters:

  • api: type of provider to use [omdb, themoviedb]

Path variables

  • searchTerm: search string movie should match

Pattern:

http://localhost:8080/movies/{searchTerm}?api={api}

Examples:

http://localhost:8080/movies/Dennis?api=omdb
http://localhost:8080/movies/Dennis?api=themoviedb
http://localhost:8080/movies/Dennis%20the%20meanace?api=themoviedb
http://localhost:8080/movies/Dennis+the+menace?api=themoviedb

movieinfo's People

Watchers

Gergely Jahn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.