NBA.Stats.AllTimeLeadersGrids (nba_api_ex v0.1.0)

View Source

Handles requests to the all-time leader grids endpoint.

Summary

Functions

get(params \\ [LeagueID: "00", SeasonType: "Regular Season", PerMode: "Totals", TopX: 10], opts \\ [])

(since 0.1.0)

Fetches all-time leader grids for the specified league and season type.

Parameters

  • params: A keyword list of parameters. Defaults to @default.
    • LeagueID: The league ID.
      • Type: Numeric String
      • Default: "00" (NBA)
      • Example: LeagueID: "10" (for WNBA).
      • Valueset:
        • "00" (NBA)
        • "01" (ABA)
        • "10" (WNBA)
        • "20" (G-League)
    • PerMode: The statistic mode.
      • Type: String
      • Default: "Totals"
      • Example: PerMode: "PerGame" for per-game statistics.
      • Valueset:
        • "Totals"
        • "PerGame"
    • SeasonType: Type of season.
      • Type: String
      • Default: "Regular Season"
      • Example: SeasonType: "Playoffs" for playoff statistics.
      • Valueset:
        • "Regular Season"
        • "Playoffs"
    • TopX: The number of top leaders to return.
      • Type: Integer
      • Default: 10
      • Example: TopX: 20 to get the top 20 leaders.
  • opts: A keyword list of additional options for the request, such as headers or timeout settings.

Example

iex> NBA.Stats.AllTimeLeadersGrids.get()
{:ok, %{"PTSLeaders" => [...], "ASTLeaders" => [...], ...}}

Returns

  • {:ok, response}: A tuple containing the status and parsed response body.
  • {:error, reason}: An error tuple with the reason for failure.

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

(since 0.1.0)