SRAPI
SRAPI is a Go-based API for the Sports Reference network of websites.
Current Version: 0.2.2 (Pre-Release)
Master |
Develop |
|
|
Installation
Clone Repo
git clone git@github.com:mtslzr/srapi
cd srapi
Dependencies
NOTE: Database filename is currently hard-coded. This will change in the future.
cat srapi.sql | sqlite3 srapi.db
Build
go build -v --mod=vendor
Usage
Run
go run -v ./...
Starting server on localhost:5000...
Executable
./srapi
Starting server on localhost:5000...
Endpoints
Get Standings
Returns current standings. Requires two-letter ID for sport (e.g. bs
for baseball).
GET /{sport}/standings
Get Teams
Returns all current teams. Requires two-letter ID for sport (e.g. bs
for baseball).
GET /{sport}/teams
Get Years
Returns all available years. Requires two-letter ID for sport (e.g. bs
for baseball).
GET /{sport}/years
Contribution
Testing
go test -v --mod=vendor ./...
Deployment
Coming soon...