Skip to content

Data Types: Sports

KCNilssen edited this page Dec 16, 2022 · 4 revisions

Usage that returns Sport objects

To be added

Sport Structure

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

Example output from MLB stats api endpoint

Mlb stats api Query:

http://statsapi.mlb.com/api/v1/sports

Equivelant with python-mlb-statsapi:

import mlbstatsapi

mlb = mlbstatsapi.Mlb()

mlb.get_sports()

Clone this wiki locally