module MLBStatsAPI::Schedules
Constants
- SCHEDULE_TYPES
Public Instance Methods
schedule(type = :default, options = {})
click to toggle source
# File lib/mlb_stats_api/schedules.rb, line 13 def schedule(type = :default, options = {}) if type.is_a?(Hash) && options.empty? options = type type = :default end raise ArgumentError, 'invalid schedule type' unless SCHEDULE_TYPES[type] get SCHEDULE_TYPES[type], { sportId: 1 }.merge(options) end