Class: NbaRb::Game::BoxscoreSummary
- Defined in:
- lib/nba_rb/game/boxscore_summary.rb
Class Attribute Summary collapse
-
.endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#end_period ⇒ Object
Returns the value of attribute end_period.
-
#end_range ⇒ Object
Returns the value of attribute end_range.
-
#game_id ⇒ Object
Returns the value of attribute game_id.
-
#range_type ⇒ Object
Returns the value of attribute range_type.
-
#season ⇒ Object
Returns the value of attribute season.
-
#season_type ⇒ Object
Returns the value of attribute season_type.
-
#start_period ⇒ Object
Returns the value of attribute start_period.
-
#start_range ⇒ Object
Returns the value of attribute start_range.
Instance Method Summary collapse
- #available_video ⇒ Object
- #endpoint ⇒ Object
- #game_info ⇒ Object
- #game_summary ⇒ Object
- #inactive_players ⇒ Object
-
#initialize(*args) ⇒ BoxscoreSummary
constructor
A new instance of BoxscoreSummary.
- #last_meeting ⇒ Object
- #line_score ⇒ Object
- #officials ⇒ Object
- #other_stats ⇒ Object
- #season_series ⇒ Object
Methods included from StatsRequest
Methods included from StatsHash
Constructor Details
#initialize(*args) ⇒ BoxscoreSummary
Returns a new instance of BoxscoreSummary.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 24 def initialize(*args) super(*args) @season ||= NbaRb::CURRENT_SEASON @season_type ||= NbaRb::SeasonType.default @range_type ||= NbaRb::RangeType.default @start_period ||= NbaRb::Period.default @end_period ||= NbaRb::Period.default @start_range ||= NbaRb::StartRange.default @end_range ||= NbaRb::EndRange.default res = stats_request(endpoint, 'GameID' => game_id, 'Season' => season, 'SeasonType' => season_type, 'RangeType' => range_type, 'StartPeriod' => start_period, 'EndPeriod' => end_period, 'StartRange' => start_range, 'EndRange' => end_range) @data = res['resultSets'] end |
Class Attribute Details
.endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
7 8 9 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 7 def endpoint @endpoint end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
14 15 16 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 14 def data @data end |
#end_period ⇒ Object
Returns the value of attribute end_period.
14 15 16 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 14 def end_period @end_period end |
#end_range ⇒ Object
Returns the value of attribute end_range.
14 15 16 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 14 def end_range @end_range end |
#game_id ⇒ Object
Returns the value of attribute game_id.
14 15 16 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 14 def game_id @game_id end |
#range_type ⇒ Object
Returns the value of attribute range_type.
14 15 16 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 14 def range_type @range_type end |
#season ⇒ Object
Returns the value of attribute season.
14 15 16 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 14 def season @season end |
#season_type ⇒ Object
Returns the value of attribute season_type.
14 15 16 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 14 def season_type @season_type end |
#start_period ⇒ Object
Returns the value of attribute start_period.
14 15 16 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 14 def start_period @start_period end |
#start_range ⇒ Object
Returns the value of attribute start_range.
14 15 16 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 14 def start_range @start_range end |
Instance Method Details
#available_video ⇒ Object
79 80 81 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 79 def available_video create_stats_hash(@data[8]) end |
#endpoint ⇒ Object
10 11 12 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 10 def endpoint self.class.endpoint end |
#game_info ⇒ Object
63 64 65 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 63 def game_info create_stats_hash(@data[4]) end |
#game_summary ⇒ Object
47 48 49 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 47 def game_summary create_stats_hash(@data[0]) end |
#inactive_players ⇒ Object
59 60 61 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 59 def inactive_players create_stats_hash(@data[3]) end |
#last_meeting ⇒ Object
71 72 73 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 71 def last_meeting create_stats_hash(@data[6]) end |
#line_score ⇒ Object
67 68 69 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 67 def line_score create_stats_hash(@data[5]) end |
#officials ⇒ Object
55 56 57 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 55 def officials create_stats_hash(@data[2]) end |
#other_stats ⇒ Object
51 52 53 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 51 def other_stats create_stats_hash(@data[1]) end |
#season_series ⇒ Object
75 76 77 |
# File 'lib/nba_rb/game/boxscore_summary.rb', line 75 def season_series create_stats_hash(@data[7]) end |