Git Product home page Git Product logo

netflix_server_api's Introduction

Consuming the api

Register subscribers

URL : /subscribers

Method : post

Body

{
    "fullname": "Jane Doe",
    "identificationNumber": "54321"
}

Responses

  1. If a new user
    {
        Subscriber:54321 saved
    }

2.. If user is already registered

    {
        Subscriber:5233 already registered.Cannot register again
    
    }

View categories

URL : /categories

Method : get

Response

[
    {
        "id": 1,
        "categoryName": "Comedy"
    },
    {
        "id": 2,
        "categoryName": "Animation"
    },
    {
        "id": 3,
        "categoryName": "Drama"
    },
    {
        "id": 4,
        "categoryName": "Action"
    }
]

Movies

Search movies

URL : /movies

Method : get

Response

    [
        {
            "id": 5,
            "name": "Lego",
            "type": "original",
            "yearOfRelease": "2018",
            "contentowner": null,
            "categories": [
                {
                    "id": 2,
                    "categoryName": "Animation"
                }
            ]
        },
        {
            "id": 6,
            "name": "Avengers Endgame",
            "type": "original",
            "yearOfRelease": "201",
            "contentowner": null,
            "categories": [
                {
                    "id": 4,
                    "categoryName": "Action"
                }
            ]
        }
    ]

Search movies by Category and Type

URL: /movies/{categoryId}

METHOD: GET

Request Parameter: type= <suggested/original>

  http://localhost:9000/movies/2?type=original

Check here: https://github.com/94658/netflix_server_api/blob/master/src/main/java/com/group/netflixserverapi/images/Capture.PNG

Response

[
    {
        "id": 5,
        "name": "Lego",
        "type": "original",
        "yearOfRelease": "2018",
        "contentowner": null,
        "categories": [
            {
                "id": 2,
                "categoryName": "Animation"
            }
        ]
    },
    {
        "id": 6,
        "name": "Avengers Endgame",
        "type": "original",
        "yearOfRelease": "201",
        "contentowner": null,
        "categories": [
            {
                "id": 4,
                "categoryName": "Action"
            }
        ]
    }
]

Suggest/add movies for subscribers

URL: /movies

METHOD: POST

Request Header: "identificationNumber"

Body

{
   "name": "Joker",
   "yearOfRelease": "2020",
   "categories": [
         {
           "categoryName": "comedy"
         },
         {
           "categoryName": "action"
         }
   ]
 }

Response

{
    "id": 13,
    "name": "Joker",
    "type": "suggested",
    "yearOfRelease": "2020",
    "contentowner": {
        "id": 7,
        "identificationNumber": "5233",
        "fullname": "Idah Koome"
    },
    "categories": [
        {
            "id": 11,
            "categoryName": "comedy"
        },
        {
            "id": 12,
            "categoryName": "action"
        }
    ]
}

Update movie for subscribers' own content

URL: /movies/{movieId}

METHOD: PATCH

Request Header: "identificationNumber"

Body

netflix_server_api's People

Contributors

idahk avatar milleradulu avatar

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.