module NbaStats::CommonAllPlayers

Constants

COMMON_ALL_PLAYERS_PATH

The path of the commonallplayers API

Public Instance Methods

common_all_players( season, is_only_current_season=0, league_id=NbaStats::Constants::LEAGUE_ID_NBA ) click to toggle source

Calls the commonallplayers API and returns a CommonAllPlayers resource.

@param season [String] @param is_only_current_season [Integer] @param league_id [String] @return [NbaStats::Resources::CommonAllPlayers]

# 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