NBA.Stats.PlayerCareerStats (nba_api_ex v0.1.0)
View SourceProvides functions to interact with the NBA stats API for PlayerCareerStats.
See get/2 for parameter and usage details.
Summary
Functions
Fetches PlayerCareerStats data.
Functions
Fetches PlayerCareerStats data.
Parameters
params: A keyword list of parameters to filter the data.PlayerID: (Required) The player ID.Type(s):
Integer | String- Example:
PlayerID: 201939 - Default:
nil
PerMode: How to aggregate stats.- Type(s):
String - Example:
PerMode: "Totals" - Default:
"Totals" - Valueset:
"Totals""PerGame""Per36"
- Type(s):
LeagueID: The league ID.Type(s):
String | nil- Example:
LeagueID: "00" - Default:
nil - 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.- For a full list of options, see the Req documentation.
Returns
{:ok, data}: On success, returns the data from the API.{:error, reason}: On failure, returns an error tuple with the reason.
Example
iex> NBA.Stats.PlayerCareerStats.get(PerMode: "Totals", PlayerID: 201939)
{:ok, %{"PlayerCareerStats" => [%{...}, ...]}}