NBA.Stats.VideoDetailsAsset (nba_api_ex v0.1.0)
View SourceProvides functions to interact with the NBA stats API for VideoDetailsAsset.
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, AheadBehind: nil, ClutchTime: nil, ContextFilter: nil, DateFrom: nil, DateTo: nil, EndPeriod: nil, EndRange: nil, GameID: nil, GameSegment: nil, LeagueID: "00", Location: nil, Outcome: nil, PointDiff: nil, Position: nil, RangeType: nil, RookieYear: nil, SeasonSegment: nil, StartPeriod: nil, StartRange: nil, VsConference: nil, VsDivision: nil], opts \\ [])
(since 0.1.0)Fetches VideoDetailsAsset data.
Parameters
params: A keyword list of parameters to filter the data.ContextMeasure: (Required) The context measure.- Type(s):
String - 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):
LastNGames: (Required) Number of last games to include.- Type(s):
Integer - Default:
0
- Type(s):
Month: (Required) The month (1-12, 0 for all).- Type(s):
Integer - Default:
0
- Type(s):
OpponentTeamID: (Required) The opponent team ID.- Type(s):
Integer - Default:
0
- Type(s):
Period: (Required) The period (0 for all).- Type(s):
Integer - Default:
0
- Type(s):
PlayerID: (Required) The player ID.- Type(s):
Integer - Default:
nil
- Type(s):
Season: (Required) The season.- Type(s):
String - Default:
nil
- Type(s):
SeasonType: (Required) The season type.- Type(s):
String - Default:
"Regular Season" - Valueset:
"Regular Season""Pre Season""Playoffs""All Star"
- Type(s):
TeamID: (Required) The team ID.- Type(s):
Integer - Default:
nil
- Type(s):
AheadBehind: The ahead/behind context.- Type(s):
String - Default:
nil
- Type(s):
ClutchTime: The clutch time.- Type(s):
String - Default:
nil
- Type(s):
ContextFilter: The context filter.- Type(s):
String - Default:
nil
- Type(s):
DateFrom: The start date (YYYY-MM-DD).- Type(s):
String - Default:
nil
- Type(s):
DateTo: The end date (YYYY-MM-DD).- Type(s):
String - Default:
nil
- Type(s):
EndPeriod: The end period.- Type(s):
Integer - Default:
nil
- Type(s):
EndRange: The end range.- Type(s):
Integer - Default:
nil
- Type(s):
GameID: The game ID. 10-digit string or nil.- Type(s):
String - Default:
nil
- Type(s):
GameSegment: The game segment.- Type(s):
String - Default:
nil
- Type(s):
LeagueID: The league ID.- Type(s):
String - Default:
"00"
- Type(s):
Location: The game location.- Type(s):
String - Default:
nil - Valueset:
"Home""Road"
- Type(s):
Outcome: The game outcome.- Type(s):
String - Default:
nil - Valueset:
"W""L"
- Type(s):
PointDiff: The point differential.- Type(s):
Integer - Default:
nil
- Type(s):
Position: The position.- Type(s):
String - Default:
nil
- Type(s):
RangeType: The range type.- Type(s):
Integer - Default:
nil
- Type(s):
RookieYear: The rookie year.- Type(s):
String - Default:
nil
- Type(s):
SeasonSegment: The season segment.- Type(s):
String - Default:
nil - Valueset:
"Post All-Star""Pre All-Star"
- Type(s):
StartPeriod: The start period.- Type(s):
Integer - Default:
nil
- Type(s):
StartRange: The start range.- Type(s):
Integer - Default:
nil
- Type(s):
VsConference: The opposing conference.- Type(s):
String - Default:
nil - Valueset:
"East""West"
- Type(s):
VsDivision: The opposing division.- Type(s):
String - Default:
nil - Valueset:
"Atlantic""Central""Northwest""Pacific""Southeast""Southwest""East""West"
- 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.VideoDetailsAsset.get(PlayerID: 201939, Season: "2024-25", ContextMeasure: "FGM", LastNGames: 0, Month: 0, OpponentTeamID: 1610612737, Period: 0, SeasonType: "Regular Season", TeamID: 1610612744)
{:ok, %{"VideoDetailsAsset" => [%{...}, ...]}}