NBA.Stats.CommonPlayerInfo (nba_api_ex v0.1.0)
View SourceProvides functions to fetch common player information from the NBA Stats API.
Summary
Functions
Fetches common player information from the NBA Stats API. This function retrieves player details based on the provided parameters.
Functions
Fetches common player information from the NBA Stats API. This function retrieves player details based on the provided parameters.
Parameters
params: A keyword list of parameters to filter the player information.PlayerID: (Required) The unique identifier for the player.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.CommonPlayerInfo.get(PlayerID: 2544)
{:ok, %{"name" => "LeBron James", ...}}