NBA.Stats.MatchupsRollup (nba_api_ex v0.1.0)
View SourceProvides functions to interact with the NBA stats API for MatchupsRollup.
See get/2 for parameter and usage details.
Summary
Functions
Fetches MatchupsRollup data.
Parameters
params: A keyword list of parameters to filter the data.Season: (Required) The season for which to fetch data.- Type(s):
String - Example:
Season: "2024-25" - Default:
nil - Pattern:
^(\d{4}-\d{2})$
- Type(s):
DefPlayerID: Defensive player ID.DefTeamID: Defensive team ID.LeagueID: The league ID.- Type(s):
String - Example:
LeagueID: "00" - Default:
"00" - Valueset:
"00"(NBA)"01"(ABA)"10"(WNBA)"20"(G League)
- Type(s):
OffPlayerID: Offensive player ID.OffTeamID: Offensive team ID.PerMode: How to aggregate stats.- Type(s):
String - Example:
PerMode: "Totals" - Default:
nil - Valueset:
"Totals""PerGame"
- Type(s):
SeasonType: The type of season.- Type(s):
String - Example:
SeasonType: "Regular Season" - Default:
"Regular Season" - Valueset:
"Regular Season""Pre Season""Playoffs""Pre-Season"
- Type(s):
opts: A keyword list of additional options for the request, such as headers or timeout settings.- For a full list of options, see the Req documentation.
Returns
{:ok, data}: On success, returns the data from the API.{:error, reason}: On failure, returns an error tuple with the reason.
Example
iex> NBA.Stats.MatchupsRollup.get(LeagueID: "00", PerMode: "Totals", Season: "2024-25", SeasonType: "Regular Season")
{:ok, %{"MatchupsRollup" => [%{...}, ...]}}