ephro / nhl-notifier

IFTTT webhook trigger for NHL scores and power plays
GNU General Public License v3.0
30 stars 28 forks source link

nhl api broken #5

Open Psybernaut opened 1 year ago

Psybernaut commented 1 year ago

Looks like the api link is no longer working https://statsapi.web.nhl.com/api/v1/schedule?expand=schedule.linescore

I think there's an alternative, but I can't seem to find the right syntax. https://api-web.nhle.com/v1/schedule/2023-11-20

It also seems to want a date, but that may just be me not knowing enough. This might be helpful...https://github.com/ma-barbour/nhl_api_functions

sirpeep commented 10 months ago

Bump, this would be a pretty big fix

ephro commented 9 months ago

just pushed an update. Only two games today so it's hard to test it all, but let me know if you find anything. It looks like it's working so far.

Power plays could be broken

Psybernaut commented 9 months ago

Awesome! I'll check it once there's a Bruins game on.

On Mon, 5 Feb 2024, 8:24 pm ephro, @.***> wrote:

just pushed an update. Only two games today so it's hard to test it all, but let me know if you find anything. It looks like it's working so far.

Power plays could be broken

— Reply to this email directly, view it on GitHub https://github.com/ephro/nhl-notifier/issues/5#issuecomment-1928606474, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYCMZ7W33LVWJRELRN7G63YSGA6RAVCNFSM6AAAAAA7TPPYE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRYGYYDMNBXGQ . You are receiving this because you authored the thread.Message ID: @.***>

Psybernaut commented 9 months ago

Welp, it looks like the IFTTT Webhooks option is now only a Pro feature. Since I don't have a Pro account I can't test it.

ephro commented 9 months ago

Do you have some other endpoint you want to hit?

On Tue, Feb 6, 2024 at 4:26 PM Gabriel Maung @.***> wrote:

Welp, it looks like the IFTTT Webhooks option is now only a Pro feature. Since I don't have a Pro account I can't test it.

— Reply to this email directly, view it on GitHub https://github.com/ephro/nhl-notifier/issues/5#issuecomment-1931015000, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN7ZIWGFKAFJ5KDYLTTBDDYSLC3FAVCNFSM6AAAAAA7TPPYE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZRGAYTKMBQGA . You are receiving this because you commented.Message ID: @.***>

Psybernaut commented 9 months ago

I'm not sure what you mean by endpoint. I was using the code to activate my nanoleaf lights when a goal is scored. I managed to use the app notification on my phone to activate them, but it only works if my phone is in use so not ideal. If there's an alternative to IFTTT then I'd use that.

sirpeep commented 9 months ago

If there's an alternative to IFTTT then I'd use that.

What I would do is use home assistant, it can be kinda hard to setup but it works great and have had no issues so far. It has webhooks built-in. Or you can try zapier but it might cost money.

ephro commented 9 months ago

Yeah, I have Home Assistant too, and have been thinking of using it as in input. What do you run HA on? Would a repo where you could run it on the same server work for you?

On Thu, Feb 8, 2024 at 1:29 PM Peep @.***> wrote:

If there's an alternative to IFTTT then I'd use that.

What I would do is use home assistant, it can be kinda hard to setup but it works great and have had no issues so far. It has webhooks built-in. Or you can try zapier but it might cost money.

— Reply to this email directly, view it on GitHub https://github.com/ephro/nhl-notifier/issues/5#issuecomment-1934962359, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN7ZIS2UJASDQPI2YJHWDTYSU7TFAVCNFSM6AAAAAA7TPPYE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUHE3DEMZVHE . You are receiving this because you commented.Message ID: @.***>

BigGreenEgger commented 9 months ago

Hi guys. I've been tinkering with the code for a bit. I will upload my version shortly. It is working for goal and power play notifications but there are a few minor bugs. I have LIFX bulbs so I called their API directly because I didn't want to pay the monthly fee for IFTTT either. I've stubbed the IFTTT calls so you can still use the code if you want. I haven't coded in years so please be kind :)

Psybernaut commented 9 months ago

I'll probably setup Home Assistant at some point, but way too busy too get that running now. A repo on the same server might work for me.

sirpeep commented 9 months ago

What do you run HA on?

I run it on a oracle cloud VM for free, they give you a 1GB ram lifetime VM. I use it with the rest commands integration to allow for direct communication with the Govee API.

BigGreenEgger commented 9 months ago

Just uploaded my forked code. Supports LIFX bulbs and works for goals and power plays. @ephro Have a look and see what you think. I documented a few minor issues and the delay code was giving me errors. Comments in the code as well. Hope this helps and someone can modify this to use something more generic than specific LIFX API calls. IFTTT code is still stubbed if people want to use it. Enjoy!