NBA.Stats.LeagueDashTeamShotLocations (nba_api_ex v0.1.0)
View SourceProvides functions to interact with the NBA stats API for league dash team shot locations stats.
See get/2 for parameter and usage details.
Summary
Functions
Fetches league dash team shot locations stats data.
Functions
Fetches league dash team shot locations stats 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
- Type(s):
DistanceRange: The distance range for shots.- Type(s):
String - Example:
DistanceRange: "By Zone" - Default:
"By Zone" - Valueset:
- "By Zone"
- "Less Than 8 ft."
- "8-16 ft."
- "16-24 ft."
- "24+ ft."
- "Backcourt"
- Type(s):
PerMode: How stats are aggregated.- Type(s):
String - Example:
PerMode: "PerGame" - Default:
"PerGame" - Valueset:
- "Totals"
- "PerGame"
- "Per48"
- "Per40"
- "Per36"
- "PerMinute"
- "PerPossession"
- "PerPlay"
- "Per100Possessions"
- "Per100Plays"
- Type(s):
MeasureType: The type of measure to return.- Type(s):
String - Example:
MeasureType: "Base" - Default:
"Base" - Valueset:
- "Base"
- "Advanced"
- "Misc"
- "Four Factors"
- "Scoring"
- "Opponent"
- "Usage"
- Type(s):
PlusMinus: Whether to include plus/minus splits.- Type(s):
String - Example:
PlusMinus: "Y" - Default:
"Y" - Valueset:
- "Y"
- "N"
- Type(s):
PaceAdjust: Whether to adjust stats for pace.- Type(s):
String - Example:
PaceAdjust: "Y" - Default:
"Y" - Valueset:
- "Y"
- "N"
- Type(s):
Rank: Whether to include team rank.- Type(s):
String - Example:
Rank: "Y" - Default:
"Y" - Valueset:
- "Y"
- "N"
- Type(s):
LeagueID: The league ID ("00" for NBA, "20" for G-League).- Type(s):
String - Example:
LeagueID: "00" - Default:
"00" - Valueset:
- "00"
- "20"
- Type(s):
SeasonType: The type of season.- Type(s):
String - Example:
SeasonType: "Regular Season" - Default:
"Regular Season" - Valueset:
- "Regular Season"
- "Pre Season"
- "Playoffs"
- "All Star"
- Type(s):
PORound: Playoff round (0 for regular season).- Type(s):
Integer - Example:
PORound: 0 - Default:
0
- Type(s):
Month: Month filter (0 for all months).- Type(s):
Integer - Example:
Month: 0 - Default:
0
- Type(s):
OpponentTeamID: Opponent team ID (0 for all teams).TeamID: Team ID (0 for all teams).Period: Period filter (0 for all periods).- Type(s):
Integer - Example:
Period: 0 - Default:
0
- Type(s):
LastNGames: Number of most recent games to include (0 for all).- Type(s):
Integer - Example:
LastNGames: 0 - Default:
0
- Type(s):
Conference: Conference filter ("East", "West", or empty for all).- Type(s):
String - Example:
Conference: "East" - Default:
"" - Valueset:
- "East"
- "West"
- "" (all)
- Type(s):
Division: Division filter (e.g., "Atlantic", "Central", "Northwest", etc.).- Type(s):
String - Example:
Division: "Atlantic" - Default:
""
- Type(s):
GameScope: Game scope (e.g., "Season", "Last 10", "Yesterday").- Type(s):
String - Example:
GameScope: "Season" - Default:
""
- Type(s):
GameSegment: Game segment ("First Half", "Second Half", "Overtime", or empty).- Type(s):
String - Example:
GameSegment: "First Half" - Default:
"" - Valueset:
- "First Half"
- "Second Half"
- "Overtime"
- "" (all)
- Type(s):
DateFrom: Start date filter (format: "MM/DD/YYYY").- Type(s):
String - Example:
DateFrom: "01/01/2024" - Default:
""
- Type(s):
DateTo: End date filter (format: "MM/DD/YYYY").- Type(s):
String - Example:
DateTo: "01/31/2024" - Default:
""
- Type(s):
Location: Game location ("Home", "Road", or empty for all).- Type(s):
String - Example:
Location: "Home" - Default:
"" - Valueset:
- "Home"
- "Road"
- "" (all)
- Type(s):
Outcome: Game outcome ("W", "L", or empty for all).- Type(s):
String - Example:
Outcome: "W" - Default:
"" - Valueset:
- "W"
- "L"
- "" (all)
- Type(s):
SeasonSegment: Season segment ("Post All-Star", "Pre All-Star", or empty).- Type(s):
String - Example:
SeasonSegment: "Post All-Star" - Default:
"" - Valueset:
- "Post All-Star"
- "Pre All-Star"
- "" (all)
- Type(s):
StarterBench: Filter by starters or bench ("Starters", "Bench", or empty).- Type(s):
String - Example:
StarterBench: "Starters" - Default:
"" - Valueset:
- "Starters"
- "Bench"
- "" (all)
- Type(s):
VsConference: Opponent conference filter ("East", "West", or empty).- Type(s):
String - Example:
VsConference: "West" - Default:
"" - Valueset:
- "East"
- "West"
- "" (all)
- Type(s):
VsDivision: Opponent division filter (e.g., "Atlantic", "Central", etc., or empty).- Type(s):
String - Example:
VsDivision: "Central" - Default:
""
- 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.LeagueDashTeamShotLocations.get(Season: "2024-25")
{:ok, %{"LeagueDashTeamShotLocations" => [%{...}, ...]}}