Git Product home page Git Product logo

nba's Introduction

Basketball Game Simulation Service

This service simulates basketball games with real-time score updates and provides RESTful APIs to retrieve game simulations, schedules, team standings, and player statistics.

Features

  • 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.

Getting Started

Prerequisites

  • Go (Version 1.20 or later)
  • PostgreSQL- for storing game, team, and player data

Installation

Clone the repository:

git clone
cd nba
make build
make run

or

docker compose up

API Endpoints

Simulate Games: POST /v1/games/simulation

  • 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.


2. Retrieve Schedule: GET /v1/games

Query Parameters:

  • week: The week number to retrieve the schedule for.

Description: Retrieves the game schedule for the specified week.


3. Team Standings: GET /v1/teams

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.

4. Player Statistics: GET /v1/players

Description: Provides detailed statistics for each player, including points, attempts, and other relevant metrics.

nba's People

Contributors

svbnbyrk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.