This api is intended to store and view data related to olympic games.
- A get-all matches feature;
- Filtering by sport is allowed too;
- They're ordered by match start date!
- When adding a new game, it must check for:
- Required fields;
- Matches having at least 30 minutes;
- Every location must have just 4 matches for a day;
- A match must not be added (saved, scheduled) in the same day, location and sport on an existing match with same conditions;
Use the package manager npm to install it.
npm install
curl --location --request GET 'http://localhost:3000/v1/match?sport=soccer' \
--data-raw ''
curl --location --request POST 'http://localhost:3000/v1/match' \
--header 'Content-Type: application/json' \
--data-raw '{
"sport": "Soccer",
"location": "Aflitos",
"teamA": "Brazil",
"teamB": "Brazil",
"matchStart": "2021-06-01 11:47:30.120Z",
"matchEnd": "2021-06-01 12:30:30.120Z",
"stage": "semifinal"
}'
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.