8.2 KiB
\WeatherAPI
All URIs are relative to http://localhost
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
WeatherBasic(ctx, venueId).Fields(fields).Execute()
Get basic weather for a venue.
Example
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{} | 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{} | 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] [Back to Model list] [Back to README]
WeatherDataBasedOnPlay
WeatherDataBasedOnPlay(ctx, gamePk, playId).Fields(fields).Execute()
Get the raw field weather data.
Example
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{} | Unique Primary Key Representing a Game | |
playId | interface{} | 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{} | 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] [Back to Model list] [Back to README]
WeatherForecast
WeatherForecast(ctx, gamePk, roofType).Fields(fields).Execute()
Get the weather forecast for a game.
Example
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{} | Unique Primary Key Representing a Game | |
roofType | interface{} | 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{} | 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] [Back to Model list] [Back to README]
WeatherFull
WeatherFull(ctx, venueId).Fields(fields).Execute()
Get full weather for a venue.
Example
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{} | 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{} | 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] [Back to Model list] [Back to README]