Module: NBA::LeagueDashPtStats

Defined in:
lib/nba/league_dash_pt_stats.rb

Overview

Provides methods to retrieve league-wide player and team tracking statistics

Constant Summary collapse

LEAGUE_DASH_PT_STATS =

Result set name for league dash PT stats

"LeagueDashPtStats".freeze
REGULAR_SEASON =

Regular season type constant

"Regular Season".freeze
PLAYOFFS =

Playoffs season type constant

"Playoffs".freeze
PER_GAME =

Per game mode constant

"PerGame".freeze
TOTALS =

Totals mode constant

"Totals".freeze
PLAYER =

Player mode constant

"Player".freeze
TEAM =

Team mode constant

"Team".freeze
SPEED_DISTANCE =

Speed and distance measure type constant

"SpeedDistance".freeze

Class Method Summary collapse

Class Method Details

.all(season: Utils.current_season, season_type: REGULAR_SEASON, per_mode: PER_GAME, player_or_team: PLAYER, pt_measure_type: SPEED_DISTANCE, client: CLIENT) ⇒ Collection

Retrieves all league-wide player or team tracking statistics

Examples:

stats = NBA::LeagueDashPtStats.all(season: 2024)
stats.first.avg_speed #=> 4.25


57
58
59
60
61
62
63
# File 'lib/nba/league_dash_pt_stats.rb', line 57

def self.all(season: Utils.current_season, season_type: REGULAR_SEASON, per_mode: PER_GAME,
  player_or_team: PLAYER, pt_measure_type: SPEED_DISTANCE, client: CLIENT)
  path = build_path(season, season_type: season_type, per_mode: per_mode,
    player_or_team: player_or_team, pt_measure_type: pt_measure_type)
  response = client.get(path)
  parse_response(response)
end