mlbstats/api/docs/WeatherApi.md

6.4 KiB

{{classname}}

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

Method HTTP request Description
WeatherBasic Get /api/v1/weather/venues/{venueId}/basic Get basic weather for a venue.
WeatherDataBasedOnPlay Get /api/v1/weather/game/{gamePk}/{playId} Get the raw field weather data.
WeatherForecast Get /api/v1/weather/game/{gamePk}/forecast/{roofType} Get the weather forecast for a game.
WeatherFull Get /api/v1/weather/venues/{venueId}/full Get full weather for a venue.

WeatherBasic

BasicWeatherWrapperRestObject WeatherBasic(ctx, venueId, optional) Get basic weather for a venue.

Returns a json file containing basic weather for a specific venue.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a WeatherApiWeatherBasicOpts struct

Name Type Description Notes

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

Return type

BasicWeatherWrapperRestObject

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=UTF-8

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

WeatherDataBasedOnPlay

PlayWeatherWrapperRestObject WeatherDataBasedOnPlay(ctx, gamePk, playId, optional) Get the raw field weather data.

Returns a json file containing weather for the current play.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
gamePk int32 Unique Primary Key Representing a Game
playId string Unique identifier for a play within a game
optional *WeatherApiWeatherDataBasedOnPlayOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a WeatherApiWeatherDataBasedOnPlayOpts struct

Name Type Description Notes

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

Return type

PlayWeatherWrapperRestObject

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=UTF-8

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

WeatherForecast

ForecastWeatherWrapperRestObject WeatherForecast(ctx, gamePk, roofType, optional) Get the weather forecast for a game.

Returns a json file containing the weather forecast for a specific game.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
gamePk int32 Unique Primary Key Representing a Game
roofType RoofType Venue roof type
optional *WeatherApiWeatherForecastOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a WeatherApiWeatherForecastOpts struct

Name Type Description Notes

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

Return type

ForecastWeatherWrapperRestObject

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=UTF-8

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

WeatherFull

FullWeatherWrapperRestObject WeatherFull(ctx, venueId, optional) Get full weather for a venue.

Returns a json file containing full weather for a specific venue.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a WeatherApiWeatherFullOpts struct

Name Type Description Notes

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

Return type

FullWeatherWrapperRestObject

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=UTF-8

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