class NBA::Stats::Leaders

Constants

BASE_URI

Public Class Methods

all_time(leagueId="00", perMode="PerGame", season="All Time", seasonType="Regular Season", scope="S", statCategory="PTS") click to toggle source
# File lib/nba/stats/leaders.rb, line 20
def self.all_time(leagueId="00", perMode="PerGame", season="All Time", seasonType="Regular Season", scope="S", statCategory="PTS")
  res = HTTP.get(BASE_URI+'/leagueleaders', :params => {
    :LeagueID => leagueId,
    :PerMode => perMode,
    :Season => season,
    :SeasonType => seasonType,
    :Scope => scope,
    :StatCategory => statCategory
    })
  if res.code == 200
    return JSON.parse(res.body)
  end
  return res.code
end
get_stats(leagueId="00", perMode="PerGame", season="2015-16", seasonType="Regular Season", scope="S", statCategory="PTS") click to toggle source
# File lib/nba/stats/leaders.rb, line 5
def self.get_stats(leagueId="00", perMode="PerGame", season="2015-16", seasonType="Regular Season", scope="S", statCategory="PTS")
  res = HTTP.get(BASE_URI+'/leagueleaders', :params => {
    :LeagueID => leagueId,
    :PerMode => perMode,
    :Season => season,
    :SeasonType => seasonType,
    :Scope => scope,
    :StatCategory => statCategory
    })
  if res.code == 200
    return JSON.parse(res.body)
  end
  return res.code
end