mlbstats/api/docs/WeatherAPI.md

299 lines
8.2 KiB
Markdown

# \WeatherAPI
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**WeatherBasic**](WeatherAPI.md#WeatherBasic) | **Get** /api/v1/weather/venues/{venueId}/basic | Get basic weather for a venue.
[**WeatherDataBasedOnPlay**](WeatherAPI.md#WeatherDataBasedOnPlay) | **Get** /api/v1/weather/game/{gamePk}/{playId} | Get the raw field weather data.
[**WeatherForecast**](WeatherAPI.md#WeatherForecast) | **Get** /api/v1/weather/game/{gamePk}/forecast/{roofType} | Get the weather forecast for a game.
[**WeatherFull**](WeatherAPI.md#WeatherFull) | **Get** /api/v1/weather/venues/{venueId}/full | Get full weather for a venue.
## WeatherBasic
> WeatherBasic(ctx, venueId).Fields(fields).Execute()
Get basic weather for a venue.
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
venueId := TODO // interface{} | Unique Venue Identifier
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WeatherAPI.WeatherBasic(context.Background(), venueId).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WeatherAPI.WeatherBasic``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
```
### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**venueId** | [**interface{}**](.md) | Unique Venue Identifier |
### Other Parameters
Other parameters are passed through a pointer to a apiWeatherBasicRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## WeatherDataBasedOnPlay
> WeatherDataBasedOnPlay(ctx, gamePk, playId).Fields(fields).Execute()
Get the raw field weather data.
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
playId := TODO // interface{} | Unique identifier for a play within a game
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WeatherAPI.WeatherDataBasedOnPlay(context.Background(), gamePk, playId).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WeatherAPI.WeatherDataBasedOnPlay``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
```
### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
**playId** | [**interface{}**](.md) | Unique identifier for a play within a game |
### Other Parameters
Other parameters are passed through a pointer to a apiWeatherDataBasedOnPlayRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## WeatherForecast
> WeatherForecast(ctx, gamePk, roofType).Fields(fields).Execute()
Get the weather forecast for a game.
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
roofType := TODO // interface{} | Venue roof type
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WeatherAPI.WeatherForecast(context.Background(), gamePk, roofType).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WeatherAPI.WeatherForecast``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
```
### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
**roofType** | [**interface{}**](.md) | Venue roof type |
### Other Parameters
Other parameters are passed through a pointer to a apiWeatherForecastRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## WeatherFull
> WeatherFull(ctx, venueId).Fields(fields).Execute()
Get full weather for a venue.
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
venueId := TODO // interface{} | Unique Venue Identifier
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WeatherAPI.WeatherFull(context.Background(), venueId).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WeatherAPI.WeatherFull``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
```
### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**venueId** | [**interface{}**](.md) | Unique Venue Identifier |
### Other Parameters
Other parameters are passed through a pointer to a apiWeatherFullRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)