4.4 KiB
\PredictionsAPI
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
GetProps | Get /api/v1/props/play/predictions | Get play-level predictions based on input scenarios |
GetPropsAdjust | Get /api/v1/props/play/predictions/adjust | Get play-level predictions based on input scenarios |
GetProps
GetProps(ctx).BatterId(batterId).PitcherId(pitcherId).VenueId(venueId).BatSide(batSide).PitchHand(pitchHand).BatterPosition(batterPosition).PitcherPosition(pitcherPosition).Execute()
Get play-level predictions based on input scenarios
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
batterId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
pitcherId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
venueId := TODO // interface{} | Unique Venue Identifier (optional)
batSide := TODO // interface{} | Bat side of hitter (optional)
pitchHand := TODO // interface{} | Handedness of pitcher (optional)
batterPosition := TODO // interface{} | Position abbreviation. Format: SS, P, 1B, etc (optional)
pitcherPosition := TODO // interface{} | Position abbreviation. Format: SS, P, 1B, etc (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PredictionsAPI.GetProps(context.Background()).BatterId(batterId).PitcherId(pitcherId).VenueId(venueId).BatSide(batSide).PitchHand(pitchHand).BatterPosition(batterPosition).PitcherPosition(pitcherPosition).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PredictionsAPI.GetProps``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiGetPropsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
batterId | interface{} | Unique Player Identifier. Format: 434538, 429665, etc | |
pitcherId | interface{} | Unique Player Identifier. Format: 434538, 429665, etc | |
venueId | interface{} | Unique Venue Identifier | |
batSide | interface{} | Bat side of hitter | |
pitchHand | interface{} | Handedness of pitcher | |
batterPosition | interface{} | Position abbreviation. Format: SS, P, 1B, etc | |
pitcherPosition | interface{} | Position abbreviation. Format: SS, P, 1B, etc |
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]
GetPropsAdjust
GetPropsAdjust(ctx).GamePk(gamePk).Execute()
Get play-level predictions based on input scenarios
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PredictionsAPI.GetPropsAdjust(context.Background()).GamePk(gamePk).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PredictionsAPI.GetPropsAdjust``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiGetPropsAdjustRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
gamePk | interface{} | Unique Primary Key Representing a Game |
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]