Documentation / Inside a game
Penalties
GET /v1/games/{game_id}/penaltiesLive and up
Every penalty in order: period, time, side, player, who drew it, minutes, kind and offence.
GET
https://api.icehockeyapi.com/v1/games/{game_id}/penaltieshttps://api.icehockeyapi.com/v1/games/gm_seyr9d88/penaltiescurl "https://api.icehockeyapi.com/v1/games/gm_seyr9d88/penalties" \ -H "X-API-Key: YOUR_KEY"
200 OKExample answer from the data, 12 Oct
{
"data": [
{
"number": 1,
"period": 1,
"time_seconds": 885,
"side": "home",
"player": {
"id": "pl_9phqbmpc",
"name": "Mika Zibanejad"
},
"drawn_by": {
"id": "pl_fpkynced",
"name": "Elias Pettersson"
},
"minutes": 2,
"kind": "minor",
"offence": "interference"
},
{
"number": 2,
"period": 2,
"time_seconds": 923,
"side": "away",
"player": {
"id": "pl_wr9e9aq0",
"name": "Guillaume Brisebois"
},
"drawn_by": {
"id": "pl_hrj96gn4",
"name": "Noah Laba"
},
"minutes": 2,
"kind": "minor",
"offence": "holding"
},
{
"number": 3,
"period": 2,
"time_seconds": 1157,
"side": "away",
"player": {
"id": "pl_v38bhy6z",
"name": "Brock Boeser"
},
"drawn_by": {
"id": "pl_ayhqj0q8",
"name": "Marcus Pettersson"
},
"minutes": 2,
"kind": "minor",
"offence": "tripping"
}
],
"meta": {
"game_id": "gm_seyr9d88",
"count": 3,
"detail": true,
"plan": "Complete"
}
}Run works once the API is live; the code above works now.
Parameters
| Name | In | Type | What it does |
|---|---|---|---|
game_id required | path | id | A game, from /v1/games. |
Returns
| Field | Type |
|---|---|
number | int |
period | int |
time_seconds | int |
side | string |
player | object |
player.id | string |
player.name | string |
drawn_by | object |
drawn_by.id | string |
drawn_by.name | string |
minutes | int |
kind | string |
offence | string |