Module: NBA::PlayerDashPtReb

Defined in:
lib/nba/player_dash_pt_reb.rb

Overview

Provides methods to retrieve player tracking rebound statistics

Constant Summary collapse

OVERALL =

Result set name for overall rebounding

Returns:

  • (String)

    the result set name

"OverallRebounding".freeze
NUM_CONTESTED =

Result set name for number contested rebounding

Returns:

  • (String)

    the result set name

"NumContestedRebounding".freeze
REB_DISTANCE =

Result set name for rebound distance rebounding

Returns:

  • (String)

    the result set name

"RebDistanceRebounding".freeze
SHOT_DISTANCE =

Result set name for shot distance rebounding

Returns:

  • (String)

    the result set name

"ShotDistanceRebounding".freeze
SHOT_TYPE =

Result set name for shot type rebounding

Returns:

  • (String)

    the result set name

"ShotTypeRebounding".freeze

Class Method Summary collapse

Class Method Details

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

Retrieves number contested rebounding statistics for a player

Examples:

stats = NBA::PlayerDashPtReb.num_contested(player: 201939)
stats.each { |s| puts "#{s.reb_num_contesting_range}: #{s.reb}" }

Parameters:

  • player (Integer, Player)

    the player ID or Player object

  • team (Integer, Team) (defaults to: 0)

    the team ID or Team object

  • 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: "PerGame")

    the per mode

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:

  • (Collection)

    a collection of rebound statistics



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

def self.num_contested(player:, team: 0, season: Utils.current_season, season_type: "Regular Season",
  per_mode: "PerGame", client: CLIENT)
  options = {season_type: season_type, per_mode: per_mode, result_set: NUM_CONTESTED}
  fetch_stats(player, team, season, options, client: client)
end

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

Retrieves overall rebounding statistics for a player

Examples:

stats = NBA::PlayerDashPtReb.overall(player: 201939)
stats.first.reb #=> 5.7

Parameters:

  • player (Integer, Player)

    the player ID or Player object

  • team (Integer, Team) (defaults to: 0)

    the team ID or Team object

  • 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: "PerGame")

    the per mode

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:

  • (Collection)

    a collection of rebound statistics



45
46
47
48
49
# File 'lib/nba/player_dash_pt_reb.rb', line 45

def self.overall(player:, team: 0, season: Utils.current_season, season_type: "Regular Season",
  per_mode: "PerGame", client: CLIENT)
  options = {season_type: season_type, per_mode: per_mode, result_set: OVERALL}
  fetch_stats(player, team, season, options, client: client)
end

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

Retrieves rebound distance rebounding statistics for a player

Examples:

stats = NBA::PlayerDashPtReb.reb_distance(player: 201939)
stats.each { |s| puts "#{s.reb_dist_range}: #{s.reb}" }

Parameters:

  • player (Integer, Player)

    the player ID or Player object

  • team (Integer, Team) (defaults to: 0)

    the team ID or Team object

  • 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: "PerGame")

    the per mode

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:

  • (Collection)

    a collection of rebound statistics



83
84
85
86
87
# File 'lib/nba/player_dash_pt_reb.rb', line 83

def self.reb_distance(player:, team: 0, season: Utils.current_season, season_type: "Regular Season",
  per_mode: "PerGame", client: CLIENT)
  options = {season_type: season_type, per_mode: per_mode, result_set: REB_DISTANCE}
  fetch_stats(player, team, season, options, client: client)
end

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

Retrieves shot distance rebounding statistics for a player

Examples:

stats = NBA::PlayerDashPtReb.shot_distance(player: 201939)
stats.each { |s| puts "#{s.shot_dist_range}: #{s.reb}" }

Parameters:

  • player (Integer, Player)

    the player ID or Player object

  • team (Integer, Team) (defaults to: 0)

    the team ID or Team object

  • 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: "PerGame")

    the per mode

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:

  • (Collection)

    a collection of rebound statistics



102
103
104
105
106
# File 'lib/nba/player_dash_pt_reb.rb', line 102

def self.shot_distance(player:, team: 0, season: Utils.current_season, season_type: "Regular Season",
  per_mode: "PerGame", client: CLIENT)
  options = {season_type: season_type, per_mode: per_mode, result_set: SHOT_DISTANCE}
  fetch_stats(player, team, season, options, client: client)
end

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

Retrieves shot type rebounding statistics for a player

Examples:

stats = NBA::PlayerDashPtReb.shot_type(player: 201939)
stats.each { |s| puts "#{s.shot_type_range}: #{s.reb}" }

Parameters:

  • player (Integer, Player)

    the player ID or Player object

  • team (Integer, Team) (defaults to: 0)

    the team ID or Team object

  • 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: "PerGame")

    the per mode

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:

  • (Collection)

    a collection of rebound statistics



121
122
123
124
125
# File 'lib/nba/player_dash_pt_reb.rb', line 121

def self.shot_type(player:, team: 0, season: Utils.current_season, season_type: "Regular Season",
  per_mode: "PerGame", client: CLIENT)
  options = {season_type: season_type, per_mode: per_mode, result_set: SHOT_TYPE}
  fetch_stats(player, team, season, options, client: client)
end