This application provides a REST API to the 2K Admin Database.
This project has zero configuration that you need to set to be able to use it.
The only thing you need to add to the root is an .env
file like the .env.example
filling the keys.
This project also has not one single dependency and there is no need to install anything as it is pure PHP.
php -S 127.0.0.1:8566
The REST API to the app is described below with requests and responses.
This API REST works with JSON
.
The base url for each request will be /2k/api/v2
127.0.0.1:8566/2k/api/v2
POST /login
/2k/api/v2/login/
{
"email": "james@example.com",
"password": "1234"
}
{
"status": "OK",
"message": "Succesful login",
"code": 200,
"token": "$_121545678..."
}
POST /register
/2k/api/v2/register
{
"email": "james@example.com",
"password": "1234",
"passphrase": "random"
}
{
"status": "OK",
"message": "Succesful register",
"code": 200,
"token": "$_121545678..."
}
GET /champions/get/reigns
/champions/get/reigns
{
"status": "success",
"message": "Succesful",
"code": 200,
"reigns": {
"currentSingles": [
{
"championship": string,
"championshipId": string,
"wrestlerId": string,
"championshipImage": url,
"reignId": string,
"reignDays": string,
"brand": string,
"wrestlerName": string,
"wrestlerImage": url,
"overall": string,
"totalDays": string,
"totalReigns": string
},
...
]
}
}