NBA.Stats.CumeStatsPlayer (nba_api_ex v0.1.0)
View SourceHandles requests to the cumulative player stats endpoint.
Summary
Functions
Fetches cumulative player stats for a given player ID and season.
Functions
Fetches cumulative player stats for a given player ID and season.
Parameters
params: A keyword list of parameters. Defaults to@default.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
PlayerID: (Required) Player identifier (can be an integer or string).Season: (Required) Season identifier (e.g., "2024").- Type(s):
String - Example:
Season: "2024".
- Type(s):
SeasonType: Type of season (default is "Regular Season").- Type(s):
String - Default:
"Regular Season". - Example:
SeasonType: "Playoffs". - Valueset:
"Regular Season""Playoffs""Pre Season""All Star"
- Type(s):
GameIDs: (Required) String of game IDs to filter stats.- Type(s): Numeric
Stringvalues, separated by|. - Example:
GameIDs: "0022100001|0022100002".
- 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.CumeStatsPlayer.get(GameIDs: "0042400305|0042400306", PlayerID: 1630169, Season: "2024", SeasonType: "Playoffs")
{:ok, %{"GameByGameStats" => [...], "TotalPlayerStats" => [...]}}