Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 2.25 KB

File metadata and controls

72 lines (53 loc) · 2.25 KB

NFL Schedule

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.

Work in Progress

🚧 This project is currently a work in progress. 🚧

Expect frequent changes and updates.
Contributions and feedback are welcome!

To-Do

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

Getting Started

These instructions will the project up and running on your local machine for development and testing purposes.

Prerequisites

Setting Environment Variables

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.

On macOS/Linux

  1. Open a terminal.
  2. Add the following line to your shell configuration file (.bashrc, .zshrc, etc.):
    export NFL_API_KEY=your_api_key_here
  3. Reload the shell configuration:
    source ~/.bashrc  # or source ~/.zshrc

On Windows

  1. Open Command Prompt or PowerShell.
  2. Set the environment variable using the following command:
    setx NFL_API_KEY "your_api_key_here"

Build the project

./gradlew build

Usage

  1. Run the application:
./gradlew bootRun
  1. 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!)