Module: NbaStats::CommonAllPlayers

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

Constant Summary collapse

COMMON_ALL_PLAYERS_PATH =

The path of the commonallplayers API

'/stats/commonallplayers'

Instance Method Summary collapse

Instance Method Details

#common_all_players(season, is_only_current_season = 0, league_id = NbaStats::Constants::LEAGUE_ID_NBA) ⇒ NbaStats::Resources::CommonAllPlayers

Calls the commonallplayers API and returns a CommonAllPlayers resource.

Parameters:

  • season (String)
  • is_only_current_season (Integer) (defaults to: 0)
  • league_id (String) (defaults to: NbaStats::Constants::LEAGUE_ID_NBA)

Returns:



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/nba_stats/stats/common_all_players.rb', line 17

def common_all_players(
    season,
    is_only_current_season=0,
    league_id=NbaStats::Constants::LEAGUE_ID_NBA
)
  NbaStats::Resources::CommonAllPlayers.new(
      get(COMMON_ALL_PLAYERS_PATH, {
          :LeagueID => league_id,
          :Season => season,
          :IsOnlyCurrentSeason => is_only_current_season
      })
  )
end