Language | Javascript (NodeJS) |
Framework | ExpressJS |
Database | MySQL |
Database Name | football_manager |
$ npm install
$ node server.js
Base Url: http://localhost:3000
manager registration
headers: {
Content-Type: 'application/x-www-form-urlencoded'
}
body: {
email: '',
name: ''
password: '',
confirmPassword: ''
}
Success Response: 200
Error Response: 400
manager login
headers: {
Content-Type: application/x-www-form-urlencoded
}
body: {
email: '',
password: ''
}
Success Response: 200
{
access_token: '',
payLoad: {}
}
Error Response: 401
get current logged in managers team list
headers: {
Content-Type: 'application/x-www-form-urlencoded',
access_token: ''
}
Success Response: 200
[]
Error Response: 401
create a team
headers: {
Content-Type: 'application/x-www-form-urlencoded',
access_token: ''
}
body: {
name: '',
origin: '',
net_worth: ''
}
Success Response: 200
Error Response: 400
get a specific team details
headers: {
Content-Type: 'application/x-www-form-urlencoded',
access_token: ''
}
Success Response: 200
{}
Error Response: 400
get a specific team's player list
headers: {
Content-Type: 'application/x-www-form-urlencoded',
access_token: ''
}
Success Response: 200
[]
Error Response: 400
get a specific team's player details
headers: {
Content-Type: 'application/x-www-form-urlencoded',
access_token: ''
}
Success Response: 200
{}
Error Response: 400
add a player to a team
headers: {
Content-Type: 'application/x-www-form-urlencoded',
access_token: ''
}
body: {
name: '',
position: '',
rating: '',
salary: ''
}
Success Response: 200
Error Response: 400
detele a player from a team
headers: {
Content-Type: 'application/x-www-form-urlencoded',
access_token: ''
}
Success Response: 200
Error Response: 400
update a player info of a team
headers: {
Content-Type: 'application/x-www-form-urlencoded',
access_token: ''
}
body: {
position: '',
rating: '',
salary: ''
}
Success Response: 200
Error Response: 400