NBA.Stats.ShotChartLineupDetail (nba_api_ex v0.1.0)

View Source

Provides functions to interact with the NBA stats API for ShotChartLineupDetail.

See get/2 for parameter and usage details.

Summary

Functions

get(params \\ [ContextMeasure: "PTS", GROUP_ID: nil, LeagueID: "00", Period: 0, Season: nil, SeasonType: "Regular Season", VsDivision: nil, VsConference: nil, TeamID: 0, SeasonSegment: nil, Outcome: nil, OpponentTeamID: 0, Month: 0, Location: nil, LastNGames: 0, GameSegment: nil, GameID: nil, DateTo: nil, DateFrom: nil, ContextFilter: nil], opts \\ [])

(since 0.1.0)

Fetches ShotChartLineupDetail data.

Parameters

  • params: A keyword list of parameters to filter the data.

    • ContextMeasure: (Required) The context measure.

      • Type(s): String
      • Example: ContextMeasure: "PTS"
      • Default: "PTS"
      • Valueset:
        • "PTS"
        • "FGM"
        • "FGA"
        • "FG_PCT"
        • "FG3M"
        • "FG3A"
        • "FG3_PCT"
        • "FTM"
        • "FTA"
        • "OREB"
        • "DREB"
        • "AST"
        • "FGM_AST"
        • "FG3_AST"
        • "STL"
        • "BLK"
        • "BLKA"
        • "TOV"
        • "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_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"
    • GROUP_ID: (Required) The lineup group ID.

      • Type(s): String
      • Example: GROUP_ID: "1610612737 - 201939 - 202691 - 203507 - 203954"
      • Default: nil
    • Season: (Required) The season.

      • Type(s): String
      • Example: Season: "2024-25"
      • Default: nil
    • ContextFilter: The context filter.

      • Type(s): String
      • Example: ContextFilter: ""
      • Default: nil
    • DateFrom: The start date (YYYY-MM-DD).

      • Type(s): String
      • Example: DateFrom: "2025-01-01"
      • Default: nil
    • DateTo: The end date (YYYY-MM-DD).

      • Type(s): String
      • Example: DateTo: "2025-03-01"
      • Default: nil
    • GameID: The game ID. 10-digit string or nil.

      • Type(s): String
      • Example: GameID: "0022100001"
      • Default: nil
    • GameSegment: The game segment.

      • Type(s): String
      • Example: GameSegment: "First Half"
      • Default: nil
      • Valueset:
        • "First Half"
        • "Overtime"
        • "Second Half"
    • LastNGames: The number of last games to include.

      • Type(s): Integer
      • Example: LastNGames: 0
      • Default: nil
    • LeagueID: The league ID. Defaults to "00" (NBA). Not required.

      • Type(s): String
      • Example: LeagueID: "00"
      • Default: "00"
    • Location: The game location.

      • Type(s): String
      • Example: Location: "Home"
      • Default: nil
      • Valueset:
        • "Home"
        • "Road"
    • Month: The month (1-12, 0 for all).

      • Type(s): Integer
      • Example: Month: 0
      • Default: nil
    • OpponentTeamID: The opponent team ID.

      • Type(s): Integer | String

      • Example: OpponentTeamID: 1610612737
      • Default: nil
    • Outcome: The game outcome.

      • Type(s): String
      • Example: Outcome: "W"
      • Default: nil
      • Valueset:
        • "W"
        • "L"
    • Period: The period (0 for all).

      • Type(s): Integer
      • Example: Period: 0
      • Default: 0
    • SeasonSegment: The season segment.

      • Type(s): String
      • Example: SeasonSegment: "Pre All-Star"
      • Default: nil
      • Valueset:
        • "Post All-Star"
        • "Pre All-Star"
    • SeasonType: The season type.

      • Type(s): String
      • Example: SeasonType: "Regular Season"
      • Default: "Regular Season"
      • Valueset:
        • "Regular Season"
        • "Pre Season"
        • "Playoffs"
        • "All Star"
    • TeamID: The team ID.

    • VsConference: The opposing conference.

      • Type(s): String
      • Example: VsConference: "West"
      • Default: nil
      • Valueset:
        • "East"
        • "West"
    • VsDivision: The opposing division.

      • Type(s): String
      • Example: VsDivision: "Pacific"
      • Default: nil
      • Valueset:
        • "Atlantic"
        • "Central"
        • "Northwest"
        • "Pacific"
        • "Southeast"
        • "Southwest"
        • "East"
        • "West"
  • opts: A keyword list of additional options for the request, such as headers or timeout settings.

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.ShotChartLineupDetail.get(ContextMeasure: "PTS", GROUP_ID: "1610612737 - 201939 - 202691 - 203507 - 203954", Season: "2024-25")
{:ok, %{"ShotChartLineupDetail" => [%{...}, ...]}}

get!(params \\ [], opts \\ [])

(since 0.1.0)