NBA.Stats.VideoEvents (nba_api_ex v0.1.0)

View Source

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

See get/2 for parameter and usage details.

Summary

Functions

get(params \\ [GameEventID: nil, GameID: nil], opts \\ [])

(since 0.1.0)

Fetches VideoEvents data.

Parameters

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

    • GameID: (Required) The game ID. 10-digit string.

      • Type(s): String
      • Default: nil
      • Example: GameID: "0022100001"
    • GameEventID: The game event ID.

      • Type(s): Integer
      • Default: nil
      • Example: GameEventID: 1
  • 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.VideoEvents.get(GameEventID: 1, GameID: "0022100001")
{:ok, %{"VideoEvents" => [%{...}, ...]}}

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

(since 0.1.0)