Skip to main content

Function: hockeytechShiftStints()

hockeytechShiftStints(league, gameId): Promise<Row[]>

Defined in: src/analytics/hockeytech_family.ts:104

<lg>_game_shifts (py parse_shifts over the live feed): one row per player-shift stint.

Parameters​

league​

string

HockeyTech league slug from HOCKEYTECH_LEAGUES ('pwhl', 'ahl', 'ohl', ...).

gameId​

GameId

The league's game id (number or string); stamped into game_id.

Returns​

Promise<Row[]>

The parse_shifts rows (game_id, player_id, first_name, last_name, jersey_number, home, period, start_time / end_time / length, start_s / end_s on the countdown clock, goal_on_shift, penalty_on_shift) with every id column as a decimal string. [] for a game whose shift feed is empty or access-denied.

Throws​

AssetFetchError when the fetch fails, the body is unparseable or an error sentinel, or a 200 body lacks the SiteKit.Gameshifts envelope (propagated from the getter / the envelope check). A failed fetch is never reported as an empty game.

Throws​

NoDataError on a 404 (propagated from the getter).

Example​

import sdv from "sportsdataverse";
const stints = await sdv.hockeytech.hockeytech_shift_stints({ league: "pwhl", game_id: 42 });
// or the per-league member: await sdv.hockeytech.pwhl_game_shifts(42)

Remarks​

Ids are converted in place by idColumnsToStrings on the way out (the v4 id rule); the pure frame functions in ./hockeytech.ts still see the raw feed ids. An unknown league slug throws an Error from the HockeyTech runtime's league resolver.