NBA.Stats.PlayerCareerByCollegeRollup (nba_api_ex v0.1.0)

View Source

Provides functions to interact with the NBA stats API for PlayerCareerByCollegeRollup.

See get/2 for parameter and usage details.

Summary

Functions

get(params \\ [LeagueID: "00", PerMode: "Totals", SeasonType: "Regular Season", Season: nil], opts \\ [])

(since 0.1.0)

Fetches PlayerCareerByCollegeRollup data.

Parameters

  • params: A keyword list of parameters to filter the data.

    • LeagueID: The league ID.

      • Type(s): String
      • Example: LeagueID: "00"
      • Default: "00"
      • Valueset:
        • "00" (NBA)
        • "01" (ABA)
        • "10" (WNBA)
        • "20" (G League)
    • PerMode: How to aggregate stats.

      • Type(s): String
      • Example: PerMode: "Totals"
      • Default: "Totals"
      • Valueset:
        • "Totals"
        • "PerGame"
    • SeasonType: The type of season.

      • Type(s): String
      • Example: SeasonType: "Regular Season"
      • Default: "Regular Season"
      • Valueset:
        • "Regular Season"
        • "Pre Season"
        • "Playoffs"
        • "All Star"
    • Season: Specific season to fetch data for.

      • Type(s): String
      • Example: Season: "2024-25"
      • Default: nil
  • opts: A keyword list of additional options for the request, such as headers or timeout settings.

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.PlayerCareerByCollegeRollup.get(LeagueID: "00", PerMode: "Totals", SeasonType: "Regular Season")
{:ok, %{"PlayerCareerByCollegeRollup" => [%{...}, ...]}}

get!(params \\ [], opts \\ [])

(since 0.1.0)