This service simulates basketball games with real-time score updates and provides RESTful APIs to retrieve game simulations, schedules, team standings, and player statistics.
- Game Simulation: Simulate basketball games in a fast-forwarded real-time manner, reflecting each game's progress and final results.
- Schedule Retrieval: Retrieve game schedules for specific weeks.
- Team Standings: Access current team standings.
- Player Statistics: Get detailed statistics for each player.
- Go (Version 1.20 or later)
- PostgreSQL- for storing game, team, and player data
Clone the repository:
git clone
cd nba
make build
make run
or
docker compose up
-
Description: Initiates a simulation of all games scheduled for the given week, resulting in real-time score updates and changes to the game, team, and player statistics.
-
Payload Parameters:
week
: The week number to simulate games for.
Initiates the simulation process for all games in the specified week. This endpoint creates or modifies resources representing the games' outcomes and should be used to trigger a new simulation.
Query Parameters:
week
: The week number to retrieve the schedule for.
Description: Retrieves the game schedule for the specified week.
Query Parameters:
sort
: Send spesific sort parameter for a lose and win field example: lose.asc Description: Retrieves the current standings of all teams, sorted by wins and other criteria.
Description: Provides detailed statistics for each player, including points, attempts, and other relevant metrics.