Module: NBA::TeamPlayerOnOffSummary

Defined in:
lib/nba/team_player_on_off_summary.rb

Overview

Provides methods to retrieve team on/off court summary statistics

API:

  • public

Constant Summary collapse

OVERALL =

Result set name for overall summary

Returns:

  • the result set name

API:

  • public

"OverallTeamPlayerOnOffSummary".freeze
PLAYERS_ON =

Result set name for players on court summary

Returns:

  • the result set name

API:

  • public

"PlayersOnCourtTeamPlayerOnOffSummary".freeze
PLAYERS_OFF =

Result set name for players off court summary

Returns:

  • the result set name

API:

  • public

"PlayersOffCourtTeamPlayerOnOffSummary".freeze

Class Method Summary collapse

Class Method Details

.overall(team:, season: Utils.current_season, season_type: "Regular Season", per_mode: "PerGame", client: CLIENT) ⇒ Collection

Retrieves overall team on/off court summary statistics

Examples:

stats = NBA::TeamPlayerOnOffSummary.overall(team: NBA::Team::GSW)


Parameters:

  • the team ID or Team object

  • (defaults to: Utils.current_season)

    the season year

  • (defaults to: "Regular Season")

    the season type

  • (defaults to: "PerGame")

    the per mode

  • (defaults to: CLIENT)

    the API client to use

Returns:

  • a collection of overall stats

API:

  • public



31
32
33
# File 'lib/nba/team_player_on_off_summary.rb', line 31

def self.overall(team:, season: Utils.current_season, season_type: "Regular Season", per_mode: "PerGame", client: CLIENT)
  fetch_stats(team, season, season_type, per_mode, OVERALL, client:)
end

.players_off_court(team:, season: Utils.current_season, season_type: "Regular Season", per_mode: "PerGame", client: CLIENT) ⇒ Collection

Retrieves summary statistics when opponent players are off the court

Examples:

stats = NBA::TeamPlayerOnOffSummary.players_off_court(team: NBA::Team::GSW)


Parameters:

  • the team ID or Team object

  • (defaults to: Utils.current_season)

    the season year

  • (defaults to: "Regular Season")

    the season type

  • (defaults to: "PerGame")

    the per mode

  • (defaults to: CLIENT)

    the API client to use

Returns:

  • a collection of player off court stats

API:

  • public



59
60
61
# File 'lib/nba/team_player_on_off_summary.rb', line 59

def self.players_off_court(team:, season: Utils.current_season, season_type: "Regular Season", per_mode: "PerGame", client: CLIENT)
  fetch_stats(team, season, season_type, per_mode, PLAYERS_OFF, client:)
end

.players_on_court(team:, season: Utils.current_season, season_type: "Regular Season", per_mode: "PerGame", client: CLIENT) ⇒ Collection

Retrieves summary statistics when opponent players are on the court

Examples:

stats = NBA::TeamPlayerOnOffSummary.players_on_court(team: NBA::Team::GSW)


Parameters:

  • the team ID or Team object

  • (defaults to: Utils.current_season)

    the season year

  • (defaults to: "Regular Season")

    the season type

  • (defaults to: "PerGame")

    the per mode

  • (defaults to: CLIENT)

    the API client to use

Returns:

  • a collection of player on court stats

API:

  • public



45
46
47
# File 'lib/nba/team_player_on_off_summary.rb', line 45

def self.players_on_court(team:, season: Utils.current_season, season_type: "Regular Season", per_mode: "PerGame", client: CLIENT)
  fetch_stats(team, season, season_type, per_mode, PLAYERS_ON, client:)
end