This project was bootstrapped with Node.js
To start with this project, you should first run following command in the project directory to install all necessary dependencies:
npm install
After the installation, in the project directory, you can run:
npm start
Runs the server.
- The url for the API is http://localhost:56789
-
Return an array of teams objects
-
Response body example:
[
{
"teamID": "51",
"teamName": "Qatar",
"country_flag": "https://yans-capstone-backend.herokuapp.com//country_flags/Flag_of_Qatar.svg",
"qualified": "true",
"group": "A",
"position": "1",
"coach": "Felix Sanchez",
"record": "TBD",
"formation": "4-3-3"
}
]
-
Return an array of players objects
-
Response body example:
[
{
"id": "4c5f6961-c694-488f-9d61-2fce9c549b6a",
"No": "1",
"Pos": "GK",
"Player": "Saad Al Sheeb",
"Date-of-Birth": "19 February 1990 (age 32)",
"Caps": "76",
"Goals": "0",
"Club": "Qatar Al-Sadd",
"Country": "Qatar",
"Captain": "0"
},
]
- Return an array of players objects that belong to the given national team
- {teamName} must be swapped out with the actual team name as found in the list of teams
- Change the formation of the given team
- :teamID must be swapped out with numeric id of a team as found in the list of teams
- Put body example
{
"formation": "3-6-1"
}
- Response body example
[
{
"teamID": "51",
"teamName": "Qatar",
"country_flag": "https://yans-capstone-backend.herokuapp.com//country_flags/Flag_of_Qatar.svg",
"qualified": "true",
"group": "A",
"position": "1",
"coach": "Felix Sanchez",
"record": "TBD",
"formation": "3-6-1"
}
]