Module: NBA::FranchiseHistory
- Defined in:
- lib/nba/franchise_history.rb
Overview
Provides methods to retrieve franchise history
Constant Summary collapse
- FRANCHISE_HISTORY =
Result set name for franchise history
"FranchiseHistory".freeze
- DEFUNCT_TEAMS =
Result set name for defunct teams
"DefunctTeams".freeze
Class Method Summary collapse
-
.all(league: League::NBA, client: CLIENT) ⇒ Collection
Retrieves all franchise history data.
-
.defunct(league: League::NBA, client: CLIENT) ⇒ Collection
Retrieves defunct team history data.
Class Method Details
.all(league: League::NBA, client: CLIENT) ⇒ Collection
Retrieves all franchise history data
26 27 28 29 30 31 |
# File 'lib/nba/franchise_history.rb', line 26 def self.all(league: League::NBA, client: CLIENT) league_id = Utils.extract_league_id(league) path = "franchisehistory?LeagueID=#{league_id}" response = client.get(path) parse_response(response, FRANCHISE_HISTORY) end |
.defunct(league: League::NBA, client: CLIENT) ⇒ Collection
Retrieves defunct team history data
42 43 44 45 46 47 |
# File 'lib/nba/franchise_history.rb', line 42 def self.defunct(league: League::NBA, client: CLIENT) league_id = Utils.extract_league_id(league) path = "franchisehistory?LeagueID=#{league_id}" response = client.get(path) parse_response(response, DEFUNCT_TEAMS) end |