mlbstats/api/docs/StatsAPI.md

975 lines
64 KiB
Markdown
Raw Normal View History

2025-04-06 23:39:04 +00:00
# \StatsAPI
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**BeastStats**](StatsAPI.md#BeastStats) | **Get** /api/v1/stats/search | View stats from search
[**GetOutsAboveAverage**](StatsAPI.md#GetOutsAboveAverage) | **Get** /api/v1/stats/analytics/outsAboveAverage | Get outs above average for the current batter
[**GetSprayChart**](StatsAPI.md#GetSprayChart) | **Get** /api/v1/stats/analytics/sprayChart | Get the spray chart info for the current batter
[**GetStolenBaseProbability**](StatsAPI.md#GetStolenBaseProbability) | **Get** /api/v1/stats/analytics/stolenBaseProbability | Get the probability of a hit for the given hit data
[**GroupedStats**](StatsAPI.md#GroupedStats) | **Get** /api/v1/stats/grouped | View grouped stats
[**Leaders2**](StatsAPI.md#Leaders2) | **Get** /api/v1/stats/leaders | Get leaders for a statistic
[**MetricStats**](StatsAPI.md#MetricStats) | **Get** /api/v1/stats/metrics | View metric stats
[**Stats2**](StatsAPI.md#Stats2) | **Get** /api/v1/stats | View stats
## BeastStats
> BeastStats(ctx).Group(group).GamePks(gamePks).PlayIds(playIds).Seasons(seasons).GameTypes(gameTypes).Date(date).StartDate(startDate).EndDate(endDate).TeamIds(teamIds).PitcherTeamIds(pitcherTeamIds).BatterTeamIds(batterTeamIds).SportIds(sportIds).PitcherSportIds(pitcherSportIds).BatterSportIds(batterSportIds).LeagueIds(leagueIds).PitcherLeagueIds(pitcherLeagueIds).BatterLeagueIds(batterLeagueIds).DivisionIds(divisionIds).PitcherDivisionIds(pitcherDivisionIds).BatterDivisionIds(batterDivisionIds).PitchersOnTeamIds(pitchersOnTeamIds).BattersOnTeamIds(battersOnTeamIds).PlayerIds(playerIds).PlayerPool(playerPool).PitcherIds(pitcherIds).BatterIds(batterIds).CatcherIds(catcherIds).FirstBasemanIds(firstBasemanIds).SecondBasemanIds(secondBasemanIds).ThirdBasemanIds(thirdBasemanIds).ShortstopIds(shortstopIds).LeftFielderIds(leftFielderIds).CenterFielderIds(centerFielderIds).RightFielderIds(rightFielderIds).RunnerFirstIds(runnerFirstIds).RunnerSecondIds(runnerSecondIds).RunnerThirdIds(runnerThirdIds).VenueIds(venueIds).PitchHand(pitchHand).BatSide(batSide).PitchTypes(pitchTypes).PitchCodes(pitchCodes).EventTypes(eventTypes).Positions(positions).PrimaryPositions(primaryPositions).MinPitchSpeed(minPitchSpeed).MaxPitchSpeed(maxPitchSpeed).MinSpinRate(minSpinRate).MaxSpinRate(maxSpinRate).MinExtension(minExtension).MaxExtension(maxExtension).MinExitVelocityAgainst(minExitVelocityAgainst).MaxExitVelocityAgainst(maxExitVelocityAgainst).MinLaunchAngleAgainst(minLaunchAngleAgainst).MaxLaunchAngleAgainst(maxLaunchAngleAgainst).MinExitVelocity(minExitVelocity).MaxExitVelocity(maxExitVelocity).MinLaunchAngle(minLaunchAngle).MaxLaunchAngle(maxLaunchAngle).MinHomeRunDistance(minHomeRunDistance).MaxHomeRunDistance(maxHomeRunDistance).MinHitDistance(minHitDistance).MaxHitDistance(maxHitDistance).MinHangTime(minHangTime).MaxHangTime(maxHangTime).MinHitProbability(minHitProbability).MaxHitProbability(maxHitProbability).MinCatchProbability(minCatchProbability).MaxCatchProbability(maxCatchProbability).MinAttackAngle(minAttackAngle).MaxAttackAngle(maxAttackAngle).MinBatSpeed(minBatSpeed).MaxBatSpeed(maxBatSpeed).MinHomeRunXBallparks(minHomeRunXBallparks).MaxHomeRunXBallparks(maxHomeRunXBallparks).IsBarrel(isBarrel).HitTrajectories(hitTrajectories).Limit(limit).Offset(offset).GroupBy(groupBy).CompareOver(compareOver).SortStat(sortStat).SortModifier(sortModifier).SortOrder(sortOrder).Percentile(percentile).MinOccurrences(minOccurrences).MinPlateAppearances(minPlateAppearances).MinInnings(minInnings).QualifierRate(qualifierRate).SitCodes(sitCodes).ShowTotals(showTotals).IncludeNullMetrics(includeNullMetrics).StatFields(statFields).AtBatNumbers(atBatNumbers).PitchNumbers(pitchNumbers).Fields(fields).Debug(debug).ActiveStatus(activeStatus).Execute()
View stats from search
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups
gamePks := TODO // interface{} | Comma delimited list of unique primary keys (optional)
playIds := TODO // interface{} | Comma delimited list of unique play identifiers (optional)
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
gameTypes := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
startDate := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
endDate := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
teamIds := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
pitcherTeamIds := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
batterTeamIds := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
pitcherSportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
batterSportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
pitcherLeagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
batterLeagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
divisionIds := TODO // interface{} | Comma delimited list of Unique League Identifiers (optional)
pitcherDivisionIds := TODO // interface{} | Comma delimited list of Unique League Identifiers (optional)
batterDivisionIds := TODO // interface{} | Comma delimited list of Unique League Identifiers (optional)
pitchersOnTeamIds := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
battersOnTeamIds := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
playerIds := TODO // interface{} | A unique identifier for a player (optional)
playerPool := TODO // interface{} | Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. (optional)
pitcherIds := TODO // interface{} | A unique identifier for a player (optional)
batterIds := TODO // interface{} | A unique identifier for a player (optional)
catcherIds := TODO // interface{} | A unique identifier for a player (optional)
firstBasemanIds := TODO // interface{} | A unique identifier for a player (optional)
secondBasemanIds := TODO // interface{} | A unique identifier for a player (optional)
thirdBasemanIds := TODO // interface{} | A unique identifier for a player (optional)
shortstopIds := TODO // interface{} | A unique identifier for a player (optional)
leftFielderIds := TODO // interface{} | A unique identifier for a player (optional)
centerFielderIds := TODO // interface{} | A unique identifier for a player (optional)
rightFielderIds := TODO // interface{} | A unique identifier for a player (optional)
runnerFirstIds := TODO // interface{} | A unique identifier for a player (optional)
runnerSecondIds := TODO // interface{} | A unique identifier for a player (optional)
runnerThirdIds := TODO // interface{} | A unique identifier for a player (optional)
venueIds := TODO // interface{} | Unique Venue Identifier (optional)
pitchHand := TODO // interface{} | Handedness of pitcher (optional)
batSide := TODO // interface{} | Bat side of hitter (optional)
pitchTypes := TODO // interface{} | Classification of pitch (fastball, curveball, etc...) (optional)
pitchCodes := TODO // interface{} | Result of the pitch (ball, called strike, etc...) (optional)
eventTypes := TODO // interface{} | Type of event (optional)
positions := TODO // interface{} | All of the details of a player's position (optional)
primaryPositions := TODO // interface{} | All of the details of a player's position (optional)
minPitchSpeed := TODO // interface{} | Minimum value to filter on (optional)
maxPitchSpeed := TODO // interface{} | Maximum value to filter on (optional)
minSpinRate := TODO // interface{} | Minimum value to filter on (optional)
maxSpinRate := TODO // interface{} | Maximum value to filter on (optional)
minExtension := TODO // interface{} | Minimum value to filter on (optional)
maxExtension := TODO // interface{} | Maximum value to filter on (optional)
minExitVelocityAgainst := TODO // interface{} | Minimum value to filter on (optional)
maxExitVelocityAgainst := TODO // interface{} | Maximum value to filter on (optional)
minLaunchAngleAgainst := TODO // interface{} | Minimum value to filter on (optional)
maxLaunchAngleAgainst := TODO // interface{} | Maximum value to filter on (optional)
minExitVelocity := TODO // interface{} | Minimum value to filter on (optional)
maxExitVelocity := TODO // interface{} | Maximum value to filter on (optional)
minLaunchAngle := TODO // interface{} | Minimum value to filter on (optional)
maxLaunchAngle := TODO // interface{} | Maximum value to filter on (optional)
minHomeRunDistance := TODO // interface{} | Minimum value to filter on (optional)
maxHomeRunDistance := TODO // interface{} | Maximum value to filter on (optional)
minHitDistance := TODO // interface{} | Minimum value to filter on (optional)
maxHitDistance := TODO // interface{} | Maximum value to filter on (optional)
minHangTime := TODO // interface{} | Minimum value to filter on (optional)
maxHangTime := TODO // interface{} | Maximum value to filter on (optional)
minHitProbability := TODO // interface{} | Minimum value to filter on (optional)
maxHitProbability := TODO // interface{} | Maximum value to filter on (optional)
minCatchProbability := TODO // interface{} | Minimum value to filter on (optional)
maxCatchProbability := TODO // interface{} | Maximum value to filter on (optional)
minAttackAngle := TODO // interface{} | Minimum value to filter on (optional)
maxAttackAngle := TODO // interface{} | Maximum value to filter on (optional)
minBatSpeed := TODO // interface{} | Minimum value to filter on (optional)
maxBatSpeed := TODO // interface{} | Maximum value to filter on (optional)
minHomeRunXBallparks := TODO // interface{} | Minimum value to filter on (optional)
maxHomeRunXBallparks := TODO // interface{} | Maximum value to filter on (optional)
isBarrel := TODO // interface{} | Whether or not a play resulted in a barreled ball (optional)
hitTrajectories := TODO // interface{} | Trajectory of hit (line drive, fly ball, etc...) (optional)
limit := TODO // interface{} | Number of results to return (optional)
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
groupBy := TODO // interface{} | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP (optional)
compareOver := TODO // interface{} | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP (optional)
sortStat := TODO // interface{} | Baseball stat to sort splits by. (optional)
sortModifier := TODO // interface{} | The prefix modifier for the sort stat. avg, min, max. I.E minExitVelocity, maxLaunchAngle, avgHitDistance (optional)
sortOrder := TODO // interface{} | The order of sorting, ascending or descending (optional)
percentile := TODO // interface{} | Only return averages above this percentile. used for best effort plays (optional)
minOccurrences := TODO // interface{} | Minimum occurrences to filter upon (optional)
minPlateAppearances := TODO // interface{} | Minimum occurrences to filter upon (optional)
minInnings := TODO // interface{} | Minimum occurrences to filter upon (optional)
qualifierRate := TODO // interface{} | Minimum occurrences to filter upon (optional)
sitCodes := TODO // interface{} | Situation code for a given stat split. (optional)
showTotals := TODO // interface{} | Columns to return totals (optional)
includeNullMetrics := TODO // interface{} | Show events with null metrics (optional)
statFields := TODO // interface{} | Baseball stat fields to populate (optional)
atBatNumbers := TODO // interface{} | The at bat number of a given game. Format: 1, 2, 3, etc (optional)
pitchNumbers := TODO // interface{} | The pitch number of a given game. Format: 1, 2, 3, etc (optional)
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
debug := TODO // interface{} | (optional)
activeStatus := TODO // interface{} | Whether or not a player is active (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.StatsAPI.BeastStats(context.Background()).Group(group).GamePks(gamePks).PlayIds(playIds).Seasons(seasons).GameTypes(gameTypes).Date(date).StartDate(startDate).EndDate(endDate).TeamIds(teamIds).PitcherTeamIds(pitcherTeamIds).BatterTeamIds(batterTeamIds).SportIds(sportIds).PitcherSportIds(pitcherSportIds).BatterSportIds(batterSportIds).LeagueIds(leagueIds).PitcherLeagueIds(pitcherLeagueIds).BatterLeagueIds(batterLeagueIds).DivisionIds(divisionIds).PitcherDivisionIds(pitcherDivisionIds).BatterDivisionIds(batterDivisionIds).PitchersOnTeamIds(pitchersOnTeamIds).BattersOnTeamIds(battersOnTeamIds).PlayerIds(playerIds).PlayerPool(playerPool).PitcherIds(pitcherIds).BatterIds(batterIds).CatcherIds(catcherIds).FirstBasemanIds(firstBasemanIds).SecondBasemanIds(secondBasemanIds).ThirdBasemanIds(thirdBasemanIds).ShortstopIds(shortstopIds).LeftFielderIds(leftFielderIds).CenterFielderIds(centerFielderIds).RightFielderIds(rightFielderIds).RunnerFirstIds(runnerFirstIds).RunnerSecondIds(runnerSecondIds).RunnerThirdIds(runnerThirdIds).VenueIds(venueIds).PitchHand(pitchHand).BatSide(batSide).PitchTypes(pitchTypes).PitchCodes(pitchCodes).EventTypes(eventTypes).Positions(positions).PrimaryPositions(primaryPositions).MinPitchSpeed(minPitchSpeed).MaxPitchSpeed(maxPitchSpeed).MinSpinRate(minSpinRate).MaxSpinRate(maxSpinRate).MinExtension(minExtension).MaxExtension(maxExtension).MinExitVelocityAgainst(minExitVelocityAgainst).MaxExitVelocityAgainst(maxExitVelocityAgainst).MinLaunchAngleAgainst(minLaunchAngleAgainst).MaxLaunchAngleAgainst(maxLaunchAngleAgainst).MinExitVelocity(minExitVelocity).MaxExitVelocity(maxExitVelocity).MinLaunchAngle(minLaunchAngle).MaxLaunchAngle(maxLaunchAngle).MinHomeRunDistance(minHomeRunDistance).MaxHomeRunDistance(maxHomeRunDistance).MinHitDistance(minHitDistance).MaxHitDistance(maxHitDistance).MinHangTime(minHangTime).MaxHangTime(maxHangTime).MinHitProbability(minHitProbability).MaxHitProbability(maxHitProbability).MinCatchProbability(minCatchProbability).MaxCatchProbability(maxCatchProbability).MinAttackAngle(minAttackAngle).MaxAttackAngle(maxAttackAngle).MinBatSpeed(minBatSpeed).MaxBatSpeed(maxBatSpeed).MinHomeRunXBallparks(minHomeRunXBallparks).MaxHomeRunXBallparks(maxHomeRunXBallparks).IsBarrel(isBarrel).HitTrajectories(hitTrajectories).Limit(limit).Offset(offset).GroupBy(groupBy).CompareOver(compareOver).SortStat(sortStat).SortModifier(sortModifier).SortOrder(sortOrder).Percentile(percentile).MinOccurrences(minOccurrences).MinPlateAppearances(minPlateAppearances).MinInnings(minInnings).QualifierRate(qualifierRate).SitCodes(sitCodes).ShowTotals(showTotals).IncludeNullMetrics(includeNullMetrics).StatFields(statFields).AtBatNumbers(atBatNumbers).PitchNumbers(pitchNumbers).Fields(fields).Debug(debug).ActiveStatus(activeStatus).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.BeastStats``: %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 apiBeastStatsRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
**gamePks** | [**interface{}**](interface{}.md) | Comma delimited list of unique primary keys |
**playIds** | [**interface{}**](interface{}.md) | Comma delimited list of unique play identifiers |
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
**gameTypes** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
**startDate** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
**endDate** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
**teamIds** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
**pitcherTeamIds** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
**batterTeamIds** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
**sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
**pitcherSportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
**batterSportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
**pitcherLeagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
**batterLeagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
**divisionIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique League Identifiers |
**pitcherDivisionIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique League Identifiers |
**batterDivisionIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique League Identifiers |
**pitchersOnTeamIds** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
**battersOnTeamIds** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
**playerIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**playerPool** | [**interface{}**](interface{}.md) | Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. |
**pitcherIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**batterIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**catcherIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**firstBasemanIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**secondBasemanIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**thirdBasemanIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**shortstopIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**leftFielderIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**centerFielderIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**rightFielderIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**runnerFirstIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**runnerSecondIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**runnerThirdIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**venueIds** | [**interface{}**](interface{}.md) | Unique Venue Identifier |
**pitchHand** | [**interface{}**](interface{}.md) | Handedness of pitcher |
**batSide** | [**interface{}**](interface{}.md) | Bat side of hitter |
**pitchTypes** | [**interface{}**](interface{}.md) | Classification of pitch (fastball, curveball, etc...) |
**pitchCodes** | [**interface{}**](interface{}.md) | Result of the pitch (ball, called strike, etc...) |
**eventTypes** | [**interface{}**](interface{}.md) | Type of event |
**positions** | [**interface{}**](interface{}.md) | All of the details of a player's position |
**primaryPositions** | [**interface{}**](interface{}.md) | All of the details of a player's position |
**minPitchSpeed** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxPitchSpeed** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minSpinRate** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxSpinRate** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minExtension** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxExtension** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minExitVelocityAgainst** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxExitVelocityAgainst** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minLaunchAngleAgainst** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxLaunchAngleAgainst** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minExitVelocity** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxExitVelocity** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minLaunchAngle** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxLaunchAngle** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minHomeRunDistance** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxHomeRunDistance** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minHitDistance** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxHitDistance** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minHangTime** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxHangTime** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minHitProbability** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxHitProbability** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minCatchProbability** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxCatchProbability** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minAttackAngle** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxAttackAngle** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minBatSpeed** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxBatSpeed** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**minHomeRunXBallparks** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxHomeRunXBallparks** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**isBarrel** | [**interface{}**](interface{}.md) | Whether or not a play resulted in a barreled ball |
**hitTrajectories** | [**interface{}**](interface{}.md) | Trajectory of hit (line drive, fly ball, etc...) |
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
**groupBy** | [**interface{}**](interface{}.md) | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP |
**compareOver** | [**interface{}**](interface{}.md) | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP |
**sortStat** | [**interface{}**](interface{}.md) | Baseball stat to sort splits by. |
**sortModifier** | [**interface{}**](interface{}.md) | The prefix modifier for the sort stat. avg, min, max. I.E minExitVelocity, maxLaunchAngle, avgHitDistance |
**sortOrder** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
**percentile** | [**interface{}**](interface{}.md) | Only return averages above this percentile. used for best effort plays |
**minOccurrences** | [**interface{}**](interface{}.md) | Minimum occurrences to filter upon |
**minPlateAppearances** | [**interface{}**](interface{}.md) | Minimum occurrences to filter upon |
**minInnings** | [**interface{}**](interface{}.md) | Minimum occurrences to filter upon |
**qualifierRate** | [**interface{}**](interface{}.md) | Minimum occurrences to filter upon |
**sitCodes** | [**interface{}**](interface{}.md) | Situation code for a given stat split. |
**showTotals** | [**interface{}**](interface{}.md) | Columns to return totals |
**includeNullMetrics** | [**interface{}**](interface{}.md) | Show events with null metrics |
**statFields** | [**interface{}**](interface{}.md) | Baseball stat fields to populate |
**atBatNumbers** | [**interface{}**](interface{}.md) | The at bat number of a given game. Format: 1, 2, 3, etc |
**pitchNumbers** | [**interface{}**](interface{}.md) | The pitch number of a given game. Format: 1, 2, 3, etc |
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
**debug** | [**interface{}**](interface{}.md) | |
**activeStatus** | [**interface{}**](interface{}.md) | Whether or not a player is active |
### 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)
## GetOutsAboveAverage
> GetOutsAboveAverage(ctx).GamePk(gamePk).Timecode(timecode).Fields(fields).Execute()
Get outs above average for the current batter
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePk := TODO // interface{} |
timecode := TODO // interface{} | (optional)
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.StatsAPI.GetOutsAboveAverage(context.Background()).GamePk(gamePk).Timecode(timecode).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.GetOutsAboveAverage``: %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 apiGetOutsAboveAverageRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**gamePk** | [**interface{}**](interface{}.md) | |
**timecode** | [**interface{}**](interface{}.md) | |
**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)
## GetSprayChart
> GetSprayChart(ctx).GamePk(gamePk).Timecode(timecode).Fields(fields).Execute()
Get the spray chart info for the current batter
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePk := TODO // interface{} |
timecode := TODO // interface{} | (optional)
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.StatsAPI.GetSprayChart(context.Background()).GamePk(gamePk).Timecode(timecode).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.GetSprayChart``: %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 apiGetSprayChartRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**gamePk** | [**interface{}**](interface{}.md) | |
**timecode** | [**interface{}**](interface{}.md) | |
**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)
## GetStolenBaseProbability
> GetStolenBaseProbability(ctx).GamePk(gamePk).Timecode(timecode).Execute()
Get the probability of a hit for the given hit data
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePk := TODO // interface{} |
timecode := TODO // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.StatsAPI.GetStolenBaseProbability(context.Background()).GamePk(gamePk).Timecode(timecode).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.GetStolenBaseProbability``: %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 apiGetStolenBaseProbabilityRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**gamePk** | [**interface{}**](interface{}.md) | |
**timecode** | [**interface{}**](interface{}.md) | |
### 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)
## GroupedStats
> GroupedStats(ctx).Stats(stats).Group(group).PersonId(personId).TeamId(teamId).TeamIds(teamIds).GameType(gameType).Season(season).Seasons(seasons).SportId(sportId).SportIds(sportIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).Metrics(metrics).GamePk(gamePk).BatterTeamId(batterTeamId).PitcherTeamId(pitcherTeamId).BatterId(batterId).PitcherId(pitcherId).SitCodes(sitCodes).CombineSits(combineSits).OpposingTeamId(opposingTeamId).Fields(fields).SortStat(sortStat).Order(order).PlayerPool(playerPool).Position(position).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).ExcludeTradedPlayers(excludeTradedPlayers).Offset(offset).Limit(limit).StatFields(statFields).SortField(sortField).Execute()
View grouped stats
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
stats := TODO // interface{} | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups
personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
teamIds := TODO // interface{} | Comma delimited list of Unique Team identifiers (optional)
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
season := TODO // interface{} | Season of play (optional)
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
sportId := TODO // interface{} | Top level organization of a sport (optional)
sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
leagueId := TODO // interface{} | Unique League Identifier (optional)
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
leagueListId := TODO // interface{} | Unique League List Identifier (optional)
metrics := TODO // interface{} | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics (optional)
gamePk := TODO // interface{} | Unique Primary Key Representing a Game (optional)
batterTeamId := TODO // interface{} | A unique identifier for the batter's team (optional)
pitcherTeamId := TODO // interface{} | A unique identifier for the pitcher's team (optional)
batterId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
pitcherId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
sitCodes := TODO // interface{} | Situation code for a given stat split. (optional)
combineSits := TODO // interface{} | If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false (optional)
opposingTeamId := TODO // interface{} | A unique identifier for the opposing team. Must be used with Team ID (optional)
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
sortStat := TODO // interface{} | Baseball stat to sort splits by. (optional)
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
playerPool := TODO // interface{} | Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. (optional)
position := TODO // interface{} | Position number. Format: 1, 2, 3, etc (optional)
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
daysBack := TODO // interface{} | Returns results from the last 'X' days (Starting from yesterday). (optional)
gamesBack := TODO // interface{} | Returns results from the last 'X' games played. (optional)
excludeTradedPlayers := TODO // interface{} | Excludes players who have since been traded from the input team (optional)
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
limit := TODO // interface{} | Number of results to return (optional)
statFields := TODO // interface{} | Baseball stat fields to populate (optional)
sortField := TODO // interface{} | Baseball statField to sort on. If no statField is given, sortField defaults to BASIC. If 1 statField is given, that is the default sortField. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.StatsAPI.GroupedStats(context.Background()).Stats(stats).Group(group).PersonId(personId).TeamId(teamId).TeamIds(teamIds).GameType(gameType).Season(season).Seasons(seasons).SportId(sportId).SportIds(sportIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).Metrics(metrics).GamePk(gamePk).BatterTeamId(batterTeamId).PitcherTeamId(pitcherTeamId).BatterId(batterId).PitcherId(pitcherId).SitCodes(sitCodes).CombineSits(combineSits).OpposingTeamId(opposingTeamId).Fields(fields).SortStat(sortStat).Order(order).PlayerPool(playerPool).Position(position).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).ExcludeTradedPlayers(excludeTradedPlayers).Offset(offset).Limit(limit).StatFields(statFields).SortField(sortField).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.GroupedStats``: %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 apiGroupedStatsRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**stats** | [**interface{}**](interface{}.md) | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes |
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
**personId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
**teamIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique Team identifiers |
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
**season** | [**interface{}**](interface{}.md) | Season of play |
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
**sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
**leagueListId** | [**interface{}**](interface{}.md) | Unique League List Identifier |
**metrics** | [**interface{}**](interface{}.md) | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics |
**gamePk** | [**interface{}**](interface{}.md) | Unique Primary Key Representing a Game |
**batterTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the batter's team |
**pitcherTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the pitcher's team |
**batterId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
**pitcherId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
**sitCodes** | [**interface{}**](interface{}.md) | Situation code for a given stat split. |
**combineSits** | [**interface{}**](interface{}.md) | If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false |
**opposingTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team. Must be used with Team ID |
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
**sortStat** | [**interface{}**](interface{}.md) | Baseball stat to sort splits by. |
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
**playerPool** | [**interface{}**](interface{}.md) | Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. |
**position** | [**interface{}**](interface{}.md) | Position number. Format: 1, 2, 3, etc |
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
**daysBack** | [**interface{}**](interface{}.md) | Returns results from the last 'X' days (Starting from yesterday). |
**gamesBack** | [**interface{}**](interface{}.md) | Returns results from the last 'X' games played. |
**excludeTradedPlayers** | [**interface{}**](interface{}.md) | Excludes players who have since been traded from the input team |
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
**statFields** | [**interface{}**](interface{}.md) | Baseball stat fields to populate |
**sortField** | [**interface{}**](interface{}.md) | Baseball statField to sort on. If no statField is given, sortField defaults to BASIC. If 1 statField is given, that is the default sortField. |
### 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)
## Leaders2
> Leaders2(ctx).LeaderCategories(leaderCategories).LeaderGameTypes(leaderGameTypes).StatGroup(statGroup).Season(season).Expand(expand).SportId(sportId).SportIds(sportIds).Stats(stats).Limit(limit).Offset(offset).TeamId(teamId).TeamIds(teamIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).PlayerPool(playerPool).StatType(statType).PlayerActive(playerActive).Position(position).SitCodes(sitCodes).OpposingTeamId(opposingTeamId).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).GroupBy(groupBy).Fields(fields).Execute()
Get leaders for a statistic
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
leaderCategories := TODO // interface{} | (optional)
leaderGameTypes := TODO // interface{} | (optional)
statGroup := TODO // interface{} | (optional)
season := TODO // interface{} | (optional)
expand := TODO // interface{} | (optional)
sportId := TODO // interface{} | (optional)
sportIds := TODO // interface{} | (optional)
stats := TODO // interface{} | (optional)
limit := TODO // interface{} | (optional)
offset := TODO // interface{} | (optional)
teamId := TODO // interface{} | (optional)
teamIds := TODO // interface{} | (optional)
leagueId := TODO // interface{} | (optional)
leagueIds := TODO // interface{} | (optional)
leagueListId := TODO // interface{} | (optional)
playerPool := TODO // interface{} | (optional)
statType := TODO // interface{} | (optional)
playerActive := TODO // interface{} | (optional)
position := TODO // interface{} | (optional)
sitCodes := TODO // interface{} | (optional)
opposingTeamId := TODO // interface{} | (optional)
startDate := TODO // interface{} | (optional)
endDate := TODO // interface{} | (optional)
daysBack := TODO // interface{} | (optional)
gamesBack := TODO // interface{} | (optional)
groupBy := TODO // interface{} | (optional)
fields := TODO // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.StatsAPI.Leaders2(context.Background()).LeaderCategories(leaderCategories).LeaderGameTypes(leaderGameTypes).StatGroup(statGroup).Season(season).Expand(expand).SportId(sportId).SportIds(sportIds).Stats(stats).Limit(limit).Offset(offset).TeamId(teamId).TeamIds(teamIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).PlayerPool(playerPool).StatType(statType).PlayerActive(playerActive).Position(position).SitCodes(sitCodes).OpposingTeamId(opposingTeamId).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).GroupBy(groupBy).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.Leaders2``: %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 apiLeaders2Request struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**leaderCategories** | [**interface{}**](interface{}.md) | |
**leaderGameTypes** | [**interface{}**](interface{}.md) | |
**statGroup** | [**interface{}**](interface{}.md) | |
**season** | [**interface{}**](interface{}.md) | |
**expand** | [**interface{}**](interface{}.md) | |
**sportId** | [**interface{}**](interface{}.md) | |
**sportIds** | [**interface{}**](interface{}.md) | |
**stats** | [**interface{}**](interface{}.md) | |
**limit** | [**interface{}**](interface{}.md) | |
**offset** | [**interface{}**](interface{}.md) | |
**teamId** | [**interface{}**](interface{}.md) | |
**teamIds** | [**interface{}**](interface{}.md) | |
**leagueId** | [**interface{}**](interface{}.md) | |
**leagueIds** | [**interface{}**](interface{}.md) | |
**leagueListId** | [**interface{}**](interface{}.md) | |
**playerPool** | [**interface{}**](interface{}.md) | |
**statType** | [**interface{}**](interface{}.md) | |
**playerActive** | [**interface{}**](interface{}.md) | |
**position** | [**interface{}**](interface{}.md) | |
**sitCodes** | [**interface{}**](interface{}.md) | |
**opposingTeamId** | [**interface{}**](interface{}.md) | |
**startDate** | [**interface{}**](interface{}.md) | |
**endDate** | [**interface{}**](interface{}.md) | |
**daysBack** | [**interface{}**](interface{}.md) | |
**gamesBack** | [**interface{}**](interface{}.md) | |
**groupBy** | [**interface{}**](interface{}.md) | |
**fields** | [**interface{}**](interface{}.md) | |
### 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)
## MetricStats
> MetricStats(ctx).Stats(stats).Metrics(metrics).PersonId(personId).PersonIds(personIds).BatterId(batterId).PitcherId(pitcherId).TeamId(teamId).Group(group).Season(season).Seasons(seasons).SportId(sportId).OpposingTeamId(opposingTeamId).OpposingPlayerId(opposingPlayerId).Position(position).EventType(eventType).PitchType(pitchType).HitTrajectory(hitTrajectory).BatSide(batSide).PitchHand(pitchHand).VenueId(venueId).GamePk(gamePk).MinValue(minValue).MaxValue(maxValue).Percentile(percentile).MinOccurrences(minOccurrences).Offset(offset).Limit(limit).Order(order).Date(date).StartDate(startDate).EndDate(endDate).GameType(gameType).BatterTeamId(batterTeamId).PitcherTeamId(pitcherTeamId).Fields(fields).Debug(debug).Execute()
View metric stats
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
stats := TODO // interface{} | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes
metrics := TODO // interface{} | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics
personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
personIds := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
batterId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
pitcherId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (optional)
season := TODO // interface{} | Season of play (optional)
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
sportId := TODO // interface{} | Top level organization of a sport (optional)
opposingTeamId := TODO // interface{} | A unique identifier for the opposing team. Must be used with Team ID (optional)
opposingPlayerId := TODO // interface{} | A unique identifier for the opposing team (optional)
position := TODO // interface{} | All of the details of a player's position (optional)
eventType := TODO // interface{} | Type of event (optional)
pitchType := TODO // interface{} | Classification of pitch (fastball, curveball, etc...) (optional)
hitTrajectory := TODO // interface{} | Trajectory of hit (line drive, fly ball, etc...) (optional)
batSide := TODO // interface{} | Bat side of hitter (optional)
pitchHand := TODO // interface{} | Handedness of pitcher (optional)
venueId := TODO // interface{} | All of the details of a venue (optional)
gamePk := TODO // interface{} | Unique Primary Key Representing a Game (optional)
minValue := TODO // interface{} | Minimum value to filter on (optional)
maxValue := TODO // interface{} | Maximum value to filter on (optional)
percentile := TODO // interface{} | Only return averages above this percentile. used for best effort plays (optional)
minOccurrences := TODO // interface{} | Minimum occurrences to filter upon (optional)
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
limit := TODO // interface{} | Number of results to return (optional)
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
batterTeamId := TODO // interface{} | A unique identifier for the batter's team (optional)
pitcherTeamId := TODO // interface{} | A unique identifier for the pitcher's team (optional)
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
debug := TODO // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.StatsAPI.MetricStats(context.Background()).Stats(stats).Metrics(metrics).PersonId(personId).PersonIds(personIds).BatterId(batterId).PitcherId(pitcherId).TeamId(teamId).Group(group).Season(season).Seasons(seasons).SportId(sportId).OpposingTeamId(opposingTeamId).OpposingPlayerId(opposingPlayerId).Position(position).EventType(eventType).PitchType(pitchType).HitTrajectory(hitTrajectory).BatSide(batSide).PitchHand(pitchHand).VenueId(venueId).GamePk(gamePk).MinValue(minValue).MaxValue(maxValue).Percentile(percentile).MinOccurrences(minOccurrences).Offset(offset).Limit(limit).Order(order).Date(date).StartDate(startDate).EndDate(endDate).GameType(gameType).BatterTeamId(batterTeamId).PitcherTeamId(pitcherTeamId).Fields(fields).Debug(debug).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.MetricStats``: %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 apiMetricStatsRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**stats** | [**interface{}**](interface{}.md) | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes |
**metrics** | [**interface{}**](interface{}.md) | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics |
**personId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
**personIds** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
**batterId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
**pitcherId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
**season** | [**interface{}**](interface{}.md) | Season of play |
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
**opposingTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team. Must be used with Team ID |
**opposingPlayerId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team |
**position** | [**interface{}**](interface{}.md) | All of the details of a player's position |
**eventType** | [**interface{}**](interface{}.md) | Type of event |
**pitchType** | [**interface{}**](interface{}.md) | Classification of pitch (fastball, curveball, etc...) |
**hitTrajectory** | [**interface{}**](interface{}.md) | Trajectory of hit (line drive, fly ball, etc...) |
**batSide** | [**interface{}**](interface{}.md) | Bat side of hitter |
**pitchHand** | [**interface{}**](interface{}.md) | Handedness of pitcher |
**venueId** | [**interface{}**](interface{}.md) | All of the details of a venue |
**gamePk** | [**interface{}**](interface{}.md) | Unique Primary Key Representing a Game |
**minValue** | [**interface{}**](interface{}.md) | Minimum value to filter on |
**maxValue** | [**interface{}**](interface{}.md) | Maximum value to filter on |
**percentile** | [**interface{}**](interface{}.md) | Only return averages above this percentile. used for best effort plays |
**minOccurrences** | [**interface{}**](interface{}.md) | Minimum occurrences to filter upon |
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
**batterTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the batter's team |
**pitcherTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the pitcher's team |
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
**debug** | [**interface{}**](interface{}.md) | |
### 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)
## Stats2
> Stats2(ctx).Stats(stats).Group(group).PersonId(personId).TeamId(teamId).TeamIds(teamIds).GameType(gameType).Season(season).Seasons(seasons).SportId(sportId).SportIds(sportIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).Metrics(metrics).GamePk(gamePk).BatterTeamId(batterTeamId).PitcherTeamId(pitcherTeamId).BatterId(batterId).PitcherId(pitcherId).SitCodes(sitCodes).CombineSits(combineSits).OpposingTeamId(opposingTeamId).Fields(fields).SortStat(sortStat).Order(order).PlayerPool(playerPool).Position(position).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).ExcludeTradedPlayers(excludeTradedPlayers).Offset(offset).Limit(limit).Execute()
View stats
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
stats := TODO // interface{} | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups
personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
teamIds := TODO // interface{} | Comma delimited list of Unique Team identifiers (optional)
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
season := TODO // interface{} | Season of play (optional)
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
sportId := TODO // interface{} | Top level organization of a sport (optional)
sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
leagueId := TODO // interface{} | Unique League Identifier (optional)
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
leagueListId := TODO // interface{} | Unique League List Identifier (optional)
metrics := TODO // interface{} | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics (optional)
gamePk := TODO // interface{} | Unique Primary Key Representing a Game (optional)
batterTeamId := TODO // interface{} | A unique identifier for the batter's team (optional)
pitcherTeamId := TODO // interface{} | A unique identifier for the pitcher's team (optional)
batterId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
pitcherId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
sitCodes := TODO // interface{} | Situation code for a given stat split. (optional)
combineSits := TODO // interface{} | If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false (optional)
opposingTeamId := TODO // interface{} | A unique identifier for the opposing team. Must be used with Team ID (optional)
fields := TODO // interface{} | (optional)
sortStat := TODO // interface{} | Baseball stat to sort splits by. (optional)
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
playerPool := TODO // interface{} | Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. (optional)
position := TODO // interface{} | Position number. Format: 1, 2, 3, etc (optional)
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
daysBack := TODO // interface{} | Returns results from the last 'X' days (Starting from yesterday). (optional)
gamesBack := TODO // interface{} | Returns results from the last 'X' games played. (optional)
excludeTradedPlayers := TODO // interface{} | Excludes players who have since been traded from the input team (optional)
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
limit := TODO // interface{} | Number of results to return (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.StatsAPI.Stats2(context.Background()).Stats(stats).Group(group).PersonId(personId).TeamId(teamId).TeamIds(teamIds).GameType(gameType).Season(season).Seasons(seasons).SportId(sportId).SportIds(sportIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).Metrics(metrics).GamePk(gamePk).BatterTeamId(batterTeamId).PitcherTeamId(pitcherTeamId).BatterId(batterId).PitcherId(pitcherId).SitCodes(sitCodes).CombineSits(combineSits).OpposingTeamId(opposingTeamId).Fields(fields).SortStat(sortStat).Order(order).PlayerPool(playerPool).Position(position).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).ExcludeTradedPlayers(excludeTradedPlayers).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.Stats2``: %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 apiStats2Request struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**stats** | [**interface{}**](interface{}.md) | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes |
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
**personId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
**teamIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique Team identifiers |
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
**season** | [**interface{}**](interface{}.md) | Season of play |
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
**sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
**leagueListId** | [**interface{}**](interface{}.md) | Unique League List Identifier |
**metrics** | [**interface{}**](interface{}.md) | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics |
**gamePk** | [**interface{}**](interface{}.md) | Unique Primary Key Representing a Game |
**batterTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the batter's team |
**pitcherTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the pitcher's team |
**batterId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
**pitcherId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
**sitCodes** | [**interface{}**](interface{}.md) | Situation code for a given stat split. |
**combineSits** | [**interface{}**](interface{}.md) | If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false |
**opposingTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team. Must be used with Team ID |
**fields** | [**interface{}**](interface{}.md) | |
**sortStat** | [**interface{}**](interface{}.md) | Baseball stat to sort splits by. |
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
**playerPool** | [**interface{}**](interface{}.md) | Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. |
**position** | [**interface{}**](interface{}.md) | Position number. Format: 1, 2, 3, etc |
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
**daysBack** | [**interface{}**](interface{}.md) | Returns results from the last 'X' days (Starting from yesterday). |
**gamesBack** | [**interface{}**](interface{}.md) | Returns results from the last 'X' games played. |
**excludeTradedPlayers** | [**interface{}**](interface{}.md) | Excludes players who have since been traded from the input team |
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
### 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)