Module: NbaStats::BoxScoreFourFactors

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

Constant Summary collapse

BOX_SCORE_FOUR_FACTORS_PATH =

The path of the boxscorefourfactors API

'/stats/boxscorefourfactors'

Instance Method Summary collapse

Instance Method Details

#box_score_four_factors(game_id, range_type = 0, start_period = 0, end_period = 0, start_range = 0, end_range = 0) ⇒ NbaStats::Resources::BoxScoreFourFactors

Calls the boxscorefourfactors API and returns a BoxScoreFourFactors resource.

Parameters:

  • game_id (String)
  • range_type (Integer) (defaults to: 0)
  • start_period (Integer) (defaults to: 0)
  • end_period (Integer) (defaults to: 0)
  • start_range (Integer) (defaults to: 0)
  • end_range (Integer) (defaults to: 0)

Returns:



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/nba_stats/stats/box_score_four_factors.rb', line 19

def box_score_four_factors(
    game_id,
    range_type=0,
    start_period=0,
    end_period=0,
    start_range=0,
    end_range=0
)
  NbaStats::Resources::BoxScoreFourFactors.new(
      get(BOX_SCORE_FOUR_FACTORS_PATH, {
          :GameID => game_id,
          :RangeType => range_type,
          :StartPeriod => start_period,
          :EndPeriod => end_period,
          :StartRange => start_range,
          :EndRange => end_range
      })
  )
end