NBA.Stats.LeagueDashTeamClutch (nba_api_ex v0.1.0)

View Source

Provides functions to interact with the NBA stats API for league dash team clutch stats.

See get/2 for parameter and usage details.

Summary

Functions

get(params \\ [MeasureType: "Base", PerMode: "PerGame", PlusMinus: "Y", PaceAdjust: "Y", Rank: "Y", LeagueID: "00", SeasonType: "Regular Season", PORound: 0, Month: 0, OpponentTeamID: 0, TeamID: 0, Period: 0, LastNGames: 0, ClutchTime: "Last 5 Minutes", AheadBehind: "Ahead or Behind", PointDiff: 5], opts \\ [])

(since 0.1.0)

Fetches league dash team clutch 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
    • ClutchTime: The clutch time window.

      • Type(s): String
      • Example: ClutchTime: "Last 5 Minutes"
      • Default: "Last 5 Minutes"
      • Valueset:
        • "Last 5 Minutes"
        • "Last 4 Minutes"
        • "Last 3 Minutes"
        • "Last 2 Minutes"
        • "Last 1 Minute"
        • "Last 30 Seconds"
        • "Last 10 Seconds"
    • AheadBehind: The score situation.

      • Type(s): String
      • Example: AheadBehind: "Ahead or Behind"
      • Default: "Ahead or Behind"
      • Valueset:
        • "Ahead or Behind"
        • "Ahead or Tied"
        • "Behind or Tied"
        • "Ahead"
        • "Behind"
        • "Tied"
    • PointDiff: The point differential for clutch.

      • Type(s): Integer
      • Example: PointDiff: 5
      • Default: 5
    • MeasureType: The type of measure.

      • Type(s): String
      • Example: MeasureType: "Base"
      • Default: "Base"
      • Valueset:
        • "Base"
        • "Advanced"
        • "Misc"
        • "Four Factors"
        • "Scoring"
        • "Opponent"
        • "Usage"
    • PerMode: How stats are aggregated.

      • Type(s): String
      • Example: PerMode: "PerGame"
      • Default: "PerGame"
      • Valueset:
        • "Totals"
        • "PerGame"
        • "Per48"
        • "Per40"
        • "Per36"
        • "PerMinute"
        • "PerPossession"
        • "PerPlay"
        • "Per100Possessions"
        • "Per100Plays"
    • PlusMinus: Whether to include plus/minus stats.

      • Type(s): String
      • Example: PlusMinus: "Y"
      • Default: "Y"
      • Valueset:
        • "Y"
        • "N"
    • PaceAdjust: Whether to adjust for pace.

      • Type(s): String
      • Example: PaceAdjust: "Y"
      • Default: "Y"
      • Valueset:
        • "Y"
        • "N"
    • Rank: Whether to include rank.

      • Type(s): String
      • Example: Rank: "Y"
      • Default: "Y"
      • Valueset:
        • "Y"
        • "N"
    • LeagueID: The league ID.

      • Type(s): String
      • Example: LeagueID: "00"
      • Default: "00"
      • Valueset:
        • "00"
        • "10"
        • "20"
    • SeasonType: The type of season.

      • Type(s): String
      • Example: SeasonType: "Playoffs"
      • Default: "Regular Season"
      • Valueset:
        • "Regular Season"
        • "Playoffs"
        • "Pre Season"
        • "All Star"
        • "Play In"
    • PORound: The playoff round.

      • Type(s): Integer
      • Example: PORound: 1
      • Default: 0
    • Month: The month of the season.

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

      • Type(s): Integer | String

      • Example: OpponentTeamID: 1610612739
      • Default: 0
    • TeamID: The ID of the team.

    • Period: The period of the game.

      • Type(s): Integer
      • Example: Period: 1
      • Default: 0
    • LastNGames: The number of last games to consider.

      • Type(s): Integer
      • Example: LastNGames: 5
      • Default: 0
    • College: The college of the player.

      • Type(s): String
      • Example: College: "Duke"
      • Default: nil
    • Conference: The conference of the team.

      • Type(s): String
      • Example: Conference: "West"
      • Default: nil
      • Valueset:
        • "East"
        • "West"
    • Country: The country of the player.

      • Type(s): String
      • Example: Country: "USA"
      • Default: nil
    • DateFrom: The start date for filtering.

      • Type(s): String
      • Example: DateFrom: "2023-10-01"
      • Default: nil
    • DateTo: The end date for filtering.

      • Type(s): String
      • Example: DateTo: "2024-04-15"
      • Default: nil
    • Division: The division of the team.

      • Type(s): String
      • Example: Division: "Pacific"
      • Default: nil
      • Valueset:
        • "Atlantic"
        • "Central"
        • "Southeast"
        • "Northwest"
        • "Pacific"
        • "Southwest"
    • GameScope: The scope of games.

      • Type(s): String
      • Example: GameScope: "Last 10"
      • Default: nil
    • GameSegment: The segment of the game.

      • Type(s): String
      • Example: GameSegment: "First Half"
      • Default: nil
      • Valueset:
        • "First Half"
        • "Second Half"
        • "Overtime"
    • Outcome: The outcome of the game.

      • Type(s): String
      • Example: Outcome: "W"
      • Default: nil
      • Valueset:
        • "W"
        • "L"
    • SeasonSegment: The segment of the season.

      • Type(s): String
      • Example: SeasonSegment: "Post All Star"
      • Default: nil
      • Valueset:
        • "Pre All Star"
        • "Post All Star"
    • ShotClockRange: The range of the shot clock.

      • Type(s): String
      • Example: ShotClockRange: "24+"
      • Default: nil
      • Valueset:
        • "24+"
        • "22-18"
        • "15-7"
        • "4-0"
        • "NA"
    • StarterBench: Whether the player is a starter or bench.

      • Type(s): String
      • Example: StarterBench: "Bench"
      • Default: nil
      • Valueset:
        • "Starter"
        • "Bench"
    • VsConference: The conference of the opponent.

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

      • Type(s): String
      • Example: VsDivision: "Central"
      • Default: nil
      • Valueset:
        • "Atlantic"
        • "Central"
        • "Southeast"
        • "Northwest"
        • "Pacific"
        • "Southwest"
  • 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.LeagueDashTeamClutch.get(Season: "2024-25")
{:ok, %{"LeagueDashTeamClutch" => [%{...}, ...]}}

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

(since 0.1.0)