An API that allows users to create, view and update their list of favourite movies!
URL Endpoint | HTTP Methods | Summary |
---|---|---|
/api/v1/auth/register |
POST |
Register a new user |
/api/v1/auth/login |
POST |
Login and retrieve token |
/api/v1/movie/search?movie_name={{movie_name}} |
GET |
Search for a movie by its name |
/api/v1/movie/add |
POST |
Add a movie to the favourite movies list |
/api/v1/movie/favourites |
GET |
Retrieve all movies in favourite movies list |
/api/v1/movie/delete?id={{movie_id}} |
DELETE |
Delete a movie in the favourite movies list |
/api/v1/user/update |
PUT |
Update the logged in user's username |
Python (3.7) Flask (1.0.2)
-
create a working directory
$ mkdir -p work-dir $ cd workdir
-
clone this repo to local
-
Via SSH
git clone git@github.com:jonathankamau/MovieBuff-API.git
-
via HTTPS
git clone https://github.com/jonathankamau/MovieBuff-API.git
-
-
Navigate to project directory
$ cd MovieBuff-API $ git checkout develop
-
Run the following commmand:
$ python manage.py runserver
This command creates a docker instance for the postgres database as well as for the API and runs the server as well.
Open your browser to http://127.0.0.1:5000/ and you should see the browsable version of the API You can access the api online as well via this link http://movie-buff-api.herokuapp.com/
-
Running tests
Run the following command in order to run tests:
$ python manage.py test
- Jonathan Kamau - Github Profile
This project is licensed under the MIT License.