mlbstats/api/docs/StandingsApi.md

4.1 KiB

{{classname}}

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

Method HTTP request Description
Standings Get /api/v1/standings/{standingsType} View standings for a league
Standings1 Get /api/v1/standings View standings for a league

Standings

StandingsRestObject Standings(ctx, standingsType, optional) View standings for a league

This endpoint allows you to pull standings

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
standingsType string Type of season. Available types in /api/v1/standingsTypes
optional *StandingsApiStandingsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a StandingsApiStandingsOpts struct

Name Type Description Notes

leagueId | **optional.Interface of []int32**| Unique League Identifier | season | optional.String| Season of play | standingsTypes | **optional.Interface of []StandingsType**| Type of season. Available types in /api/v1/standingsTypes | date | optional.String| Date of Game. Format: YYYY-MM-DD | teamId | optional.Int32| Unique Team Identifier. Format: 141, 147, etc | includeMLB | optional.Bool| Determines whether to include major league teams when using the 'BY_ORGANIZATION' standings type | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

StandingsRestObject

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]

Standings1

StandingsRestObject Standings1(ctx, standingsType, optional) View standings for a league

This endpoint allows you to pull standings

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
standingsType string Type of season. Available types in /api/v1/standingsTypes
optional *StandingsApiStandings1Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a StandingsApiStandings1Opts struct

Name Type Description Notes

leagueId | **optional.Interface of []int32**| Unique League Identifier | season | optional.String| Season of play | standingsTypes | **optional.Interface of []StandingsType**| Type of season. Available types in /api/v1/standingsTypes | date | optional.String| Date of Game. Format: YYYY-MM-DD | teamId | optional.Int32| Unique Team Identifier. Format: 141, 147, etc | includeMLB | optional.Bool| Determines whether to include major league teams when using the 'BY_ORGANIZATION' standings type | fields | **optional.Interface of []string**| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |

Return type

StandingsRestObject

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]