mlbstats/api/docs/ScheduleApi.md

19 KiB

{{classname}}

All URIs are relative to https://statsapi.mlb.com

Method HTTP request Description
PostseasonSchedule Get /api/v1/schedule/postseason Get postseason schedule
PostseasonScheduleSeries Get /api/v1/schedule/postseason/series Get postseason series schedules
Schedule Get /api/v1/schedule View schedule info based on scheduleType.
Schedule1 Get /api/v1/schedule/{scheduleType} View schedule info based on scheduleType.
TieGames Get /api/v1/schedule/games/tied Get tied game schedules
TrackingEventsSchedule Get /api/v1/schedule/trackingEvents Get tracking event schedules
TuneIn Get /api/v1/schedule/postseason/tuneIn Get postseason TuneIn schedules

PostseasonSchedule

ScheduleRestObject PostseasonSchedule(ctx, optional) Get postseason schedule

This endpoint allows you to pull postseason schedules

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *ScheduleApiPostseasonScheduleOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScheduleApiPostseasonScheduleOpts struct

Name Type Description Notes
gameTypes **optional.Interface of []GameTypeEnum** Comma delimited list of type of Game. Available types in /api/v1/gameTypes
seriesNumber optional.Int32
teamId optional.Int32 Unique Team Identifier. Format: 141, 147, etc
sportId optional.Int32 Unique League Identifier
useLatestGames optional.Bool
useFeaturedGame optional.Bool
season optional.String
publicFacing optional.Interface of PublicFacingEnum Return public, non-public or all games. Format: Public Facing = 'Y', Non-Public Facing = 'N', All = 'A'
fields **optional.Interface of []string** Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute

Return type

ScheduleRestObject

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostseasonScheduleSeries

PostseasonScheduleRestObject PostseasonScheduleSeries(ctx, optional) Get postseason series schedules

This endpoint allows you to pull postseason schedules

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *ScheduleApiPostseasonScheduleSeriesOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScheduleApiPostseasonScheduleSeriesOpts struct

Name Type Description Notes
gameTypes **optional.Interface of []GameTypeEnum** Comma delimited list of type of Game. Available types in /api/v1/gameTypes
seriesNumber optional.Int32
teamId optional.Int32 Unique Team Identifier. Format: 141, 147, etc
sportId optional.Int32 Unique League Identifier
date optional.String Date of Game. Format: YYYY-MM-DD
startDate optional.String Start date for range of data (must be used with end date). Format: MM/DD/YYYY
endDate optional.String End date for range of data (must be used with start date). Format: MM/DD/YYYY
useLatestGames optional.Bool
useFeaturedGame optional.Bool
season optional.String
fields **optional.Interface of []string** Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute

Return type

PostseasonScheduleRestObject

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Schedule

ScheduleRestObject Schedule(ctx, usingPrivateEndpoint, optional) View schedule info based on scheduleType.

View schedule info. This endpoint allows you to pull schedules

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
usingPrivateEndpoint bool
optional *ScheduleApiScheduleOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScheduleApiScheduleOpts struct

Name Type Description Notes

calendarTypes | **optional.Interface of []CalendarTypes**| Comma delimited list of type of calendar types | eventTypes | **optional.Interface of []CalendarTypes**| Comma delimited list of type of events. <b>Note: Don't Use. This will be deprecated in favor of calendarTypes</b> | scheduleEventTypes | **optional.Interface of []ScheduleEventTypes**| Comma delimited list of type of event types | teamId | **optional.Interface of []int32**| Unique Team Identifier. Format: 141, 147, etc | leagueId | **optional.Interface of []int32**| Unique League Identifier | sportId | **optional.Interface of []int32**| Top level organization of a sport | gamePk | optional.Int32| Unique Primary Key Representing a Game | gamePks | **optional.Interface of []int32**| Comma delimited list of unique primary keys | eventIds | **optional.Interface of []int32**| A unique identifier for non-game event | venueIds | **optional.Interface of []int32**| Unique Venue Identifier | performerIds | **optional.Interface of []int32**| A unique identifier for non-team event performers | gameTypes | **optional.Interface of []GameTypeEnum**| Comma delimited list of type of Game. Available types in /api/v1/gameTypes | gameType | **optional.Interface of []GameTypeEnum**| Type of Game. Available types in /api/v1/gameTypes | season | **optional.Interface of []string**| Season of play | seasons | **optional.Interface of []string**| Comma delimited list of Seasons of play | date | optional.String| Date of Game. Format: YYYY-MM-DD | startDate | optional.String| Start date for range of data (must be used with end date). Format: MM/DD/YYYY | endDate | optional.String| End date for range of data (must be used with start date). Format: MM/DD/YYYY | timecode | optional.String| Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | useLatestGames | optional.Bool| | opponentId | **optional.Interface of []int32**| A unique identifier for the opposing team. Must be used with Team ID | publicFacing | optional.Interface of PublicFacingEnum| Return public, non-public or all games. Format: Public Facing = 'Y', Non-Public Facing = 'N', All = 'A' | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

ScheduleRestObject

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Schedule1

ScheduleRestObject Schedule1(ctx, usingPrivateEndpoint, optional) View schedule info based on scheduleType.

View schedule info. This endpoint allows you to pull schedules

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
usingPrivateEndpoint bool
optional *ScheduleApiSchedule1Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScheduleApiSchedule1Opts struct

