Skip to content

Data Types: Awards

KCNilssen edited this page Dec 13, 2022 · 9 revisions

Usage that returns Award objects

get_awards

Description: Return a list of awards

Parameters:

Name Type Required Description Default
award_id string Yes Insert a awardId to return a directory of players for a given award. None

Other Parameters:

Name Type Required Description Default
sportId string/int No Insert a sportId to return a directory of players for a given award in a specific sport. None
leagueId string/int No Insert leagueId(s) to return a directory of players for a given award in a specific league. Format '103,104' None
season string/int No Insert year(s) to return a directory of players for a given award in a given season. Format '2016,2017' None

Award Structure

Attributes are expandable and collapsable - Link to award dataclass

To be added

Example output from MLB stats api endpoint

Mlb stats api Query:

https://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?sportId=1&season=2017&leagueId=103

Equivelant with python-mlb-statsapi:

import mlbstatsapi

mlb = mlbstatsapi.Mlb()

mlb.get_awards(award_id = MLBHOF, sportId = 1, season = 2017, leagueId = 103)

Clone this wiki locally