NBA.Stats.LeagueDashTeamPtShot (nba_api_ex v0.1.0)
View SourceProvides access to team and opponent player tracking shot data from the NBA stats API.
Summary
Functions
Fetches team or opponent player tracking shot data.
Functions
Fetches team or opponent player tracking shot data.
Parameters
type: The type of data to fetch.:teamfor team data.:oppfor opponent data.
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
- Type(s):
PerMode: How stats are aggregated.- Type(s):
String - Example:
PerMode: "Totals" - Default:
"Totals" - Valueset:
- "Totals"
- "PerGame"
- "Per48"
- "Per40"
- "Per36"
- "PerMinute"
- "PerPossession"
- "PerPlay"
- "Per100Possessions"
- "Per100Plays"
- Type(s):
LeagueID: The league ID.- Type(s):
String - Example:
LeagueID: "00" - Default:
"00" - Valueset:
- "00"
- "10"
- "20"
- Type(s):
SeasonType: The type of season.- Type(s):
String - Example:
SeasonType: "Playoffs" - Default:
"Regular Season" - Valueset:
- "Regular Season"
- "Playoffs"
- "Pre Season"
- "All Star"
- "Play In"
- Type(s):
VsDivision: The division of the opponent.- Type(s):
String - Example:
VsDivision: "Central" - Default:
nil - Valueset:
- "Atlantic"
- "Central"
- "Southeast"
- "Northwest"
- "Pacific"
- "Southwest"
- Type(s):
VsConference: The conference of the opponent.- Type(s):
String - Example:
VsConference: "East" - Default:
nil - Valueset:
- "East"
- "West"
- Type(s):
TouchTimeRange: The touch time range for filtering.- Type(s):
String - Example:
TouchTimeRange: "Touch < 2 Seconds" - Default:
nil - Valueset:
- "Touch < 2 Seconds"
- "Touch 2-6 Seconds"
- "Touch 6+ Seconds"
- Type(s):
TeamID: The NBA team ID (use0for league-wide).ShotDistRange: The shot distance range.- Type(s):
String - Example:
ShotDistRange: "8-16 ft." - Default:
nil - Valueset:
- "Less Than 8 ft."
- "8-16 ft."
- "16-24 ft."
- "24+ ft."
- "Backcourt"
- Type(s):
ShotClockRange: The range of the shot clock.- Type(s):
String - Example:
ShotClockRange: "24+" - Default:
nil - Valueset:
- "24+"
- "22-18"
- "15-7"
- "4-0"
- "NA"
- Type(s):
SeasonSegment: The segment of the season.- Type(s):
String - Example:
SeasonSegment: "Post All Star" - Default:
nil - Valueset:
- "Pre All Star"
- "Post All Star"
- Type(s):
Period: The period of the game.- Type(s):
Integer - Example:
Period: 1 - Default:
0
- Type(s):
PORound: The playoff round.- Type(s):
Integer - Example:
PORound: 1 - Default:
0
- Type(s):
Outcome: The outcome of the game.- Type(s):
String - Example:
Outcome: "W" - Default:
nil - Valueset:
- "W"
- "L"
- Type(s):
OpponentTeamID: The ID of the opponent team.Month: The month of the season.- Type(s):
Integer - Example:
Month: 1 - Default:
0
- Type(s):
Location: The location of the game.- Type(s):
String - Example:
Location: "Home" - Default:
nil - Valueset:
- "Home"
- "Away"
- Type(s):
LastNGames: The number of last games to consider.- Type(s):
Integer - Example:
LastNGames: 5 - Default:
0
- Type(s):
ISTRound: The round of the In-Season Tournament.- Type(s):
String - Example:
ISTRound: "All IST" - Default:
nil
- Type(s):
GeneralRange: The general range for filtering.- Type(s):
String - Example:
GeneralRange: "Overall" - Default:
"Overall" - Valueset:
- "Overall"
- "Catch and Shoot"
- "Pull Up"
- "Less Than 10 ft."
- "10-16 ft."
- "16-24 ft."
- "24+ ft."
- Type(s):
GameSegment: The segment of the game.- Type(s):
String - Example:
GameSegment: "First Half" - Default:
nil - Valueset:
- "First Half"
- "Second Half"
- "Overtime"
- Type(s):
DribbleRange: The dribble range for filtering.- Type(s):
String - Example:
DribbleRange: "0 Dribbles" - Default:
nil - Valueset:
- "0 Dribbles"
- "1 Dribble"
- "2 Dribbles"
- "3-6 Dribbles"
- "7+ Dribbles"
- Type(s):
Division: The division of the team.- Type(s):
String - Example:
Division: "Pacific" - Default:
nil - Valueset:
- "Atlantic"
- "Central"
- "Southeast"
- "Northwest"
- "Pacific"
- "Southwest"
- Type(s):
DateTo: The end date for filtering.- Type(s):
String - Example:
DateTo: "2024-04-15" - Default:
nil
- Type(s):
DateFrom: The start date for filtering.- Type(s):
String - Example:
DateFrom: "2023-10-01" - Default:
nil
- Type(s):
Conference: The conference of the team.- Type(s):
String - Example:
Conference: "West" - Default:
nil - Valueset:
- "East"
- "West"
- Type(s):
CloseDefDistRange: The defender distance range.- Type(s):
String - Example:
CloseDefDistRange: "0-2 Feet" - Default:
nil - Valueset:
- "0-2 Feet"
- "2-4 Feet"
- "4-6 Feet"
- "6+ Feet"
- 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.LeagueDashTeamPtShot.get(:team, Season: "2024-25")
{:ok, %{"LeagueDashTeamPtShot" => [%{...}, ...]}}