Module: NBA::LeagueHustleStatsPlayer

Defined in:
lib/nba/league_hustle_stats_player.rb

Overview

Provides methods to retrieve league-wide player hustle statistics

Constant Summary collapse

HUSTLE_STATS_PLAYER =

Result set name for hustle stats

Returns:

  • (String)

    the result set name

"HustleStatsPlayer".freeze
REGULAR_SEASON =

Season type constant for regular season

Returns:

  • (String)

    the season type

"Regular Season".freeze
PLAYOFFS =

Season type constant for playoffs

Returns:

  • (String)

    the season type

"Playoffs".freeze
PER_GAME =

Per mode constant for per game stats

Returns:

  • (String)

    the per mode

"PerGame".freeze
TOTALS =

Per mode constant for totals

Returns:

  • (String)

    the per mode

"Totals".freeze

Class Method Summary collapse

Class Method Details

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

Retrieves league-wide player hustle statistics

Examples:

stats = NBA::LeagueHustleStatsPlayer.all(season: 2024)
stats.each { |s| puts "#{s.player_name}: #{s.deflections} deflections" }

Parameters:

  • season (Integer) (defaults to: Utils.current_season)

    the season year

  • season_type (String) (defaults to: REGULAR_SEASON)

    the season type

  • per_mode (String) (defaults to: PER_GAME)

    the per mode

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:

  • (Collection)

    a collection of player hustle stats



40
41
42
43
44
# File 'lib/nba/league_hustle_stats_player.rb', line 40

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