mlbstats/api/docs/LeagueApi.md

18 KiB

{{classname}}

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

Method HTTP request Description
AllStarBallot Get /api/v1/league/allStarBallot View al star ballot info
AllStarBallot1 Get /api/v1/league/{leagueId}/allStarBallot View al star ballot info
AllStarBallot2 Get /api/v1/leagues/allStarBallot View al star ballot info
AllStarBallot3 Get /api/v1/leagues/{leagueId}/allStarBallot View al star ballot info
AllStarFinalVote Get /api/v1/league/{leagueId}/allStarFinalVote View all star final vote info
AllStarFinalVote1 Get /api/v1/leagues/{leagueId}/allStarFinalVote View all star final vote info
AllStarWriteIns Get /api/v1/league/{leagueId}/allStarWriteIns View all star write ins info
AllStarWriteIns1 Get /api/v1/leagues/{leagueId}/allStarWriteIns View all star write ins info
League Get /api/v1/league View league info
League1 Get /api/v1/league/{leagueId} View league info
League2 Get /api/v1/leagues View league info
League3 Get /api/v1/leagues/{leagueId} View league info

AllStarBallot

string AllStarBallot(ctx, leagueId, optional) View al star ballot info

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
leagueId int32 Unique League Identifier
optional *LeagueApiAllStarBallotOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LeagueApiAllStarBallotOpts struct

Name Type Description Notes

leagueIds | **optional.Interface of []int32**| Comma delimited list of Unique league identifiers | season | optional.String| Season of play | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

string

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]

AllStarBallot1

string AllStarBallot1(ctx, leagueId, optional) View al star ballot info

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
leagueId int32 Unique League Identifier
optional *LeagueApiAllStarBallot1Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LeagueApiAllStarBallot1Opts struct

Name Type Description Notes

leagueIds | **optional.Interface of []int32**| Comma delimited list of Unique league identifiers | season | optional.String| Season of play | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

string

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]

AllStarBallot2

string AllStarBallot2(ctx, leagueId, optional) View al star ballot info

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
leagueId int32 Unique League Identifier
optional *LeagueApiAllStarBallot2Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LeagueApiAllStarBallot2Opts struct

Name Type Description Notes

leagueIds | **optional.Interface of []int32**| Comma delimited list of Unique league identifiers | season | optional.String| Season of play | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

string

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]

AllStarBallot3

string AllStarBallot3(ctx, leagueId, optional) View al star ballot info

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
leagueId int32 Unique League Identifier
optional *LeagueApiAllStarBallot3Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LeagueApiAllStarBallot3Opts struct

Name Type Description Notes

leagueIds | **optional.Interface of []int32**| Comma delimited list of Unique league identifiers | season | optional.String| Season of play | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

string

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]

AllStarFinalVote

string AllStarFinalVote(ctx, leagueId, optional) View all star final vote info

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
leagueId int32 Unique League Identifier
optional *LeagueApiAllStarFinalVoteOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LeagueApiAllStarFinalVoteOpts struct

Name Type Description Notes

season | optional.String| Season of play | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

string

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]

AllStarFinalVote1

string AllStarFinalVote1(ctx, leagueId, optional) View all star final vote info

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
leagueId int32 Unique League Identifier
optional *LeagueApiAllStarFinalVote1Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LeagueApiAllStarFinalVote1Opts struct

Name Type Description Notes

season | optional.String| Season of play | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

string

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]

AllStarWriteIns

string AllStarWriteIns(ctx, leagueId, optional) View all star write ins info

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
leagueId int32 Unique League Identifier
optional *LeagueApiAllStarWriteInsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LeagueApiAllStarWriteInsOpts struct

Name Type Description Notes

season | optional.String| Season of play | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

string

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]

AllStarWriteIns1

string AllStarWriteIns1(ctx, leagueId, optional) View all star write ins info

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
leagueId int32 Unique League Identifier
optional *LeagueApiAllStarWriteIns1Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LeagueApiAllStarWriteIns1Opts struct

Name Type Description Notes

season | optional.String| Season of play | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

string

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]

League

string League(ctx, leagueId, optional) View league info

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
leagueId int32 Unique League Identifier
optional *LeagueApiLeagueOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LeagueApiLeagueOpts struct

Name Type Description Notes

leagueIds | **optional.Interface of []int32**| Comma delimited list of Unique league identifiers | season | optional.String| Season of play | seasons | **optional.Interface of []string**| Comma delimited list of Seasons of play | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | sportId | optional.Int32| Top level organization of a sport | activeStatus | optional.Interface of LeagueActiveStatusEnum| Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) |

Return type

string

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]

League1

string League1(ctx, leagueId, optional) View league info

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
leagueId int32 Unique League Identifier
optional *LeagueApiLeague1Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LeagueApiLeague1Opts struct

Name Type Description Notes

leagueIds | **optional.Interface of []int32**| Comma delimited list of Unique league identifiers | season | optional.String| Season of play | seasons | **optional.Interface of []string**| Comma delimited list of Seasons of play | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | sportId | optional.Int32| Top level organization of a sport | activeStatus | optional.Interface of LeagueActiveStatusEnum| Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) |

Return type

string

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]

League2

string League2(ctx, leagueId, optional) View league info

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
leagueId int32 Unique League Identifier
optional *LeagueApiLeague2Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LeagueApiLeague2Opts struct

Name Type Description Notes

leagueIds | **optional.Interface of []int32**| Comma delimited list of Unique league identifiers | season | optional.String| Season of play | seasons | **optional.Interface of []string**| Comma delimited list of Seasons of play | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | sportId | optional.Int32| Top level organization of a sport | activeStatus | optional.Interface of LeagueActiveStatusEnum| Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) |

Return type

string

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]

League3

string League3(ctx, leagueId, optional) View league info

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
leagueId int32 Unique League Identifier
optional *LeagueApiLeague3Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a LeagueApiLeague3Opts struct

Name Type Description Notes

leagueIds | **optional.Interface of []int32**| Comma delimited list of Unique league identifiers | season | optional.String| Season of play | seasons | **optional.Interface of []string**| Comma delimited list of Seasons of play | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | sportId | optional.Int32| Top level organization of a sport | activeStatus | optional.Interface of LeagueActiveStatusEnum| Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) |

Return type

string

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]