bradford-hamilton / stats-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MLB logo

Welcome to the MLB stats api 👋

Using go version 1.20 Go Report Card godoc License: MIT

Run Application

go mod download
go run cmd/server/main.go

Run Tests

go test ./...

Build and Push Dockerfile

docker build -t {dockerhub_user}/stats-api .
docker push {dockerhub_user}/stats-api:latest

Usage

Currently the only supported API call is a GET to /api/v1/schedule which accepts two query params date (required) and teamID (optional) where date is in YYYY-MM-DD format and teamID is a number/int.

Local Example:

http://127.0.0.1:4000/api/v1/schedule?date=2022-07-21&teamID=147

Live Example:

http://134.209.123.132:4000/api/v1/schedule?date=2022-07-21&teamID=147

Take Home Notes

notes.txt

About

License:MIT License


Languages

Language:Go 98.2%Language:Dockerfile 1.8%