NBA.Stats.TeamGameStreakFinder (nba_api_ex v0.1.0)

View Source

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

Summary

Functions

get(params \\ [TeamID: nil, Season: nil, LeagueID: "00", SeasonType: "Regular Season", MinGames: nil, Outcome: nil, VsTeamID: nil, VsDivision: nil, VsConference: nil, SeasonSegment: nil, PORound: nil, Location: nil, DateFrom: nil, DateTo: nil], opts \\ [])

(since 0.1.0)

Fetches TeamGameStreakFinder data.

Parameters

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

    • Note: This endpoint also supports a wide range of advanced stat filters in the form of LtX, GtX, and EqX (e.g., LtPTS, GtAST, EqREB), where X is a stat name. These accept Integer or Float values and default to nil.

      • LtX: "Less than" filter for statistic X.
      • GtX: "Greater than" filter for statistic X.
      • EqX: "Equal to" filter for statistic X.
    • ActiveStreaksOnly: Only include active streaks.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "Y"
        • "N"
    • ActiveTeamsOnly: Only include active teams.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "Y"
        • "N"
    • Conference: Conference filter.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "East"
        • "West"
    • DateFrom: Start date filter (MM/DD/YYYY).

    • DateTo: End date filter (MM/DD/YYYY).

    • Division: Division filter.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "Atlantic"
        • "Central"
        • "Northwest"
        • "Pacific"
        • "Southeast"
        • "Southwest"
        • "East"
        • "West"
    • GameID: NBA game ID.

    • LeagueID: The league ID.

    • Location: Game location.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "Home"
        • "Road"
    • LStreak: Losing streak count.

    • MinGames: Minimum number of games played.

    • Outcome: Game outcome.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "W"
        • "L"
    • PORound: Playoff round.

    • Season: The NBA season.

    • SeasonSegment: The season segment.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "Post All-Star"
        • "Pre All-Star"
    • SeasonType: The season type.

      • Type(s): String
      • Default: "Regular Season"
      • Valueset:
        • "Regular Season"
        • "Pre Season"
        • "Playoffs"
        • "All Star"
    • TeamID: The team ID.

    • VsConference: Opponent conference.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "East"
        • "West"
    • VsDivision: Opponent division.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "Atlantic"
        • "Central"
        • "Northwest"
        • "Pacific"
        • "Southeast"
        • "Southwest"
        • "East"
        • "West"
    • VsTeamID: Opponent team ID.

    • WStreak: Winning streak count.

  • 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.TeamGameStreakFinder.get(TeamID: 1610612744, Season: "2024-25")
{:ok, %{"TeamGameStreakFinder" => [%{...}, ...]}}

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

(since 0.1.0)