A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
Deploy: Render - https://fvl-api.onrender.com/
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
GET /matchs
Retrieve all Matchs.
Query parameters
populate: Boolean. Example: GET /matchs?populate=trueResponse
[
{
id: 'number',
// If populate truthy, sends team object instead of id
local: 'Team | number',
visitante: 'Team | number',
sets_local: 'number',
sets_visitante: 'number',
},
// ...
];
GET /matchs/:id
Retrieve a single Match data, including teams objects.
Response:
{
"id": "number",
"local": "Team",
"visitante": "Team",
"sets_local": "number",
"sets_visitante": "number"
}
POST /matchs/
Creates a new Match. "Local" and "Visitante" are Team's ID.
Request body:
{
"local": "number",
"visitante": "number",
"sets_local": "number",
"sets_visitante": "number"
}
Response:
{
"id": "number",
"local": "number",
"visitante": "number",
"sets_local": "number",
"sets_visitante": "number"
}
PUT /matchs/:id
Updates an existing Match
Request body:
{
"local": "number",
"visitante": "number",
"sets_local": "number",
"sets_visitante": "number"
}
Response:
{
"id": "number",
"local": "number",
"visitante": "number",
"sets_local": "number",
"sets_visitante": "number"
}
DELETE /matchs/:id
Deletes an existing Match. If successful, no response is sent.
GET /teams
Retrieve all teams.
Response
[
{
id: 'number',
name: 'string',
short_name: 'string',
country: 'string',
location: 'string',
},
// ...
];
GET /teams/:id
Retrieve a single Team data, including an array with Matchs played.
Response:
{
"id": "number",
"name": "string",
"short_name": "string",
"country": "string",
"location": "string",
"matchsLocal": "Match[]",
"matchsVisitante": "Match[]"
}
POST /teams/
Creates a new Team
Request body:
{
"name": "string",
"short_name": "string",
"country": "string",
"location": "string"
}
Response:
{
"id": "number",
"name": "string",
"short_name": "string",
"country": "string",
"location": "string"
}
PUT /teams/:id
Updates an existing Team
Request body:
{
"name": "string",
"short_name": "string",
"country": "string",
"location": "string"
}
Response:
{
"id": "number",
"name": "string",
"short_name": "string",
"country": "string",
"location": "string"
}
DELETE /teams/:id
Deletes an existing Team. If successful, no response is sent.
Nest is MIT licensed.
Content type
Image
Digest
sha256:a4f995bec…
Size
102.2 MB
Last updated
about 3 years ago
docker pull lichodev/fvl-api