Module: NbaStats::LeagueDashTeamStats

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

Constant Summary collapse

LEAGUE_DASH_TEAM_STATS_PATH =

The path of the leaguedashteamstats API

'/stats/leaguedashteamstats'

Instance Method Summary collapse

Instance Method Details

#league_dash_team_stats(season, date_from = nil, date_to = nil, game_scope = nil, game_segment = nil, last_n_games = 0, location = nil, measure_type = NbaStats::Constants::MEASURE_TYPE_BASE, month = 0, opponent_team_id = 0, outcome = nil, pace_adjust = NbaStats::Constants::NO, per_mode = NbaStats::Constants::PER_MODE_GAME, period = 0, player_experience = nil, player_position = nil, plus_minus = NbaStats::Constants::NO, rank = NbaStats::Constants::NO, season_segment = nil, starter_bench = nil, vs_conference = nil, vs_division = nil, season_type = NbaStats::Constants::SEASON_TYPE_REGULAR, league_id = NbaStats::Constants::LEAGUE_ID_NBA) ⇒ NbaStats::Resources::LeagueDashTeamStats

Calls the leaguedashteamstats API and returns a LeagueDashTeamStats resource.

Parameters:

  • date_from (Date) (defaults to: nil)
  • date_to (Date) (defaults to: nil)
  • game_scope (String) (defaults to: nil)
  • game_segment (String) (defaults to: nil)
  • last_n_games (Integer) (defaults to: 0)
  • league_id (String) (defaults to: NbaStats::Constants::LEAGUE_ID_NBA)
  • location (String) (defaults to: nil)
  • measure_type (String) (defaults to: NbaStats::Constants::MEASURE_TYPE_BASE)
  • month (Integer) (defaults to: 0)
  • opponent_team_id (String) (defaults to: 0)
  • outcome (String) (defaults to: nil)
  • pace_adjust (String) (defaults to: NbaStats::Constants::NO)
  • per_mode (String) (defaults to: NbaStats::Constants::PER_MODE_GAME)
  • period (Integer) (defaults to: 0)
  • player_experience (String) (defaults to: nil)
  • player_position (String) (defaults to: nil)
  • plus_minus (String) (defaults to: NbaStats::Constants::NO)
  • rank (String) (defaults to: NbaStats::Constants::NO)
  • season (String)
  • season_segment (String) (defaults to: nil)
  • season_type (String) (defaults to: NbaStats::Constants::SEASON_TYPE_REGULAR)
  • starter_bench (String) (defaults to: nil)
  • vs_conference (String) (defaults to: nil)
  • vs_division (String) (defaults to: nil)

Returns:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/nba_stats/stats/league_dash_team_stats.rb', line 37

def league_dash_team_stats(
    season,
    date_from=nil,
    date_to=nil,
    game_scope=nil,
    game_segment=nil,
    last_n_games=0,
    location=nil,
    measure_type=NbaStats::Constants::MEASURE_TYPE_BASE,
    month=0,
    opponent_team_id=0,
    outcome=nil,
    pace_adjust=NbaStats::Constants::NO,
    per_mode=NbaStats::Constants::PER_MODE_GAME,
    period=0,
    player_experience=nil,
    player_position=nil,
    plus_minus=NbaStats::Constants::NO,
    rank=NbaStats::Constants::NO,
    season_segment=nil,
    starter_bench=nil,
    vs_conference=nil,
    vs_division=nil,
    season_type=NbaStats::Constants::SEASON_TYPE_REGULAR,
    league_id=NbaStats::Constants::LEAGUE_ID_NBA
)
NbaStats::Resources::LeagueDashTeamStats.new(
    get(LEAGUE_DASH_TEAM_STATS_PATH, {
        :DateFrom => date_from,
        :DateTo => date_to,
        :GameScope => game_scope,
        :GameSegment => game_segment,
        :LastNGames => last_n_games,
        :LeagueID => league_id,
        :Location => location,
        :MeasureType => measure_type,
        :Month => month,
        :OpponentTeamID => opponent_team_id,
        :Outcome => outcome,
        :PaceAdjust => pace_adjust,
        :PerMode => per_mode,
        :Period => period,
        :PlayerExperience => player_experience,
        :PlayerPosition => player_position,
        :PlusMinus => plus_minus,
        :Rank => rank,
        :Season => season,
        :SeasonSegment => season_segment,
        :SeasonType => season_type,
        :StarterBench => starter_bench,
        :VsConference => vs_conference,
        :VsDivision => vs_division
    })
)
end