Module: MLBStatsAPI::Drafts

Included in:
Client
Defined in:
lib/mlb_stats_api/drafts.rb

Overview

Operations pertaining to MLB Rule 4 Draft (First-Year Player Draft)

Instance Method Summary collapse

Instance Method Details

#draft(year, options = {}) ⇒ Object

View drafted players by year.



9
10
11
# File 'lib/mlb_stats_api/drafts.rb', line 9

def draft(year, options = {})
  get "/draft/#{year}", options
end

#draft_latest(year, options = {}) ⇒ Object

View latest player drafted, endpoint best used when draft is currently open.



22
23
24
# File 'lib/mlb_stats_api/drafts.rb', line 22

def draft_latest(year, options = {})
  get "/draft/#{year}/latest", options
end

#draft_prospects(year, options = {}) ⇒ Object

View draft eligible prospects by year.



15
16
17
# File 'lib/mlb_stats_api/drafts.rb', line 15

def draft_prospects(year, options = {})
  get "/draft/#{year}/prospects", options
end