Module: NBA::PlayerProfileV2

Defined in:
lib/nba/player_profile_v2.rb

Overview

Provides methods to retrieve comprehensive player profile data

Constant Summary collapse

CAREER_REGULAR_SEASON =

Regular season result set name

Returns:

  • (String)

    the result set name

"CareerTotalsRegularSeason".freeze
CAREER_POST_SEASON =

Post season result set name

Returns:

  • (String)

    the result set name

"CareerTotalsPostSeason".freeze
SEASON_REGULAR_SEASON =

Season totals regular season result set name

Returns:

  • (String)

    the result set name

"SeasonTotalsRegularSeason".freeze
SEASON_POST_SEASON =

Season totals post season result set name

Returns:

  • (String)

    the result set name

"SeasonTotalsPostSeason".freeze

Class Method Summary collapse

Class Method Details

.career_post_season(player:, client: CLIENT) ⇒ Collection

Retrieves career post season totals for a player

Examples:

stats = NBA::PlayerProfileV2.career_post_season(player: 201939)

Parameters:

  • player (Integer, Player)

    the player ID or Player object

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:



48
49
50
# File 'lib/nba/player_profile_v2.rb', line 48

def self.career_post_season(player:, client: CLIENT)
  fetch_stats(player, CAREER_POST_SEASON, client: client)
end

.career_regular_season(player:, client: CLIENT) ⇒ Collection

Retrieves career regular season totals for a player

Examples:

stats = NBA::PlayerProfileV2.career_regular_season(player: 201939)

Parameters:

  • player (Integer, Player)

    the player ID or Player object

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:



36
37
38
# File 'lib/nba/player_profile_v2.rb', line 36

def self.career_regular_season(player:, client: CLIENT)
  fetch_stats(player, CAREER_REGULAR_SEASON, client: client)
end

.season_post_season(player:, client: CLIENT) ⇒ Collection

Retrieves season-by-season post season totals for a player

Examples:

stats = NBA::PlayerProfileV2.season_post_season(player: 201939)

Parameters:

  • player (Integer, Player)

    the player ID or Player object

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:

  • (Collection)

    season-by-season post season totals



72
73
74
# File 'lib/nba/player_profile_v2.rb', line 72

def self.season_post_season(player:, client: CLIENT)
  fetch_stats(player, SEASON_POST_SEASON, client: client)
end

.season_regular_season(player:, client: CLIENT) ⇒ Collection

Retrieves season-by-season regular season totals for a player

Examples:

stats = NBA::PlayerProfileV2.season_regular_season(player: 201939)

Parameters:

  • player (Integer, Player)

    the player ID or Player object

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:

  • (Collection)

    season-by-season regular season totals



60
61
62
# File 'lib/nba/player_profile_v2.rb', line 60

def self.season_regular_season(player:, client: CLIENT)
  fetch_stats(player, SEASON_REGULAR_SEASON, client: client)
end