This Project is developed using Django and Django REST Framework . Additional requirements are included in requirement.txt file for interaction with www.omdbapi.com api.
Also change the OMDB_API_KEY in the settings.py
Clone repository and got to project's root directory afterwards follow steps:
-
Activate python virtual environment
source /path/to/local/env
-
Install requirements
pip install -r requirements.txt
-
Make Migrations
Currently sqllite3 database is used, you can change it according to your convenience.
python manage.py makemigrations
python manage.py migrate
-
Run server
python manage.py runserver
Shows you the list of all the movies in the local database.
Fetches movie data from external api and save it in to the local database.
Required Headers:
Content-Type: application/json
Required json body fields:
title
{
"title": "movie name"
}
Deletes movie from local database or updates content of that movie in local database.
movies/published_year/year/ eg: movies/published_year/2007/
This will return all the movies published in the year 2007.
movies/ratings/rating/ eg: movies/ratings/8/
This will return all the movies having ratings equal to or greater than 8.
movies/genres/genre/ eg: movies/genres/comedy/
This will return all the movies whose genre has comedy in it.