NBA.Stats.CommonPlayoffSeries (nba_api_ex v0.1.0)

View Source

Handles requests to the NBA Stats API for common playoff series data.

Summary

Functions

Fetches common playoff series data from the NBA Stats API.

Functions

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

(since 0.1.0)

Fetches common playoff series data from the NBA Stats API.

Parameters

  • params: Keyword list of parameters for the request.
    • LeagueID: The league ID (default is "00" for NBA).
      • Type: String.
      • Example: LeagueID: "00".
    • Season: (Required) The season to filter by (e.g., "2022-23").
      • Type: String.
      • Example: Season: "2022-23".
    • SeriesID: Optional series ID to filter specific playoff series.
      • Type: String.
      • Example: SeriesID: "12345".
  • opts: Additional options for the request, such as headers or timeout settings.

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.CommonPlayoffSeries.get(Season: "2022-23")
{:ok, %{"resultSets" => [%{"rowSet" => rows, "headers" => headers}]}}

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

(since 0.1.0)