Module: NBA::BoxScoreSummaryV3

Defined in:
lib/nba/box_score_summary_v3.rb

Overview

Provides methods to retrieve game summary information using V3 API

Constant Summary collapse

BOX_SCORE_SUMMARY =

Result set name for box score summary

Returns:

  • (String)

    the result set name

"boxScoreSummary".freeze

Class Method Summary collapse

Class Method Details

.find(game:, client: CLIENT) ⇒ BoxScoreSummaryV3Data?

Retrieves game summary information

Examples:

summary = NBA::BoxScoreSummaryV3.find(game: "0022400001")
puts "#{summary.home_team_name} #{summary.home_pts} - #{summary.away_pts} #{summary.away_team_name}"

Parameters:

  • game (String, Game)

    the game ID or Game object

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:



22
23
24
25
26
# File 'lib/nba/box_score_summary_v3.rb', line 22

def self.find(game:, client: CLIENT)
  game_id = Utils.extract_id(game)
  response = client.get("boxscoresummaryv3?GameID=#{game_id}")
  parse_response(response, game_id)
end