Skip to content
/ wsiwn Public

What Should I Watch Next? Expert System built using Python/Flask and Prolog.

Notifications You must be signed in to change notification settings

nirantak/wsiwn

Repository files navigation

WSIWN

What Should I Watch Next?

Table of Contents

Usage

  • Install Docker and Docker Compose

  • Run web app

    $ docker-compose up

    or

  • Run Prolog

    $ docker-compose run api bash
    $ swipl server/prolog/movies.pl
    $ swipl server/prolog/tv.pl

    Execute queries

    ?- movies(X, Z).
    ?- movies(X, L, G, D, Y).
    
    ?- tv(X, Z).
    ?- tv(X, L, G, D, S, T).

    where

    • X: Output variable (byte string)
    • Z: Input Search term (str)
    • L: Language (str)
    • G: Genre (str)
    • D: Duration {short, avg, long}
    • Y: Year (int)
    • S: Number of Seasons (int)
    • T: Status {ended, airing}

Technology Stack

Working

REST API Endpoints


Method[name] URI Description
GET[movies] /api/movies?query=string Display Movies matching query string
GET[tv] /api/tv?query=string Display TV shows matching query string
POST[movies] /api/movies Search Movies with params (at least 1): [language(str), genre(str), duration{short, avg, long}, year(int)]
POST[tv] /api/tv Search TV shows with params (at least 1): [language(str), genre(str), duration{short, avg, long}, seasons(int), status{airing, ended}]