fewieden / MMM-NHL

National Hockey League Module for MagicMirror²
MIT License
10 stars 11 forks source link

The NHL api used by the plugin has been deprecated #56

Open jmslocum opened 5 months ago

jmslocum commented 5 months ago

Platform (Hardware/OS): Linux, Raspberry Pi 3B+

Node version: v20.12.2

MagicMirror² version: 2.27.0

Module version: Mainline (newest)

Description of the issue:

0|mm  | [2024-05-27 08:54:00.637] [ERROR] (node:13439) UnhandledPromiseRejectionWarning: FetchError: request to https://statsapi.web.nhl.com/api/v1/tournaments/playoffs?expand=round.series failed, reason: getaddrinfo ENOTFOUND statsapi.web.nhl.com
0|mm  |     at ClientRequest.<anonymous> (/home/james/Projects/MagicMirror/modules/MMM-NHL/node_modules/node-fetch/lib/index.js:1491:11)
0|mm  |     at ClientRequest.emit (node:events:514:28)
0|mm  |     at TLSSocket.socketErrorListener (node:_http_client:495:9)
0|mm  |     at TLSSocket.emit (node:events:514:28)
0|mm  |     at emitErrorNT (node:internal/streams/destroy:151:8)
0|mm  |     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
0|mm  |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
0|mm  | (Use `electron --trace-warnings ...` to show where the warning was created) 
0|mm  | [2024-05-27 08:54:00.638] [ERROR] (node:13439) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4) 

The statsapi.web.nhl.com API has been deprecated, and removed. The new api is at https://api-web.nhle.com/v1/schedule/

The module needs to be updated to support the new API, since the old one is now broken and games no longer update.

RuleSkillful5 commented 2 months ago

any updates on fixing this :) thank you