mlbstats/api/docs/PredictionsAPI.md

151 lines
4.4 KiB
Markdown
Raw Normal View History

2025-04-06 23:39:04 +00:00
# \PredictionsAPI
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**GetProps**](PredictionsAPI.md#GetProps) | **Get** /api/v1/props/play/predictions | Get play-level predictions based on input scenarios
[**GetPropsAdjust**](PredictionsAPI.md#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
```go
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{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
**pitcherId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
**venueId** | [**interface{}**](interface{}.md) | Unique Venue Identifier |
**batSide** | [**interface{}**](interface{}.md) | Bat side of hitter |
**pitchHand** | [**interface{}**](interface{}.md) | Handedness of pitcher |
**batterPosition** | [**interface{}**](interface{}.md) | Position abbreviation. Format: SS, P, 1B, etc |
**pitcherPosition** | [**interface{}**](interface{}.md) | 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]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## GetPropsAdjust
> GetPropsAdjust(ctx).GamePk(gamePk).Execute()
Get play-level predictions based on input scenarios
### Example
```go
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{}**](interface{}.md) | 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]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)