Quickstart
Issue a key and make your first request.
1. Issue a key
Sign in, open your account’s API page, name a key, and issue it. The key starts with hck_. It is shown once: copy it somewhere safe. You can hold three at a time and revoke any of them from the same page.
2. Ask for the standings
Send the key in the x-api-key header:
curl -H "x-api-key: hck_…" https://hockay.com/api/v1/standings
Every answer is JSON. What you asked for is under data:
{
"data": [
{
"teamId": "mtl",
"wins": 12,
"losses": 4,
"overtimeLosses": 1,
"points": 25,
"rank": 1,
"conferenceRank": 1
}
]
}
Teams are ids. Fetch /teams once and keep it: it changes when the league does, not when a game ends.
3. Follow a game
List tonight’s live games, then read a game’s events as they air:
curl -H "x-api-key: hck_…" "https://hockay.com/api/v1/games?status=live"
curl -H "x-api-key: hck_…" https://hockay.com/api/v1/games/S04D05-MTL-ANC/events
To poll, pass the last event you have as after, and only what aired since comes back:
curl -H "x-api-key: hck_…" \
"https://hockay.com/api/v1/games/S04D05-MTL-ANC/events?after=evt_…"
Once the game is final, /boxscore and /commentary open.
Next
- Responses: pages, caching, and ids.
- Limits: how many requests a minute.
- The API reference lists every endpoint and field, and can run requests with your key.