Sha256: 1ca68ab37945252888c94be60dd946cfabf7093a92da23b5322f292dee003223

Contents?: true

Size: 500 Bytes

Versions: 1

Compression:

Stored size: 500 Bytes

Contents

# frozen_string_literal: true

module MLBStatsAPI
  module Schedules
    SCHEDULE_TYPES = {
      default: '/schedule',
      postseason: '/schedule/postseason',
      tied: '/schedule/games/tied',
      postseason_series: '/schedule/postseason/series',
      tune_in: '/schedule/postseason/tuneIn'
    }.freeze

    def schedule(type = :default, options = {})
      raise ArgumentError, 'invalid schedule type' unless SCHEDULE_TYPES[type]

      get(SCHEDULE_TYPES[type], options)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mlb_stats_api-0.2.0 lib/mlb_stats_api/schedules.rb