Module: NBA::TeamGameStreakFinder
- Defined in:
- lib/nba/team_game_streak_finder.rb
Overview
Provides methods to find team game streaks
Constant Summary collapse
- RESULT_SET_NAME =
Result set name for streak finder results
"TeamGameStreakFinderParametersResults".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, w_streak: :WStreak, l_streak: :LStreak}.freeze
Class Method Summary collapse
-
.find(season: 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, w_streak: nil, l_streak: nil, client: CLIENT) ⇒ Collection
Finds team game streaks matching the specified criteria.
Class Method Details
.find(season: 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, w_streak: nil, l_streak: nil, client: CLIENT) ⇒ Collection
Finds team game streaks matching the specified criteria
39 40 41 42 43 44 45 |
# File 'lib/nba/team_game_streak_finder.rb', line 39 def self.find(season: 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, w_streak: nil, l_streak: 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, w_streak: w_streak, l_streak: l_streak} path = build_path(season, team, active_streaks_only, filters) ResponseParser.parse(client.get(path), result_set: RESULT_SET_NAME) { |data| build_streak(data) } end |