Documentation / Inside a game
Periods
GET /v1/games/{game_id}/periodsFree key and up
Goals and shots for each side, period by period, overtime and shootout included.
GET
https://api.icehockeyapi.com/v1/games/{game_id}/periodshttps://api.icehockeyapi.com/v1/games/gm_seyr9d88/periodscurl "https://api.icehockeyapi.com/v1/games/gm_seyr9d88/periods" \ -H "X-API-Key: YOUR_KEY"
200 OKExample answer from the data, 12 Oct
{
"data": [
{
"period": 1,
"kind": "regulation",
"home_goals": 1,
"away_goals": 1,
"home_shots": 5,
"away_shots": 7
},
{
"period": 2,
"kind": "regulation",
"home_goals": 2,
"away_goals": 1,
"home_shots": 10,
"away_shots": 10
},
{
"period": 3,
"kind": "regulation",
"home_goals": 3,
"away_goals": 0,
"home_shots": 10,
"away_shots": 4
}
],
"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 |
|---|---|
period | int |
kind | string |
home_goals | int |
away_goals | int |
home_shots | int |
away_shots | int |