NBA.Stats.DraftHistory (nba_api_ex v0.1.0)

View Source

Provides access to the NBA Draft History endpoint.

Summary

Functions

get(params \\ [LeagueID: "00"], opts \\ [])

(since 0.1.0)

Fetches the NBA Draft History data.

Parameters

  • params: A keyword list of parameters to filter the draft history.
    • LeagueID: The league ID (default: "00" for NBA).
    • TopX: Limit results to top X picks.
    • TeamID: Filter by team ID (integer or string).
    • Season: The season to filter by (e.g., "2022-23").
    • RoundPick: Filter by round pick number.
    • RoundNum: Filter by round number.
    • OverallPick: Filter by overall pick number.
    • College: Filter by college name.

Returns

  • {:ok, data}: A tuple containing the draft history data.
  • {:error, reason}: An error tuple with the reason for failure.

Example

iex> NBA.Stats.DraftHistory.get(Season: "2022")
{:ok, [%{"LeagueID" => "00", "Season" => "2022", ...}]}

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

(since 0.1.0)