Module: NBA::PlayerGameStreakFinder
- Defined in:
- lib/nba/player_game_streak_finder.rb
Overview
Provides methods to find player game streaks
Constant Summary collapse
- RESULT_SET_NAME =
Result set name for streak finder results
"PlayerGameStreakFinderResults".freeze
- STAT_FILTERS =
Stat filter parameter mappings
{gt_pts: :GtPTS, gt_reb: :GtREB, gt_ast: :GtAST, gt_stl: :GtSTL, gt_blk: :GtBLK, gt_fg3m: :GtFG3M}.freeze
Class Method Summary collapse
-
.find(season: nil, player: nil, team: nil, active_streaks_only: nil, gt_pts: nil, gt_reb: nil, gt_ast: nil, gt_stl: nil, gt_blk: nil, gt_fg3m: nil, client: CLIENT) ⇒ Collection
Finds player game streaks matching the specified criteria.
Class Method Details
.find(season: nil, player: nil, team: nil, active_streaks_only: nil, gt_pts: nil, gt_reb: nil, gt_ast: nil, gt_stl: nil, gt_blk: nil, gt_fg3m: nil, client: CLIENT) ⇒ Collection
Finds player game streaks matching the specified criteria
37 38 39 40 41 42 |
# File 'lib/nba/player_game_streak_finder.rb', line 37 def self.find(season: nil, player: nil, team: nil, active_streaks_only: nil, gt_pts: nil, gt_reb: nil, gt_ast: nil, gt_stl: nil, gt_blk: nil, gt_fg3m: nil, client: CLIENT) filters = {gt_pts: gt_pts, gt_reb: gt_reb, gt_ast: gt_ast, gt_stl: gt_stl, gt_blk: gt_blk, gt_fg3m: gt_fg3m} path = build_path(season, player, team, active_streaks_only, filters) ResponseParser.parse(client.get(path), result_set: RESULT_SET_NAME) { |data| build_streak(data) } end |