This is a simple rest api that allows you to retrieve the top 25 NBA players. Full CRUD functionality is available.
Clone the repo and install the dependencies
git clone https://github.com/tyelf22/restAPI-NodeJS.git
cd restAPI-NodeJS.git
npm install
npm start
https://te-restapi.herokuapp.com/
GET /
return the welcome page
welcome to my rest api
GET /players
returns top 25 current NBA players
array of objects containing all players
{
"firstname": "lebron",
"lastname": "james",
"team": "lakers"
}
POST /player
creates new player object
new created player objects
{
"firstname": "lebron",
"lastname": "james",
"team": "lakers"
}
GET /players/team/{team}
gets all of the players by team name
all player objects with specified team name
{
"firstname": "lebron",
"lastname": "james",
"team": "lakers"
}
GET /player/{id}
gets player by player id
player object by id
{
"firstname": "lebron",
"lastname": "james",
"team": "lakers"
}
PUT /player/{id}
edit player name or team by id
edited player object
{
"firstname": "lebron",
"lastname": "james",
"team": "lakers"
}
DELETE /player/{id}
delete player by id
deleted player object
{
"firstname": "lebron",
"lastname": "james",
"team": "lakers"
}