bttmly / nba

Node.js client for nba.com API endpoints
MIT License
705 stars 175 forks source link

Error: 404 Not Found #114

Open adgarcis opened 5 months ago

adgarcis commented 5 months ago

Hello, good morning. Since yesterday when I try to access the method: NBA.stats.scoreboard({ LeagueID: "00", DayOffset: "0", gameDate: today}); it returns a 404 error. From what I've been looking at, it seems that the official NBA endpoint doesn't currently exist. How can I obtain this information now?

Best regards, and thank you.

adgarcis commented 5 months ago

I have found the solution. Is in package nba-client-template. You need to change in the file nba.json:165

from this:

{
      "name": "scoreboard",
      "url": "http://stats.nba.com/stats/scoreboard",
      "parameters": [
        "LeagueID",
        "DayOffset",
        "gameDate"
      ]
    },

to this:

{
      "name": "scoreboard",
      "url": "http://stats.nba.com/stats/scoreboardv2",
      "parameters": [
        "LeagueID",
        "DayOffset",
        "gameDate"
      ]
    },