Hoops Helper is a console application that retrieves a variety of NBA data, it is designed to be particularly useful for fantasy basketball.
The application is meant to be a resource that provides all the data necessary for making fantasy basketball decisions, rather than being an application that makes recommendations/decisions for you. The aim is to provide insights and statistics that may ordinarily require multiple sources to collect, and make them all conveniently queryable via one simple console application. What you do with the information up to you, savvy manager (and isn't that half the fun, after all).
The application is currently in very early stages, with relatively few features, more features will become available in the coming weeks and months.
- Display player statistics (major stat categories) for all games of a given date in the current NBA season, including:
- Player fantasy points1
- Injured and inactive players
- Display player statistics for previous X games of a given team
- Display statistics for the previous X games of a given player
- Valuable insights on team schedules
- Teams that play few/many games in a given week
- Teams with back to backs
- Connection to your specific fantasy league
- Insights/filtered searches of available players
In order for the application to work, you will need to create a free account with the BALLDONTLIE API and obtain your personal API key (this is where the application fetches its NBA data). Once you do this, you'll have to create an environment variable on your machine titled 'NBA_API_KEY'.
- Navigate to 'Advanced System Settings' via 'Control Panel > System' or 'Settings > System > About'.
- Select 'Environment Variables'
- Under 'System Variables' select 'New'
- Name the new variable 'NBA_API_KEY' with a value of your personal API key
- Verify your environment variable by launching a CMD session and executing
echo %NBA_API_KEY
. Your API key should be displayed to you.
- Open ~/.bashrc in a text editor
- At the bottom of the file add the following:
export NBA_API_KEY=[YOUR_KEY]
replacing [YOUR_KEY] with your personal API key. - Save changes to the file
- Run the following command in terminal
source ~/.bash-profile
- Verify your environment variable by executing
echo $NBA_API_KEY
. Your API key should be displayed to you.
Hoops Helper has not yet been released as a standalone executable. For now the application must be built from source as follows:
Prerequisites: .NET 8.0+ which can be installed here.
The following steps should be executed within a command line environment.
Step 1: Clone the repository: git clone https://github.com/noahmacaskill/HoopsHelper
Step 2: Navigate to the project directory.
Step 3: Build the application: dotnet build
Step 4: Run the application: dotnet run
And you should be good to go!
For help with using the application, simply type '--help' or '-h'. The help option can be called on any command for more information on its usage:
The stats command generates player data, including major stat categories and fantasy points, given a specific date, team, or player. A subcommand of stats must be specified, one of date, player or team2.
Date: stats date [DATE]
provides player data for all games played on the given date.
E.g. stats date jan1
. Many date formats are accepted.
The pretty, well structured outputs, as well as the handling of user arguments were made possible by Spectre.Console. All NBA data is retrieved using the BALLDONTLIE API.
Thank you to them both for making this project possible!