I like the NFL 🏈
I am trying to learn Kotlin 👨🏼💻
This project combines the two! It is a simple Spring application that calls an API and returns the next NFL game of the selected team.
🚧 This project is currently a work in progress. 🚧
Expect frequent changes and updates.
Contributions and feedback are welcome!
- Tests!
- Error handling
- Logic to get the season year (using current year won't work in Jan/Feb)
- An endpoint to return a map of the team codes
- More features?
These instructions will the project up and running on your local machine for development and testing purposes.
- Java Development Kit (JDK) 17 or higher: https://www.oracle.com/uk/java/technologies/downloads/#java17
- Gradle Build Tool: https://gradle.org/install/ (Or use your IDE's integrated Gradle support)
- Git: https://git-scm.com/ (If you're cloning the repository)
The application requires an environment variable for the NFL API key. To obtain this, you will need to subscribe to
the Tank01 NFL Live In-Game Real Time Statistics NFL
on Rapid API
Follow the instructions below to set the environment variable on your operating system.
- Open a terminal.
- Add the following line to your shell configuration file (
.bashrc,.zshrc, etc.):export NFL_API_KEY=your_api_key_here - Reload the shell configuration:
source ~/.bashrc # or source ~/.zshrc
- Open Command Prompt or PowerShell.
- Set the environment variable using the following command:
setx NFL_API_KEY "your_api_key_here"
./gradlew build
- Run the application:
./gradlew bootRun
- Access the application:
Open your web browser and navigate to http://localhost:8080?team=<TEAM_CODE>
eg. http://localhost:8080?team=ATL (for the mighty Falcons!)