NBA.Stats.CommonTeamYears (nba_api_ex v0.1.0)

View Source

Fetches the years a team has played in the NBA.

Summary

Functions

This function retrieves the years a team has participated in the league based on the provided parameters.

Functions

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

(since 0.1.0)

This function retrieves the years a team has participated in the league based on the provided parameters.

Parameters

  • params: A keyword list of parameters to filter the team years.
    • LeagueID: The league ID.
      • Type(s): Numeric String.
      • Default: "00" (NBA).
      • Example: LeagueID: "10" (for WNBA).
      • Valueset:
        • "00" (NBA)
        • "01" (ABA)
        • "10" (WNBA)
        • "20" (G-League)
  • opts: A keyword list of additional options for the request, such as headers or timeout settings.

Returns

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

Example

iex> NBA.Stats.CommonTeamYears.get()
{:ok, [%{"TeamID" => 1610612737, "Year" => "1946-47"}, ...]}

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

(since 0.1.0)