Module: NBA::FranchisePlayers
- Defined in:
- lib/nba/franchise_players.rb
Overview
Provides methods to retrieve franchise player statistics
Constant Summary collapse
- RESULTS =
Result set name for franchise players
"FranchisePlayers".freeze
- PER_GAME =
Per mode constant for per game stats
"PerGame".freeze
- TOTALS =
Per mode constant for totals stats
"Totals".freeze
Class Method Summary collapse
-
.all(team:, season_type: "Regular Season", per_mode: PER_GAME, league: League::NBA, client: CLIENT) ⇒ Collection
Retrieves all franchise player statistics.
Class Method Details
.all(team:, season_type: "Regular Season", per_mode: PER_GAME, league: League::NBA, client: CLIENT) ⇒ Collection
Retrieves all franchise player statistics
33 34 35 36 37 38 39 40 41 |
# File 'lib/nba/franchise_players.rb', line 33 def self.all(team:, season_type: "Regular Season", per_mode: PER_GAME, league: League::NBA, client: CLIENT) team_id = Utils.extract_id(team) return Collection.new unless team_id league_id = Utils.extract_league_id(league) path = "franchiseplayers?TeamID=#{team_id}&SeasonType=#{season_type}&PerMode=#{per_mode}&LeagueID=#{league_id}" response = client.get(path) parse_response(response) end |