NBA.Stats.VideoDetailsAsset (nba_api_ex v0.1.0)

View Source

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

See get/2 for parameter and usage details.

Summary

Functions

get(params \\ [ContextMeasure: "FGM", LastNGames: 0, Month: 0, OpponentTeamID: 0, Period: 0, PlayerID: nil, Season: nil, SeasonType: "Regular Season", TeamID: nil, AheadBehind: nil, ClutchTime: nil, ContextFilter: nil, DateFrom: nil, DateTo: nil, EndPeriod: nil, EndRange: nil, GameID: nil, GameSegment: nil, LeagueID: "00", Location: nil, Outcome: nil, PointDiff: nil, Position: nil, RangeType: nil, RookieYear: nil, SeasonSegment: nil, StartPeriod: nil, StartRange: nil, VsConference: nil, VsDivision: nil], opts \\ [])

(since 0.1.0)

Fetches VideoDetailsAsset data.

Parameters

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

    • ContextMeasure: (Required) The context measure.

      • Type(s): String
      • Default: "FGM"
      • Valueset:
        • "FGM"
        • "FGA"
        • "FG_PCT"
        • "FG3M"
        • "FG3A"
        • "FG3_PCT"
        • "FTM"
        • "FTA"
        • "OREB"
        • "DREB"
        • "AST"
        • "FGM_AST"
        • "FG3_AST"
        • "STL"
        • "BLK"
        • "BLKA"
        • "TOV"
        • "PF"
        • "PFD"
        • "POSS_END_FT"
        • "PTS_PAINT"
        • "PTS_FB"
        • "PTS_OFF_TOV"
        • "PTS_2ND_CHANCE"
        • "REB"
        • "TM_FGM"
        • "TM_FGA"
        • "TM_FG3M"
        • "TM_FG3A"
        • "TM_FTM"
        • "TM_FTA"
        • "TM_OREB"
        • "TM_DREB"
        • "TM_REB"
        • "TM_TEAM_REB"
        • "TM_AST"
        • "TM_STL"
        • "TM_BLK"
        • "TM_BLKA"
        • "TM_TOV"
        • "TM_TEAM_TOV"
        • "TM_PF"
        • "TM_PFD"
        • "TM_PTS"
        • "TM_PTS_PAINT"
        • "TM_PTS_FB"
        • "TM_PTS_OFF_TOV"
        • "TM_PTS_2ND_CHANCE"
        • "TM_FGM_AST"
        • "TM_FG3_AST"
        • "TM_POSS_END_FT"
        • "OPP_FGM"
        • "OPP_FGA"
        • "OPP_FG3M"
        • "OPP_FG3A"
        • "OPP_FTM"
        • "OPP_FTA"
        • "OPP_OREB"
        • "OPP_DREB"
        • "OPP_REB"
        • "OPP_TEAM_REB"
        • "OPP_AST"
        • "OPP_STL"
        • "OPP_BLK"
        • "OPP_BLKA"
        • "OPP_TOV"
        • "OPP_TEAM_TOV"
        • "OPP_PF"
        • "OPP_PFD"
        • "OPP_PTS"
        • "OPP_PTS_PAINT"
        • "OPP_PTS_FB"
        • "OPP_PTS_OFF_TOV"
        • "OPP_PTS_2ND_CHANCE"
        • "OPP_FGM_AST"
        • "OPP_FG3_AST"
        • "OPP_POSS_END_FT"
        • "PTS"
    • LastNGames: (Required) Number of last games to include.

    • Month: (Required) The month (1-12, 0 for all).

    • OpponentTeamID: (Required) The opponent team ID.

    • Period: (Required) The period (0 for all).

    • PlayerID: (Required) The player ID.

    • Season: (Required) The season.

    • SeasonType: (Required) The season type.

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

    • AheadBehind: The ahead/behind context.

    • ClutchTime: The clutch time.

    • ContextFilter: The context filter.

    • DateFrom: The start date (YYYY-MM-DD).

    • DateTo: The end date (YYYY-MM-DD).

    • EndPeriod: The end period.

    • EndRange: The end range.

    • GameID: The game ID. 10-digit string or nil.

    • GameSegment: The game segment.

    • LeagueID: The league ID.

    • Location: The game location.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "Home"
        • "Road"
    • Outcome: The game outcome.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "W"
        • "L"
    • PointDiff: The point differential.

    • Position: The position.

    • RangeType: The range type.

    • RookieYear: The rookie year.

    • SeasonSegment: The season segment.

      • Type(s): String
      • Default: nil
      • Valueset:
        • "Post All-Star"
        • "Pre All-Star"
    • StartPeriod: The start period.

    • StartRange: The start range.

    • VsConference: The opposing conference.

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

      • Type(s): String
      • Default: nil
      • Valueset:
        • "Atlantic"
        • "Central"
        • "Northwest"
        • "Pacific"
        • "Southeast"
        • "Southwest"
        • "East"
        • "West"
  • 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.VideoDetailsAsset.get(PlayerID: 201939, Season: "2024-25", ContextMeasure: "FGM", LastNGames: 0, Month: 0, OpponentTeamID: 1610612737, Period: 0, SeasonType: "Regular Season", TeamID: 1610612744)
{:ok, %{"VideoDetailsAsset" => [%{...}, ...]}}

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

(since 0.1.0)