Sha256: 9e09e98c3ecc61c5c7b0fce14a884b2d1db02e80a195c61d857753e79356d657

Contents?: true

Size: 546 Bytes

Versions: 1

Compression:

Stored size: 546 Bytes

Contents

# frozen_string_literal: true

module MLBStatsAPI
  # Operations pertaining to MLB Rule 4 Draft (First-Year Player Draft)
  module Drafts
    # View drafted players by year.
    def draft(year, **options) = get("/draft/#{year}", **options)

    # View draft eligible prospects by year.
    def draft_prospects(year, **options) = get("/draft/#{year}/prospects", **options)

    # View latest player drafted, endpoint best used when draft is currently open.
    def draft_latest(year, **options) = get("/draft/#{year}/latest", **options)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mlb_stats_api-0.4.0 lib/mlb_stats_api/drafts.rb