Name Type Description Notes

calendarTypes | **optional.Interface of []CalendarTypes**| Comma delimited list of type of calendar types | eventTypes | **optional.Interface of []CalendarTypes**| Comma delimited list of type of events. <b>Note: Don't Use. This will be deprecated in favor of calendarTypes</b> | scheduleEventTypes | **optional.Interface of []ScheduleEventTypes**| Comma delimited list of type of event types | teamId | **optional.Interface of []int32**| Unique Team Identifier. Format: 141, 147, etc | leagueId | **optional.Interface of []int32**| Unique League Identifier | sportId | **optional.Interface of []int32**| Top level organization of a sport | gamePk | optional.Int32| Unique Primary Key Representing a Game | gamePks | **optional.Interface of []int32**| Comma delimited list of unique primary keys | eventIds | **optional.Interface of []int32**| A unique identifier for non-game event | venueIds | **optional.Interface of []int32**| Unique Venue Identifier | performerIds | **optional.Interface of []int32**| A unique identifier for non-team event performers | gameTypes | **optional.Interface of []GameTypeEnum**| Comma delimited list of type of Game. Available types in /api/v1/gameTypes | gameType | **optional.Interface of []GameTypeEnum**| Type of Game. Available types in /api/v1/gameTypes | season | **optional.Interface of []string**| Season of play | seasons | **optional.Interface of []string**| Comma delimited list of Seasons of play | date | optional.String| Date of Game. Format: YYYY-MM-DD | startDate | optional.String| Start date for range of data (must be used with end date). Format: MM/DD/YYYY | endDate | optional.String| End date for range of data (must be used with start date). Format: MM/DD/YYYY | timecode | optional.String| Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | useLatestGames | optional.Bool| | opponentId | **optional.Interface of []int32**| A unique identifier for the opposing team. Must be used with Team ID | publicFacing | optional.Interface of PublicFacingEnum| Return public, non-public or all games. Format: Public Facing = 'Y', Non-Public Facing = 'N', All = 'A' | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

ScheduleRestObject

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TieGames

ScheduleRestObject TieGames(ctx, season, optional) Get tied game schedules

This endpoint allows you to pull tie game schedules for the given season

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
season string Season of play
optional *ScheduleApiTieGamesOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScheduleApiTieGamesOpts struct

Name Type Description Notes

sportId | **optional.Interface of []int32**| Top level organization of a sport | gameTypes | **optional.Interface of []GameTypeEnum**| Comma delimited list of type of Game. Available types in /api/v1/gameTypes | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

ScheduleRestObject

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TrackingEventsSchedule

ScheduleRestObject TrackingEventsSchedule(ctx, optional) Get tracking event schedules

This endpoint allows you to pull schedules for tracking events

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *ScheduleApiTrackingEventsScheduleOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScheduleApiTrackingEventsScheduleOpts struct

Name Type Description Notes
calendarTypes **optional.Interface of []CalendarTypes** Comma delimited list of type of calendar types
eventTypes **optional.Interface of []CalendarTypes** Comma delimited list of type of events. <b>Note: Don't Use. This will be deprecated in favor of calendarTypes</b>
teamId **optional.Interface of []int32** Unique Team Identifier. Format: 141, 147, etc
leagueId **optional.Interface of []int32** Unique League Identifier
sportId **optional.Interface of []int32** Top level organization of a sport
gamePk optional.Int32 Unique Primary Key Representing a Game
gamePks **optional.Interface of []int32** Comma delimited list of unique primary keys
eventIds **optional.Interface of []int32** A unique identifier for non-game event
venueIds **optional.Interface of []int32** Unique Venue Identifier
performerIds **optional.Interface of []int32** A unique identifier for non-team event performers
gameTypes **optional.Interface of []GameTypeEnum** Comma delimited list of type of Game. Available types in /api/v1/gameTypes
gameType **optional.Interface of []GameTypeEnum** Type of Game. Available types in /api/v1/gameTypes
season **optional.Interface of []string** Season of play
seasons **optional.Interface of []string** Comma delimited list of Seasons of play
date optional.String Date of Game. Format: YYYY-MM-DD
startDate optional.String Start date for range of data (must be used with end date). Format: MM/DD/YYYY
endDate optional.String End date for range of data (must be used with start date). Format: MM/DD/YYYY
timecode optional.String Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS
useLatestGames optional.Bool
opponentId **optional.Interface of []int32** A unique identifier for the opposing team. Must be used with Team ID
publicFacing optional.Interface of PublicFacingEnum Return public, non-public or all games. Format: Public Facing = 'Y', Non-Public Facing = 'N', All = 'A'
fields **optional.Interface of []string** Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute

Return type

ScheduleRestObject

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TuneIn

ScheduleRestObject TuneIn(ctx, optional) Get postseason TuneIn schedules

This endpoint allows you to pull postseason schedules

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *ScheduleApiTuneInOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ScheduleApiTuneInOpts struct

Name Type Description Notes
teamId optional.Int32 Unique Team Identifier. Format: 141, 147, etc
sportId optional.Int32 Unique League Identifier
season optional.String Unique Primary Key Representing a Game
fields **optional.Interface of []string** Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute

Return type

ScheduleRestObject

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]