martbhell / wasthereannhlgamelastnight

:calendar: A YES/NO app to show the answer to: Was There An NHL Game Yesterday ?
https://wtangy.se
MIT License
3 stars 0 forks source link
nhl

wasthereannhlgameyesterday?

WasThereAnNhlGameYesterday?

GitHub Action Code style: black Twitter

Print YES or NO!

Usage

endpoint function format example admin
/$TEAM YES/NO HTML* RedWings
/$CITYTEAM YES/NO HTML* DetroitRedWings
/$CITY YES/NO HTML* Detroit
/$SHORT YES/NO HTML* DET
/$DATE/$TEAM YES/NO HTML* 20171022/RedWings
/$TEAM/$DATE YES/NO HTML* RedWings/20171111
/get_schedule Print Schedule JSON
/version Print Schedule Update Time JSON/ISODATE { "version": "2018-01-27T08:57:00.372800" }
/menu Present user with a clickable menu HTML menu
/update_schedule Update Schedule 202 on changed Y

* If you use Curl, Wget or Python-Urllib then all you get is YES or NO

You can also add ?JSON in the yes or no parts and you'll get something back in JSON.

Examples

case insensitive:

What do these mean?

There's also:

Features

Why?

So I(author) live in a timezone where the NHL games are often over at 5am in the morning, sometimes they start then. I tend to watch replays. I'm not always sure if there was a game yesterday. Schedules online often have the results, news or "yes, also it went to overtime" to spoil the game.

It would be really nice if I could just browse to $URL/team and it would tell me if my team played yesterday or during Stanley Cup (or regular season) $URL would be enough to just tell me if there was a game at all.

Now there is! :)

How to update the schedule inside the scripts?

The schedule used by this web site is stored in the backend.

As an admin you can update it manually or configure a cronjob. It will send an e-mail with schedule changes outside playoffs.

What about regular season and playoffs?

It also worked for 2020-21 playoffs :)

Currently the script doesn't differentiate between playoffs and regular seasons.

It just takes the dates from NHL.com's API. There are more arguments to this API that I have not found any official documentation for. There is however https://gitlab.com/dword4/nhlapi/-/blob/master/new-api.md great resource by dword4.

TODO / Known issues

Source

gcloud - reminders for myself.

Forked from https://github.com/amanjeev/isitfridaythe13th because it had the google appspot already in it and python :) Thanks! In 2022 this fork was extracted/detached because the upstream Friday 13 had been archived and because one couldn't change pull requests to by default target the wtangy repo.

wasthereannhlgamelastnight(..) has been re-written a few times - it's no longer even close to the isitfridaythe13th, for example: