Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Giveaways and takeaways #10

Open
camarguin opened this issue Jan 24, 2024 · 4 comments
Open

Giveaways and takeaways #10

camarguin opened this issue Jan 24, 2024 · 4 comments

Comments

@camarguin
Copy link

in the old api we had Giveaways and takeaways from each player per game. It seems I can't see it anymore through the box score or other place other than play-by-play. is it still a working progress to be easier to get the giveaways and takeaways like?

{
            "playerId": 8479996,
            "sweaterNumber": 8,
            "name": {
              "default": "C. Glass"
            },
            "position": "C",
            "goals": 0,
            "assists": 0,
            "points": 0,
            "plusMinus": 0,
            "pim": 0,
            "hits": 1,
            "giveaways": 1, <-- this
            "takeaways": 0, <-- this
            ...
}

Thank you

@timo-eloranta
Copy link

Interesting. Odd that those fields have been left out. The boxscore endpoint does however include gameReports section, from where one can find a link to eventSummary, e.g. https://www.nhl.com/scores/htmlreports/20232024/ES020601.HTM. As you can see, this file is unfortunately in HTML (instead of JSON), but it DOES include the giveaways (GV) and the takeaways (TK).

@minter
Copy link

minter commented Jan 28, 2024

They're available at the team level on the landing URL (in-game and postgame) if that's helpful

URL: https://api-web.nhle.com/v1/gamecenter/2023020763/landing

Data:

    "teamGameStats": [
      {
        "category": "sog",
        "awayValue": "33",
        "homeValue": "31"
      },
      {
        "category": "faceoffPctg",
        "awayValue": "49.1",
        "homeValue": "50.9"
      },
      {
        "category": "powerPlay",
        "awayValue": "0/1",
        "homeValue": "1/6"
      },
      {
        "category": "pim",
        "awayValue": "12",
        "homeValue": "2"
      },
      {
        "category": "hits",
        "awayValue": "20",
        "homeValue": "24"
      },
      {
        "category": "blockedShots",
        "awayValue": "13",
        "homeValue": "9"
      },
      {
        "category": "giveaways",
        "awayValue": "3",
        "homeValue": "4"
      },
      {
        "category": "takeaways",
        "awayValue": "10",
        "homeValue": "10"
      }
    ],

@camarguin
Copy link
Author

Interesting. Odd that those fields have been left out. The boxscore endpoint does however include gameReports section, from where one can find a link to eventSummary, e.g. https://www.nhl.com/scores/htmlreports/20232024/ES020601.HTM. As you can see, this file is unfortunately in HTML (instead of JSON), but it DOES include the giveaways (GV) and the takeaways (TK).

Yes, I was hoping they could bring those fields in JSON instead HTML. Let's see if they bring some updates in the future. Thanks for mentioning about the report tho. I did not see it clear before your mention

@camarguin
Copy link
Author

They're available at the team level on the landing URL (in-game and postgame) if that's helpful

URL: https://api-web.nhle.com/v1/gamecenter/2023020763/landing

Data:

    "teamGameStats": [
      {
        "category": "sog",
        "awayValue": "33",
        "homeValue": "31"
      },
      {
        "category": "faceoffPctg",
        "awayValue": "49.1",
        "homeValue": "50.9"
      },
      {
        "category": "powerPlay",
        "awayValue": "0/1",
        "homeValue": "1/6"
      },
      {
        "category": "pim",
        "awayValue": "12",
        "homeValue": "2"
      },
      {
        "category": "hits",
        "awayValue": "20",
        "homeValue": "24"
      },
      {
        "category": "blockedShots",
        "awayValue": "13",
        "homeValue": "9"
      },
      {
        "category": "giveaways",
        "awayValue": "3",
        "homeValue": "4"
      },
      {
        "category": "takeaways",
        "awayValue": "10",
        "homeValue": "10"
      }
    ],

I was actually looking for those data being available for each player instead of the whole team like the old api. But Thanks for commenting about the /landing url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants