Skip to content

Data Types: Draft(Round)

MattsFace edited this page Jan 4, 2023 · 7 revisions

Draft(Round) Structure

Attributes are expandable and collapsable - Link to Draft(Round) dataclass

round : str
  • The round number of the draft, represented as a string.
picks : List[DraftPick]
  • A list of DraftPick objects representing the picks made in this round of the draft. Dataclass: Draftpick
bisplayerid : int
  • The unique identifier of the player associated with this draft pick.
pickround : str
  • The round of the draft in which this pick was made.
picknumber : int
  • The number of the pick in the round.
roundpicknumber : int
  • The number of the pick overall in the draft.
rank : int
  • The rank of the player among all players eligible for the draft.
pickvalue : str
  • The value of the pick, if known.
signingbonus : str
  • The signing bonus associated with this pick, if known.
home : Home
  • Information about the player's home location. Dataclass: Home
city : str
  • The city where the player is from.
state : str
  • The state where the player is from.
country : str
  • The country where the player is from.
scoutingreport : str
  • A scouting report on the player's abilities.
school : School
  • Information about the player's school or college. Dataclass: School
name : str
  • The name of the school.
schoolclass : str
  • The class the student is in.
city : str
  • The city where the school is located.
country : str
  • The country where the school is located.
state : str
  • The state where the school is located.
blurb : str
  • A brief summary of the player's background and accomplishments.
headshotlink : str
  • A link to a headshot image of the player.
team : Team
  • The team that made this draft pick. Dataclass: Team
springleague : League
  • The spring league of the team. Dataclass: League
id : int
  • id number of the league
name : str
  • name of the league
link : str
  • link of the league
abbreviation : str
  • abbreviation the league
allstarstatus : str
  • The all status status of the team
id : int
  • id number of the team
name : str
  • name of the team
link : str
  • The API link for the team
drafttype : CodeDesc
  • Information about the type of draft in which this pick was made. Dataclass: CodeDesc
code : str
  • the pitch code to reference the pitch
description : str
  • the description of the pitch
isdrafted : bool
  • Whether or not the player associated with this pick has been drafted.
ispass : bool
  • Whether or not the team passed on making a pick in this round.
year : str
  • The year in which the draft took place.

Usage that returns Draft(Round) objects

get_draft

Description: Returns a draft object for year_id

Parameters:

Name Type Required Description Default
year_id string/int Yes Insert a year_id to return a directory of seasons for a specific sport. None

Other Parameters:

Name Type Required Description Default
round string No Insert a round to return biographical and financial data for a specific round in a Rule 4 draft. None
name string No Insert the first letter of a draftees last name to return their Rule 4 biographical and financial data. None
school string No Insert the first letter of a draftees school to return their Rule 4 biographical and financial data. None
state string No Insert state to return a list of Rule 4 draftees from that given state. None
country string No Insert state to return a list of Rule 4 draftees from that given country. None
position string No Insert the position to return Rule 4 biographical and financial data for a players drafted at that position. None
teamId string/int No Insert teamId to return Rule 4 biographical and financial data for all picks made by a specific team. None
playerId string/int No Insert MLB playerId to return a player's Rule 4 biographical and financial data a specific Rule 4 draft. None
bisPlayerId string/int No Insert bisPlayerId to return a player's Rule 4 biographical and financial data a specific Rule 4 draft. None

Example output from MLB stats api endpoint

Mlb stats api Query:

https://statsapi.mlb.com/api/v1/draft/2018?round=1&name=M&school=A&position=P&teamId=116&playerId=663554&bisPlayerId=759143

Equivelant with python-mlb-statsapi:

>>> import mlbstatsapi
>>>
>>> mlb = mlbstatsapi.Mlb()
>>>
>>> draft_year = mlb.get_draft(year_id = 2018)
>>> 
>>> print(draft_year)
[Round(round=1, picks=[DraftPick(), DraftPick(), DraftPick()], Round(round=2, picks=[DraftPick(), DraftPick(), DraftPick()])]
>>>
>>> draft = mlb.get_graft(year_id = 2021, round = 2)
[Round(round=2, picks=[DraftPick(), DraftPick(), DraftPick()])]