NBA.Stats.CommonTeamRoster (nba_api_ex v0.1.0)
View SourceFetches the roster for a specific NBA team.
Summary
Functions
Fetches the roster for a specific NBA team. This function retrieves the roster details based on the provided parameters.
Functions
Fetches the roster for a specific NBA team. This function retrieves the roster details based on the provided parameters.
Parameters
params: A keyword list of parameters to filter the team roster.TeamID: (Required) The unique identifier for the team.Season: (Required) The season for which to retrieve the roster.- Type(s):
String. - Example:
Season: "2022-23".
- Type(s):
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.CommonTeamRoster.get(TeamID: 1610612747, Season: "2022-23")
{:ok, %{"Coaches" => [%{...}, ...], "CommonTeamRoster" => [%{"PlayerID" => 237, "FirstName" => "LeBron", "LastName" => "James", ...}, ...]}}