NBA.Stats.LeagueDashLineups (nba_api_ex v0.1.0)
View SourceProvides functions to interact with the NBA stats API for league dash lineups.
Summary
Functions
Fetches league lineup data.
Parameters
params: A keyword list of parameters to filter the data.Conference: The conference of the team.- Type(s):
String - Example:
Conference: "West"(Western Conference) - Default:
nil(no specific conference) - Valueset:
"East"(Eastern Conference)"West"(Western Conference)
- Type(s):
DateFrom: The start date for filtering.- Type(s):
String - Example:
DateFrom: "2023-10-01"(October 1, 2023) - Default:
nil(no start date)
- Type(s):
DateTo: The end date for filtering.- Type(s):
String - Example:
DateTo: "2024-04-15"(April 15, 2024) - Default:
nil(no end date)
- Type(s):
Division: The division of the team.- Type(s):
String - Example:
Division: "Pacific"(Pacific Division) - Default:
nil(no specific division) - Valueset:
"Atlantic"(Atlantic Division)"Central"(Central Division)"Southeast"(Southeast Division)"Northwest"(Northwest Division)"Pacific"(Pacific Division)"Southwest"(Southwest Division)
- Type(s):
GameSegment: The segment of the game.- Type(s):
String - Example:
GameSegment: "First Half"(first half of the game) - Default:
nil(no specific segment) - Valueset:
"First Half"(First half of the game)"Second Half"(Second half of the game)"Overtime"(Overtime periods)
- Type(s):
GroupQuantity: The number of players in the lineup.- Type(s):
Integer - Example:
GroupQuantity: 5(5-player lineups) - Default:
5(default to 5-player lineups)
- Type(s):
ISTRound: The round of the IST.- Type(s):
String - Example:
ISTRound: "All IST"(all IST rounds) - Default:
nil(no specific round) - Valueset:
"All IST"(All IST rounds)"Group Play"(Group stage)"Knockout - All"(Knockout stage)"Knockout Round - Quarter"(Quarterfinals of the knockout stage)"Knockout Round - Semi"(Semifinals of the knockout stage)"Knockout Round - Championship"(Finals of the knockout stage)"Group Play - East Group A"(Group A of the Eastern Conference)"Group Play - East Group B"(Group B of the Eastern Conference)"Group Play - East Group C"(Group C of the Eastern Conference)"Group Play - West Group A"(Group A of the Western Conference)"Group Play - West Group B"(Group B of the Western Conference)"Group Play - West Group C"(Group C of the Western Conference)
- Type(s):
LastNGames: The number of last games to consider.- Type(s):
Integer - Example:
LastNGames: 5(last 5 games) - Default:
0(all games)
- Type(s):
LeagueID: The league ID.- Type(s):
String - Example:
LeagueID: "10"(for WNBA) - Default:
"00"(NBA) - Valueset:
"00"(NBA)"01"(ABA)"10"(WNBA)"20"(G-League)
- Type(s):
Location: The location of the game.- Type(s):
String - Example:
Location: "Home"(home games only) - Default:
nil(no specific location) - Valueset:
"Home"(Home games)"Away"(Away games)
- Type(s):
MeasureType: Type of measures.- Type(s):
String - Example:
MeasureType: "Advanced" - Default:
"Base" - Valueset:
"Base"(Basic stats)"Advanced"(Advanced stats)"Scoring"(Scoring stats)"Misc"(Miscellaneous stats)"FourFactors"(Four factors stats)"Defense"(Defensive stats)"Usage"(Usage stats)
- Type(s):
Month: The month of the season.- Type(s):
Integer - Example:
Month: 1(January) - Default:
0(all months)
- Type(s):
OpponentTeamID: The ID of the opponent team.Outcome: The outcome of the game.- Type(s):
String - Example:
Outcome: "W"(wins only) - Default:
nil(no specific outcome) - Valueset:
"W"(Wins)"L"(Losses)"All"(All games)
- Type(s):
PORound: The playoff round.- Type(s):
Integer - Example:
PORound: 1(first round) - Default:
0(not applicable)
- Type(s):
PaceAdjust: Whether to adjust stats for pace.- Type(s):
String - Example:
PaceAdjust: "Y" - Default:
"N" - Valueset:
"Y"(Adjust for pace)"N"(Do not adjust for pace)
- Type(s):
PerMode: How stats are aggregated.- Type(s):
String - Example:
PerMode: "PerGame" - Default:
"Totals" - Valueset:
"Totals"(Total stats)"PerGame"(Per game stats)"MinutesPer"(Minutes per stats)"Per48"(Per 48 minutes stats)"Per40"(Per 40 minutes stats)"Per36"(Per 36 minutes stats)"PerMinute"(Per minute stats)"PerPossession"(Per possession stats)"PerPlay"(Per play stats)"Per100Possessions"(Per 100 possessions stats)"Per100Plays"(Per 100 plays stats)
- Type(s):
Period: The period of the game.- Type(s):
Integer - Example:
Period: 1(first period) - Default:
0(all periods)
- Type(s):
PlusMinus: Whether to include plus/minus stats.- Type(s):
String - Example:
PlusMinus: "Y" - Default:
"N" - Valueset:
"Y"(Include plus/minus)"N"(Exclude plus/minus)
- Type(s):
Rank: Whether to include rank in stats.- Type(s):
String - Example:
Rank: "Y" - Default:
"N" - Valueset:
"Y"(Include rank)"N"(Do not include rank)
- Type(s):
Season: (Required) The season for which to fetch data.- Type(s):
String - Example:
Season: "2023-24" - Default:
"2023-24"(current season)
- Type(s):
SeasonSegment: The segment of the season.- Type(s):
String - Example:
SeasonSegment: "Post All Star" - Default:
nil(no specific segment) - Valueset:
"Pre All Star"(Before All-Star break)"Post All Star"(After All-Star break)
- Type(s):
SeasonType: The type of season.- Type(s):
String - Example:
SeasonType: "Playoffs" - Default:
"Regular Season" - Valueset:
"Regular Season"(Regular season)"Playoffs"(Playoffs)"Pre Season"(Pre-season)"All Star"(All-Star game)"Play In"(Play-In tournament)"NBA Cup"(NBA Cup)
- Type(s):
ShotClockRange: The range of the shot clock.- Type(s):
String - Example:
ShotClockRange: "14-24"(shots taken with 14-24 seconds left) - Default:
nil(no specific range) - Valueset:
"0-14"(Shots taken with 0-14 seconds left)"14-24"(Shots taken with 14-24 seconds left)"24+"(Shots taken with more than 24 seconds left)
- Type(s):
TeamID: The ID of the team.VsConference: The conference of the opponent.- Type(s):
String - Example:
VsConference: "East"(Eastern Conference) - Default:
nil(no specific conference) - Valueset:
"East"(Eastern Conference)"West"(Western Conference)
- Type(s):
VsDivision: The division of the opponent.- Type(s):
String - Example:
VsDivision: "Central"(Central Division) - Default:
nil(no specific division) - Valueset:
"Atlantic"(Atlantic Division)"Central"(Central Division)"Southeast"(Southeast Division)"Northwest"(Northwest Division)"Pacific"(Pacific Division)"Southwest"(Southwest Division)
- 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.LeagueDashLineups.get(Season: "2023-24")
{:ok, %{"Lineups" => [%{...}, ...]}}