Module: MLBStatsAPI::Stats
- Included in:
- Client
- Defined in:
- lib/mlb_stats_api/stats.rb
Overview
Operations pertaining to stats
Instance Method Summary collapse
-
#stats(**options) ⇒ Object
View statistics based on statType, group, season, and organization.
-
#stats_leaders(**options) ⇒ Object
View leaders for a statistic.
Instance Method Details
#stats(**options) ⇒ Object
View statistics based on statType, group, season, and organization.
7 8 9 10 11 12 |
# File 'lib/mlb_stats_api/stats.rb', line 7 def stats(**) raise ArgumentError, '#stats requires a stats arg' unless [:stats] raise ArgumentError, '#stats requires a group arg' unless [:group] get '/stats', ** end |
#stats_leaders(**options) ⇒ Object
View leaders for a statistic.
15 16 17 18 19 |
# File 'lib/mlb_stats_api/stats.rb', line 15 def stats_leaders(**) raise ArgumentError, '#stats_leaders requires a leaderCategories arg' unless [:leaderCategories] get '/stats/leaders', ** end |