Module: NBA::LeagueDashPlayerBioStats

Defined in:
lib/nba/league_dash_player_bio_stats.rb

Overview

Provides methods to retrieve league-wide player biographical statistics

Constant Summary collapse

LEAGUE_DASH_PLAYER_BIO_STATS =

Result set name for league dash player bio stats

Returns:

  • (String)

    the result set name

"LeagueDashPlayerBioStats".freeze
REGULAR_SEASON =

Regular season type constant

Returns:

  • (String)

    the season type

"Regular Season".freeze
PLAYOFFS =

Playoffs season type constant

Returns:

  • (String)

    the season type

"Playoffs".freeze
PER_GAME =

Per game mode constant

Returns:

  • (String)

    the per mode

"PerGame".freeze
TOTALS =

Totals mode constant

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 all league-wide player biographical statistics

Examples:

stats = NBA::LeagueDashPlayerBioStats.all(season: 2024)
stats.first.college #=> "Davidson"

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 biographical statistics



43
44
45
46
47
# File 'lib/nba/league_dash_player_bio_stats.rb', line 43

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