NBA.Stats.CommonTeamYears (nba_api_ex v0.1.0)
View SourceFetches 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
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)
- Type(s): Numeric
opts: A keyword list of additional options for the request, such as headers or timeout settings.- For a list of available options, see the Req documentation.
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"}, ...]}