Module: NBA::PlayerIndex
- Defined in:
- lib/nba/player_index.rb
Overview
Provides methods to search and retrieve the player index
Constant Summary collapse
- RESULT_SET_NAME =
Result set name for player index
"PlayerIndex".freeze
- HISTORICAL =
Historical flag: include historical players
1- CURRENT =
Historical flag: current players only
0
Class Method Summary collapse
-
.all(season: Utils.current_season, historical: CURRENT, active: nil, all_star: nil, college: nil, country: nil, draft_pick: nil, draft_year: nil, height: nil, team: nil, weight: nil, client: CLIENT) ⇒ Collection
Retrieves the player index with optional filters.
Class Method Details
.all(season: Utils.current_season, historical: CURRENT, active: nil, all_star: nil, college: nil, country: nil, draft_pick: nil, draft_year: nil, height: nil, team: nil, weight: nil, client: CLIENT) ⇒ Collection
Retrieves the player index with optional filters
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/nba/player_index.rb', line 53 def self.all(season: Utils.current_season, historical: CURRENT, active: nil, all_star: nil, college: nil, country: nil, draft_pick: nil, draft_year: nil, height: nil, team: nil, weight: nil, client: CLIENT) params = {season: season, historical: historical, active: active, all_star: all_star, college: college, country: country, draft_pick: draft_pick, draft_year: draft_year, height: height, team: team, weight: weight} path = build_path(params) ResponseParser.parse(client.get(path), result_set: RESULT_SET_NAME) do |data| build_entry(data) end end |