Module: NBA::LeagueDashLineups

Defined in:
lib/nba/league_dash_lineups.rb

Overview

Provides methods to retrieve league-wide lineup statistics

Constant Summary collapse

LINEUPS =

Result set name for lineups

Returns:

  • (String)

    the result set name

"Lineups".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
PER_100 =

Per 100 possessions mode constant

Returns:

  • (String)

    the per mode

"Per100Possessions".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, group_quantity: FIVE_MAN, client: CLIENT) ⇒ Collection

Retrieves all league-wide lineup statistics

Examples:

stats = NBA::LeagueDashLineups.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

  • group_quantity (Integer) (defaults to: FIVE_MAN)

    the lineup size

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:

  • (Collection)

    a collection of lineup statistics



64
65
66
67
68
69
# File 'lib/nba/league_dash_lineups.rb', line 64

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