joshcvt / resetter

Python/Chalice AWS-resident Slackbot for getting sports score/game status resets.
MIT License
1 stars 0 forks source link

resetter

(c) 2016-24 J. W. Crockett, Jr.1, @joshcvt

resetter is a lightweight Python 3.11 Slack bot to fetch game statuses and results. Originally built for Major League Baseball, requesting the targeted team's status from the MLB.com GDX API, it has since been ported to StatsAPI for MLB and can also scrape NHL scores from NHL.com (now via the 2023 NHLE API) and college football scores from ESPN.com. It can post on a schedule to a Slack webhook stored in SSM Parameter Store if you set that up as well. It's built using the Chalice framework.

The code is licensed under the MIT License. The data belongs to its respective league/association owners and/or their licensees.1

To use this:

Testing is league-by-league from your development environment against live data, mostly because the leagues change both their feed spec and some of the data included in it infuriatingly often (varying capitalization of branded arena names is just the tip of the iceberg) such that static test data is of very limited use (and also actual data is all copyright the leagues, and I don't want to tempt the copyright dragons any more than necessary). The test_league.py scripts fire off a varying set of requests for real and non-existent teams, generally for yesterday, today and tomorrow (so you get finished games, potentially in-progress today, and games that haven't started yet).


1. The developer of this application claims no rights to or control over the league/association data sources it targets or the data contained within. Users of this application are themselves solely responsible for assuring that their use of this application, the sources and the data contained within complies with any and all terms and conditions set by the owners of the data sources.