Module: NBA::PlayerFantasyProfileBarGraph
- Defined in:
- lib/nba/player_fantasy_profile_bar_graph.rb
Overview
Provides methods to retrieve player fantasy profile bar graph statistics
Constant Summary collapse
- LAST_FIVE_GAMES_AVG =
Result set name for last five games average
"LastFiveGamesAvg".freeze
- SEASON_AVG =
Result set name for season average
"SeasonAvg".freeze
Class Method Summary collapse
-
.last_five_games_avg(player:, season: Utils.current_season, season_type: "Regular Season", client: CLIENT) ⇒ Collection
Retrieves last five games average statistics for a player.
-
.season_avg(player:, season: Utils.current_season, season_type: "Regular Season", client: CLIENT) ⇒ Collection
Retrieves season average statistics for a player.
Class Method Details
.last_five_games_avg(player:, season: Utils.current_season, season_type: "Regular Season", client: CLIENT) ⇒ Collection
Retrieves last five games average statistics for a player
31 32 33 34 35 36 |
# File 'lib/nba/player_fantasy_profile_bar_graph.rb', line 31 def self.last_five_games_avg(player:, season: Utils.current_season, season_type: "Regular Season", client: CLIENT) path = build_path(player, season, season_type) response = client.get(path) parse_response(response, LAST_FIVE_GAMES_AVG) end |
.season_avg(player:, season: Utils.current_season, season_type: "Regular Season", client: CLIENT) ⇒ Collection
Retrieves season average statistics for a player
49 50 51 52 53 54 |
# File 'lib/nba/player_fantasy_profile_bar_graph.rb', line 49 def self.season_avg(player:, season: Utils.current_season, season_type: "Regular Season", client: CLIENT) path = build_path(player, season, season_type) response = client.get(path) parse_response(response, SEASON_AVG) end |