NBA.Stats.TeamDashLineups (nba_api_ex v0.1.0)

View Source

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

See get/2 for parameter and usage details.

Summary

Functions

get(params \\ [GroupQuantity: 5, LastNGames: 0, MeasureType: "Base", Month: 0, OpponentTeamID: 0, PaceAdjust: "N", PerMode: "PerGame", Period: 0, PlusMinus: "N", Rank: "N", Season: nil, SeasonType: "Regular Season", TeamID: nil, VsDivision: nil, VsConference: nil, ShotClockRange: nil, SeasonSegment: nil, PORound: nil, Outcome: nil, Location: nil, LeagueID: "00", GameSegment: nil, GameID: nil, DateTo: nil, DateFrom: nil], opts \\ [])

(since 0.1.0)

Fetches TeamDashLineups data.

Parameters

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

    • GroupQuantity: (Required) The number of players in the lineup group.

    • Season: (Required) The season.

    • TeamID: (Required) The team ID.

    • DateFrom: The start date (YYYY-MM-DD).

    • DateTo: The end date (YYYY-MM-DD).

    • GameID: The game ID. 10-digit string or nil.

    • GameSegment: The game segment.

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

    • LeagueID: The league ID.

    • Location: The game location.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "Home"
        • "Road"
    • MeasureType: The measure type.

      • Type(s): String
      • Default: "Base"
      • Valueset:
        • "Base"
        • "Advanced"
        • "Misc"
        • "Four Factors"
        • "Scoring"
        • "Opponent"
        • "Usage"
        • "Defense"
    • Month: The month (1-12, 0 for all).

    • OpponentTeamID: The opponent team ID.

    • Outcome: The game outcome.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "W"
        • "L"
    • PaceAdjust: Whether to adjust for pace.

      • Type(s): String
      • Default: "N"
      • Valueset:
        • "Y"
        • "N"
    • PerMode: The per mode.

      • Type(s): String
      • Default: "PerGame"
      • Valueset:
        • "Totals"
        • "PerGame"
        • "MinutesPer"
        • "Per48"
        • "Per40"
        • "Per36"
        • "PerMinute"
        • "PerPossession"
        • "PerPlay"
        • "Per100Possessions"
        • "Per100Plays"
    • Period: The period (0 for all).

    • PlusMinus: Whether to include plus/minus.

      • Type(s): String
      • Default: "N"
      • Valueset:
        • "Y"
        • "N"
    • PORound: The playoff round (if applicable, else nil).

    • Rank: Whether to include rank.

      • Type(s): String
      • Default: "N"
      • Valueset:
        • "Y"
        • "N"
    • SeasonSegment: The segment of the season.

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

      • Type(s): String
      • Default: "Regular Season"
      • Valueset:
        • "Regular Season"
        • "Pre Season"
        • "Playoffs"
        • "All Star"
    • ShotClockRange: The shot clock range.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "24-22"
        • "22-18 Very Early"
        • "18-15 Early"
        • "15-7 Average"
        • "7-4 Late"
        • "4-0 Very Late"
        • "ShotClock Off"
    • VsConference: The opposing conference.

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

      • Type(s): String
      • 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.TeamDashLineups.get(GroupQuantity: 5, LastNGames: 0, MeasureType: "Base", Month: 0, OpponentTeamID: 1610612737, PaceAdjust: "N", PerMode: "PerGame", Period: 0, PlusMinus: "N", Rank: "N", Season: "2024-25", SeasonType: "Regular Season", TeamID: 1610612744)
{:ok, %{"TeamDashLineups" => [%{...}, ...]}}

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

(since 0.1.0)