Module: MLBStatsAPI::Schedules
- Included in:
- Client
- Defined in:
- lib/mlb_stats_api/schedules.rb
Constant Summary collapse
- SCHEDULE_TYPES =
{ default: '/schedule', postseason: '/schedule/postseason', tied: '/schedule/games/tied', postseason_series: '/schedule/postseason/series', tune_in: '/schedule/postseason/tuneIn' }.freeze
Instance Method Summary collapse
Instance Method Details
#schedule(**options) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/mlb_stats_api/schedules.rb', line 13 def schedule(**) endpoint = SCHEDULE_TYPES[.delete(:type) || :default] raise ArgumentError, 'Invalid schedule type.' unless endpoint get endpoint, **{ sportId: 1 }.merge() end |