mlbstatsapi

package
v0.0.0-...-c5cd513 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TimeoutSeconds int
	APIBaseURL     string
}

func DefaultConfig

func DefaultConfig() *Config

func NewConfig

func NewConfig(apiVersion string) *Config

type Division

type Division struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type GetTeamsResponse

type GetTeamsResponse struct {
	Copyright string  `json:"copyright"`
	Teams     []*Team `json:"teams"`
}

type League

type League struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type MLBStatsAPI

type MLBStatsAPI struct {
	Config *Config
	// contains filtered or unexported fields
}

func New

func New() *MLBStatsAPI

func (*MLBStatsAPI) GetTeams

func (api *MLBStatsAPI) GetTeams() ([]*Team, error)

type Sport

type Sport struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type Team

type Team struct {
	ID              int       `json:"id"`
	AllStarStatus   string    `json:"allStarStatus"`
	Name            string    `json:"name"`
	Season          int       `json:"season"`
	Venue           *Venue    `json:"venue"`
	TeamCode        string    `json:"teamCode"`
	FileCode        string    `json:"fileCode"`
	Abbreviation    string    `json:"abbreviation"`
	TeamName        string    `json:"teamName"`
	LocationName    string    `json:"locationName"`
	FirstYearOfPlay string    `json:"firstYearOfPlay"`
	League          *League   `json:"league"`
	Division        *Division `json:"division"`
	Sport           *Sport    `json:"sport"`
	ShortName       string    `json:"shortName"`
	ParentOrgName   string    `json:"parentOrgName"`
	ParentOrgID     int       `json:"parentOrgId"`
	FranchiseName   string    `json:"franchiseName"`
	ClubName        string    `json:"clubName"`
	Active          bool      `json:"active"`
}

type Venue

type Venue struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL