API that provides data for Marvel movies and series. There are around 30+ data in the form of titles, posters, release years, trailers, release dates, durations, genres, directors, authors, actors, plots and download links via torrent.
- Clone this repository
- Run this command to import database structure:
php artisan migrate
- Run this command to start the server:
php artisan serve
- Method:
POST
- URL Patterns:
/api/register
- Authetication:
false
- Body:
{ "name": Varchar, "email": Varchar, "password": Varchar }
- Usage:
curl -X POST \ -d '{ "name": "name", "email": "email", "password": "password" }' \ URL_Patterns
- Response:
- Success: (200)
{ "message": "Register successfull" "token": String "token_type": "Bearer" }
- Errors: (404)
{ "message": "Error" }
- Success: (200)
- Method:
POST
- URL Patterns:
/api/#
- Authetication:
false
- Body:
{ "email": Varchar, "password": Varchar }
- Usage:
curl -X POST \ -d '{ "email": "email", "password": "password" }' \ URL_Patterns
- Response:
- Success: (200)
{ "message": "Login successfull" "token": String "token_type": "Bearer" }
- Errors: (404)
{ "message": "Error" }
- Success: (200)
- Method:
GET
- URL Patterns:
/api/movies?title={title}&page={page}&limit={limit}
- Authentication:
false
- Params:
title or page or limit
- Usage:
curl -X GET URL_Patterns
- Response:
- Success: (200)
{ "status": "Success", "data": [ { "current_page": 1, "data": [ { "id": BigInt, "title": Varchar, "poster": Varchar, "year": Year, "plot": Varchar }, ] } }
- Errors: (404)
{ "message": "Data failed to get" }
- Success: (200)
- Method:
GET
- URL Patterns:
/api/movies/{id}
- Authentication:
false
- Usage:
curl -X GET URL_Patterns
- Response:
- Success: (200)
{ "status": "Success", "data": { "title": Varchar, "poster": Varchar, "year": Year, "trailer": Varchar, "released": Varchar, "runtime": Varchar, "genre": Varchar, "director": Varchar, "writer": Varchar, "actors": Varchar, "plot": Varchar, "torrent": Text }, }
- Errors: (404)
{ "message": "Data failed to get" }
- Success: (200)
- Method:
POST
- URL Patterns:
/api/movies
- Authetication:
true
- Body:
{ "title": Varchar, "year": Varchar, "trailer": Varchar, "torrent": text, }
- Usage:
curl -X POST \ -H "Authorization: Bearer <ACCESS_TOKEN>" -d '{ "title": "title", "year": "year", "trailer": "trailer", "torrent": "torrent" }' \ URL_Patterns
- Response:
- Success: (200)
{ "status": "Success", "message": "Data stored successfully", "data": { "title": Varchar, "poster": Varchar, "year": Year, "trailer": Varchar, "released": Varchar, "runtime": Varchar, "genre": Varchar, "director": Varchar, "writer": Varchar, "actors": Varchar, "plot": Varchar, "torrent": Text, "update_at": Date, "created_at": Date, "id": BigInt, }, }
- Errors: (404)
{ "message": "Error" }
- Success: (200)
- Method:
DELETE
- URL Patterns:
/api/movies/{id}
- Authetication:
true
- Usage:
curl -X POST \ -H "Authorization: Bearer <ACCESS_TOKEN>" \ URL_Patterns
- Response:
- Success: (200)
{ "status": "Success", "message": "Data deleted successfully", }
- Errors: (404)
{ "message": "Error" }
- Success: (200)