Coder Social home page Coder Social logo

movie-info's Introduction

Movie Info service

A sample service intended to demonstrate a microservices environment. This service returns information about a given set of movies (by ids).

REST Endpoint

This service exposes a REST endpoint:

For batched support:

  GET /movies?ids=680,1893,12&limit=5&offset=0

or for single item:

GET /movies?id=680

And the response is:

    "metadata": {
        "offset": 0,
        "limit": 3,
        "total": 3
    },
    "data": [
        {
            "id": 680,
            "title": "Pulp Fiction",
            "tagline": "Just because you are a character doesn't mean you have character.",
            "overview": "A burger-loving hit man, his philosophical partner, a drug-addled gangster's moll and a washed-up boxer converge in this sprawling, comedic crime caper. Their adventures unfurl in three stories that ingeniously trip back and forth in time.",
            "popularity": 22.685188,
            "runtime": 154,
            "releaseDate": "1994-09-10",
            "revenue": 213928762,
            "budget": 8000000,
            "posterPath": "https://image.tmdb.org/t/p/w342/dM2w364MScsjFf8pfMbaWUcWrR.jpg",
            "originalLanguage": "en",
            "genres": [
                53,
                80
            ],
            "cast": [
                8891,
                2231,
                139,
                62,
                10182,
                1037,
                7036
            ]
        },
        {
            "id": 1893,
            "title": "Star Wars: Episode I - The Phantom Menace",
            "tagline": "Every generation has a legend. Every journey has a first step. Every saga has a beginning.",
            "overview": "Anakin Skywalker, a young slave strong with the Force, is discovered on Tatooine. Meanwhile, the evil Sith have returned, enacting their plot for revenge against the Jedi.",
            "popularity": 22.71543,
            "runtime": 136,
            "releaseDate": "1999-05-19",
            "revenue": 924317558,
            "budget": 115000000,
            "posterPath": "https://image.tmdb.org/t/p/w342/n8V09dDc02KsSN6Q4hC2BX6hN8X.jpg",
            "originalLanguage": "en",
            "genres": [
                12,
                28,
                878
            ],
            "cast": [
                3896,
                3061,
                524,
                33196,
                27762,
                6,
                130
            ]
        },
        {
            "id": 12,
            "title": "Finding Nemo",
            "tagline": "There are 3.7 trillion fish in the ocean. They're looking for one.",
            "overview": "Nemo, an adventurous young clownfish, is unexpectedly taken from his Great Barrier Reef home to a dentist's office aquarium. It's up to his worrisome father Marlin and a friendly but forgetful fish Dory to bring Nemo home -- meeting vegetarian sharks, surfer dude turtles, hypnotic jellyfish, hungry seagulls, and more along the way.",
            "popularity": 22.619522,
            "runtime": 100,
            "releaseDate": "2003-05-30",
            "revenue": 940335536,
            "budget": 94000000,
            "posterPath": "https://image.tmdb.org/t/p/w342/syPWyeeqzTQIxjIUaIFI7d0TyEY.jpg",
            "originalLanguage": "en",
            "genres": [
                16,
                10751
            ],
            "cast": [
                13,
                14,
                12,
                5293,
                18,
                19,
                17401
            ]
        }
    ]

Docker

Following ENV variables are available:

SERVICE_NAME: movie-info (Default)

FAIL_PERCENT: 0.3 (Default) - Indicates the percent of time this service will simulate a failure (500 response). This is used to simulate failures so that you can test retries, circuit breakers etc.

MAX_ALLOWED: 10 (Default) - Maximum number of items can be passed in ids argument for batching.

movie-info's People

Watchers

 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.