NBA.Stats.GameRotation (nba_api_ex v0.1.0)

View Source

Handles requests to the NBA stats game rotation endpoint.

Summary

Functions

get(params \\ [LeagueID: "00"], opts \\ [])

(since 0.1.0)

Fetches game rotation data for a specific game.

Parameters

  • params: A keyword list of parameters, including:
    • GameID: (Required) The game ID.
      • Type(s): String
      • Example: GameID: "0022200001"
    • LeagueID: The league ID (optional).
      • Type(s): String
      • Default: "00" (NBA)
      • Example: LeagueID: "10" (for WNBA)
      • 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.

Returns

  • {:ok, data}: On success, returns a map containing the game rotation data.
  • {:error, reason}: On failure, returns an error tuple with the reason for failure.

Example

iex> NBA.Stats.GameRotation.get(GameID: "0022200001")
{:ok, %{status: 200, data: %{"GameRotation" => [...]}}}

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

(since 0.1.0)