Function: resolve()
resolve<
T>(values,league,opts?):Promise<Resolved<T>>
Defined in: packages/sdvplot/src/resolve.ts:218
Resolve team values (abbreviations, ids, names) to ESPN team ids, loading the league first. Unknown values give
undefined and one warning per call; strict: true throws UnresolvedTeamError.
Type Parameters
T
T extends Value | readonly Value[]
Parameters
values
T
league
"aaf" | "ahl" | "ajhl" | "bchl" | "cchl" | "cebl" | "cfb" | "cfl" | "chl" | "cricket" | "easl" | "echl" | "f1" | "fiba" | "gojhl" | "iihf" | "kijhl" | "lba" | "mbb" | "mhl" | "milb" | "mjhl" | "mlb" | "nba" | "nbagl" | "nbl" | "ncaa_baseball" | "ncaa_mhockey" | "ncaa_softball" | "ncaa_whockey" | "nfl" | "nhl" | "nojhl" | "ohl" | "ojhl" | "phf" | "pwhl" | "qmjhl" | "sjhl" | "soccer" | "sphl" | "ufl" | "usfl" | "ushl" | "vijhl" | "wbb" | "whl" | "wnba" | "xfl"
opts?
ResolveOptions = {}
Returns
Promise<Resolved<T>>
Example
import { resolve } from "@sportsdataverse/sdvplot";
await resolve(["KC", "Kansas City Chiefs", "OAK"], "nfl", { season: 2019 });