-
Notifications
You must be signed in to change notification settings - Fork 15
Data Types: Sports
KCNilssen edited this page Dec 16, 2022
·
4 revisions
Attributes are expandable and collapsable - Link to Sport dataclass
id : int
- id number of the sport
link : str
- link of the sport
name : str
- name the sport
code : str
- Sport code
abbreviation : str
- Abbreviation for the sport
sortorder : int
- Some sort of sorting order
activestatus : bool
- Is the sport active
Description: Returns sport object from sport_id
Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
sport_id |
string/int | Yes | description |
Other Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
fields |
string | No | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
Description: Return all sports
Other Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
fields |
string | No | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
http://statsapi.mlb.com/api/v1/sports
import mlbstatsapi
mlb = mlbstatsapi.Mlb()
mlb.get_sports()
Note: This information is provided for reference only, without warranty or guarantee, and is not official documentation provided by MLB. This package and its author are not affiliated with MLB or any MLB team. This API wrapper interfaces with MLB's Stats API. Use of MLB data is subject to the notice posted at http://gdx.mlb.com/components/copyright.txt.