API to create and manage movie lists
- clone repository using command
git clone https://github.com/Megxos/mimovies-api.git cd mimovies-apito change directory into cloned folder- run
npm installto install all dependencies cp sample.env .envto copy enviroment variables fromsample.envinto a new file called.env- finally run
npm startornpm run devto start the developement server
Authentication is by an access token which is required for even API call.
To authenticate your request, pass your access token (which is shown on registration and login) as part of the headers: access-token
e.g curl -get https://mimovies-api.herokuapp.com/movies -H "access-token: youraccesstoken"
-
[POST]
/register- endpoint to register a new user account.- Body
usernamepassword
- Body
-
[POST]
/login- endpoint to log into user account.- Body
usernamepassword
- Body
-
[GET]
/movies- get list of random 200 movies. -
[GET]
/movies/list- get all user lists -
[POST]
/movies/list/new- create a new movie list- Body
list_name
- Body
-
[POST]
/movies/list/movie- add a movie to a list- Body
list_name(required)title(required)genre(optional)rating(optional)year(optional)
- Body
-
[PUT]
/movies/list/movie/update/{movie_id}- update movie details such as rating- Params
movie_id
- Body
- value(s) to update (rating, title, year, or genre)
- Params
-
[DELETE] -
/movies/list/movie/delete/{movie_id}- remove a movie from list- Params
movie_id
- Params