NBA.Stats.VideoDetails (nba_api_ex v0.1.0)
View SourceProvides functions to interact with the NBA stats API for VideoDetails.
See get/2 for parameter and usage details.
Summary
Functions
get(params \\ [ContextMeasure: "FGM", LastNGames: 0, Month: 0, OpponentTeamID: 0, Period: 0, PlayerID: nil, Season: nil, SeasonType: "Regular Season", TeamID: nil, VsDivision: nil, VsConference: nil, StartRange: nil, StartPeriod: nil, SeasonSegment: nil, RookieYear: nil, RangeType: nil, Position: nil, PointDiff: nil, Outcome: nil, Location: nil, LeagueID: "00", GameSegment: nil, GameID: nil, EndRange: nil, EndPeriod: nil, DateTo: nil, DateFrom: nil, ContextFilter: nil, ClutchTime: nil, AheadBehind: nil], opts \\ [])
(since 0.1.0)Fetches VideoDetails data.
Parameters
params: A keyword list of parameters to filter the data.PlayerID: (Required) The player ID.Season: (Required) The season.- Type(s):
String - Example:
Season: "2024-25" - Default:
nil
- Type(s):
AheadBehind: The ahead/behind context.- Type(s):
String - Example:
AheadBehind: "Ahead or Tied" - Default:
nil
- Type(s):
ClutchTime: The clutch time.- Type(s):
String - Example:
ClutchTime: "Last 5 Minutes" - Default:
nil
- Type(s):
ContextFilter: The context filter.- Type(s):
String - Example:
ContextFilter: "" - Default:
nil
- Type(s):
ContextMeasure: The context measure.- Type(s):
String - Example:
ContextMeasure: "FGM" - Default:
"FGM" - Valueset:
"FGM""FGA""FG_PCT""FG3M""FG3A""FG3_PCT""FTM""FTA""OREB""DREB""AST""FGM_AST""FG3_AST""STL""BLK""BLKA""TOV""PF""PFD""POSS_END_FT""PTS_PAINT""PTS_FB""PTS_OFF_TOV""PTS_2ND_CHANCE""REB""TM_FGM""TM_FGA""TM_FG3M""TM_FG3A""TM_FTM""TM_FTA""TM_OREB""TM_DREB""TM_REB""TM_TEAM_REB""TM_AST""TM_STL""TM_BLK""TM_BLKA""TM_TOV""TM_TEAM_TOV""TM_PF""TM_PFD""TM_PTS""TM_PTS_PAINT""TM_PTS_FB""TM_PTS_OFF_TOV""TM_PTS_2ND_CHANCE""TM_FGM_AST""TM_FG3_AST""TM_POSS_END_FT""OPP_FGM""OPP_FGA""OPP_FG3M""OPP_FG3A""OPP_FTM""OPP_FTA""OPP_OREB""OPP_DREB""OPP_REB""OPP_TEAM_REB""OPP_AST""OPP_STL""OPP_BLK""OPP_BLKA""OPP_TOV""OPP_TEAM_TOV""OPP_PF""OPP_PFD""OPP_PTS""OPP_PTS_PAINT""OPP_PTS_FB""OPP_PTS_OFF_TOV""OPP_PTS_2ND_CHANCE""OPP_FGM_AST""OPP_FG3_AST""OPP_POSS_END_FT""PTS"
- Type(s):
DateFrom: The start date (YYYY-MM-DD).- Type(s):
String - Example:
DateFrom: "2025-01-01" - Default:
nil
- Type(s):
DateTo: The end date (YYYY-MM-DD).- Type(s):
String - Example:
DateTo: "2025-03-01" - Default:
nil
- Type(s):
EndPeriod: The end period.- Type(s):
Integer - Example:
EndPeriod: 4 - Default:
nil
- Type(s):
EndRange: The end range.GameID: The game ID. 10-digit string or nil.- Type(s):
String - Example:
GameID: "0022100001" - Default:
nil
- Type(s):
GameSegment: The game segment.- Type(s):
String - Example:
GameSegment: "First Half" - Default:
nil
- Type(s):
LastNGames: Number of last games to include.- Type(s):
Integer - Example:
LastNGames: 0 - Default:
0
- Type(s):
LeagueID: The league ID.- Type(s):
String - Example:
LeagueID: "00" - Default:
"00"
- Type(s):
Location: The game location.- Type(s):
String - Example:
Location: "Home" - Default:
nil
- Type(s):
Month: The month (1-12, 0 for all).- Type(s):
Integer - Example:
Month: 0 - Default:
0
- Type(s):
OpponentTeamID: The opponent team ID.Outcome: The game outcome.- Type(s):
String - Example:
Outcome: "W" - Default:
nil
- Type(s):
Period: The period (0 for all).- Type(s):
Integer - Example:
Period: 0 - Default:
0
- Type(s):
PlayerPosition: The player position.- Type(s):
String - Example:
PlayerPosition: "Guard" - Default:
nil
- Type(s):
PointDiff: The point differential.Position: The position.- Type(s):
String - Example:
Position: "Guard" - Default:
nil
- Type(s):
RangeType: The range type.RookieYear: The rookie year.- Type(s):
String - Example:
RookieYear: "2019" - Default:
nil
- Type(s):
SeasonSegment: The season segment.- Type(s):
String - Example:
SeasonSegment: "Pre All-Star" - Default:
nil
- Type(s):
SeasonType: The season type.- Type(s):
String - Example:
SeasonType: "Regular Season" - Default:
"Regular Season"
- Type(s):
StartPeriod: The start period.- Type(s):
Integer - Example:
StartPeriod: 1 - Default:
nil
- Type(s):
StartRange: The start range.TeamID: The team ID.VsConference: The opposing conference.- Type(s):
String - Example:
VsConference: "West" - Default:
nil
- Type(s):
VsDivision: The opposing division.- Type(s):
String - Example:
VsDivision: "Pacific" - Default:
nil
- 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.VideoDetails.get(PlayerID: 201939, Season: "2024-25")
{:ok, %{"VideoDetails" => [%{...}, ...]}}