Module: NbaStats::FranchiseHistory

Included in:
Client
Defined in:
lib/nba_stats/stats/franchise_history.rb

Constant Summary collapse

FRANCHISE_HISTORY_PATH =

The path of the franchisehistory API

'/stats/franchisehistory'

Instance Method Summary collapse

Instance Method Details

#franchise_history(league_id = NbaStats::Constants::LEAGUE_ID_NBA) ⇒ NbaStats::Resources::FranchiseHistory

Calls the franchisehistory API and returns a FranchiseHistory resource.

Parameters:

  • league_id (String) (defaults to: NbaStats::Constants::LEAGUE_ID_NBA)

Returns:



14
15
16
17
18
19
20
21
22
# File 'lib/nba_stats/stats/franchise_history.rb', line 14

def franchise_history(
    league_id=NbaStats::Constants::LEAGUE_ID_NBA
)
  NbaStats::Resources::FranchiseHistory.new(
      get(FRANCHISE_HISTORY_PATH, {
          :LeagueID => league_id
      })
  )
end