Skip to main content

Function: headshotUrl()

headshotUrl(playerId, league, __namedParameters?): string | undefined

Defined in: packages/sdvplot/src/headshots.ts:71

Sync port of _headshots.headshot_url. ESPN ids need no data; gsis ids need await loadGsis() (or preloadAll()) first.

Parameters​

playerId​

Value

league​

"cfb" | "mbb" | "mlb" | "nba" | "nfl" | "nhl" | "wbb" | "wnba"

__namedParameters?​

idSystem?​

HeadshotIdSystem = "espn"

Returns​

string | undefined

Example​

import { headshotUrl } from "@sportsdataverse/sdvplot";

headshotUrl("3139477", "nfl"); // Patrick Mahomes, by ESPN athlete id