Skip to content

Data Types: Draft(Round)

KCNilssen edited this page Dec 13, 2022 · 7 revisions

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

Draft(Round) Structure

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

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()

mlb.get_draft(year_id = 2018, round=1, name = M, school = A, position = P, teamId = 116, playerId = 663554, bisPlayerId = 759143)
Clone this wiki locally