Module: NBA::DraftCombineSpotShooting

Defined in:
lib/nba/draft_combine_spot_shooting.rb

Overview

Provides methods to retrieve draft combine spot shooting data

Defined Under Namespace

Modules: CollegeRange, FifteenFoot, NbaRange, ResultAttributes

Constant Summary collapse

RESULTS =

Result set name

Returns:

  • (String)

    the result set name

"Results".freeze

Class Method Summary collapse

Class Method Details

.all(season:, league: League::NBA, client: CLIENT) ⇒ Collection

Retrieves draft combine spot shooting results for a season

Examples:

results = NBA::DraftCombineSpotShooting.all(season: 2019)
results.each { |r| puts "#{r.player_name}: #{r.nba_corner_left_pct}" }

Parameters:

  • season (Integer)

    the draft combine season year

  • league (String, League) (defaults to: League::NBA)

    the league ID or League object (default NBA)

  • client (Client) (defaults to: CLIENT)

    the API client to use

Returns:

  • (Collection)

    a collection of draft combine spot shooting results



23
24
25
26
27
28
# File 'lib/nba/draft_combine_spot_shooting.rb', line 23

def self.all(season:, league: League::NBA, client: CLIENT)
  league_id = Utils.extract_league_id(league)
  path = build_path(season, league_id)
  response = client.get(path)
  parse_response(response)
end