Module: NBA::LeagueLineupViz

Defined in:
lib/nba/league_lineup_viz.rb

Overview

Provides methods to retrieve league lineup visualization statistics

Constant Summary collapse

LEAGUE_LINEUP_VIZ =

Result set name for lineup visualization

Returns:

  • (String)

    the result set name

"LeagueLineupViz".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
BASE =

Base measure type constant

Returns:

  • (String)

    the measure type

"Base".freeze
ADVANCED =

Advanced measure type constant

Returns:

  • (String)

    the measure type

"Advanced".freeze
FIVE_MAN =

Group quantity for 5-man lineups

Returns:

  • (Integer)

    the group quantity

5
FOUR_MAN =

Group quantity for 4-man lineups

Returns:

  • (Integer)

    the group quantity

4
THREE_MAN =

Group quantity for 3-man lineups

Returns:

  • (Integer)

    the group quantity

3
TWO_MAN =

Group quantity for 2-man lineups

Returns:

  • (Integer)

    the group quantity

2

Class Method Summary collapse

Class Method Details

.all(season: Utils.current_season, season_type: REGULAR_SEASON, per_mode: PER_GAME, measure_type: BASE, group_quantity: FIVE_MAN, minutes_min: 0, client: CLIENT) ⇒ Collection

Retrieves all league lineup visualization statistics

Examples:

stats = NBA::LeagueLineupViz.all(season: 2024)
stats.first.group_name #=> "S. Curry - K. Thompson - ..."

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

  • measure_type (String) (defaults to: BASE)

    the measure type

  • group_quantity (Integer) (defaults to: FIVE_MAN)

    the lineup size

  • minutes_min (Integer) (defaults to: 0)

    minimum minutes filter

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:

  • (Collection)

    a collection of lineup visualization statistics



70
71
72
73
74
75
76
# File 'lib/nba/league_lineup_viz.rb', line 70

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