513 lines
32 KiB
Markdown
513 lines
32 KiB
Markdown
|
# {{classname}}
|
||
|
|
||
|
All URIs are relative to *https://statsapi.mlb.com*
|
||
|
|
||
|
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**
|
||
|
> StatContainerRestObject BeastStats(ctx, group, optional)
|
||
|
View stats from search
|
||
|
|
||
|
### Required Parameters
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||
|
**group** | [**[]StatGroup**](StatGroup.md)| Category of statistic to return. Available types in /api/v1/statGroups |
|
||
|
**optional** | ***StatsApiBeastStatsOpts** | optional parameters | nil if no parameters
|
||
|
|
||
|
### Optional Parameters
|
||
|
Optional parameters are passed through a pointer to a StatsApiBeastStatsOpts struct
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**gamePks** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of unique primary keys |
|
||
|
**playIds** | [**optional.Interface of []string**](string.md)| Comma delimited list of unique play identifiers |
|
||
|
**seasons** | [**optional.Interface of []string**](string.md)| Comma delimited list of Seasons of play |
|
||
|
**gameTypes** | [**optional.Interface of []GameTypeEnum**](GameTypeEnum.md)| Type of Game. Available types in /api/v1/gameTypes |
|
||
|
**date** | **optional.String**| Date of Game. Format: YYYY-MM-DD |
|
||
|
**startDate** | **optional.String**| Date of Game. Format: YYYY-MM-DD |
|
||
|
**endDate** | **optional.String**| Date of Game. Format: YYYY-MM-DD |
|
||
|
**teamIds** | [**optional.Interface of []int32**](int32.md)| Unique Team Identifier. Format: 141, 147, etc |
|
||
|
**pitcherTeamIds** | [**optional.Interface of []int32**](int32.md)| Unique Team Identifier. Format: 141, 147, etc |
|
||
|
**batterTeamIds** | [**optional.Interface of []int32**](int32.md)| Unique Team Identifier. Format: 141, 147, etc |
|
||
|
**sportIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of top level organizations of a sport |
|
||
|
**pitcherSportIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of top level organizations of a sport |
|
||
|
**batterSportIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of top level organizations of a sport |
|
||
|
**leagueIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of Unique league identifiers |
|
||
|
**pitcherLeagueIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of Unique league identifiers |
|
||
|
**batterLeagueIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of Unique league identifiers |
|
||
|
**divisionIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of Unique League Identifiers |
|
||
|
**pitcherDivisionIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of Unique League Identifiers |
|
||
|
**batterDivisionIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of Unique League Identifiers |
|
||
|
**pitchersOnTeamIds** | [**optional.Interface of []int32**](int32.md)| Unique Team Identifier. Format: 141, 147, etc |
|
||
|
**battersOnTeamIds** | [**optional.Interface of []int32**](int32.md)| Unique Team Identifier. Format: 141, 147, etc |
|
||
|
**playerIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**playerPool** | [**optional.Interface of PlayerPoolEnum**](.md)| Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. |
|
||
|
**pitcherIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**batterIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**catcherIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**firstBasemanIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**secondBasemanIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**thirdBasemanIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**shortstopIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**leftFielderIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**centerFielderIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**rightFielderIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**runnerFirstIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**runnerSecondIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**runnerThirdIds** | [**optional.Interface of []int32**](int32.md)| A unique identifier for a player |
|
||
|
**venueIds** | [**optional.Interface of []int32**](int32.md)| Unique Venue Identifier |
|
||
|
**pitchHand** | **optional.String**| Handedness of pitcher |
|
||
|
**batSide** | **optional.String**| Bat side of hitter |
|
||
|
**pitchTypes** | [**optional.Interface of []PitchType**](PitchType.md)| Classification of pitch (fastball, curveball, etc...) |
|
||
|
**pitchCodes** | [**optional.Interface of []PitchCode**](PitchCode.md)| Result of the pitch (ball, called strike, etc...) |
|
||
|
**eventTypes** | [**optional.Interface of []EventType**](EventType.md)| Type of event |
|
||
|
**positions** | [**optional.Interface of []BaseballPosition**](BaseballPosition.md)| All of the details of a player's position |
|
||
|
**primaryPositions** | [**optional.Interface of []BaseballPosition**](BaseballPosition.md)| All of the details of a player's position |
|
||
|
**minPitchSpeed** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxPitchSpeed** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minSpinRate** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxSpinRate** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minExtension** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxExtension** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minExitVelocityAgainst** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxExitVelocityAgainst** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minLaunchAngleAgainst** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxLaunchAngleAgainst** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minExitVelocity** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxExitVelocity** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minLaunchAngle** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxLaunchAngle** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minHomeRunDistance** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxHomeRunDistance** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minHitDistance** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxHitDistance** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minHangTime** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxHangTime** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minHitProbability** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxHitProbability** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minCatchProbability** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxCatchProbability** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minAttackAngle** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxAttackAngle** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minBatSpeed** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxBatSpeed** | **optional.Float64**| Maximum value to filter on |
|
||
|
**minHomeRunXBallparks** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxHomeRunXBallparks** | **optional.Float64**| Maximum value to filter on |
|
||
|
**isBarrel** | **optional.Bool**| Whether or not a play resulted in a barreled ball |
|
||
|
**hitTrajectories** | [**optional.Interface of []HitTrajectory**](HitTrajectory.md)| Trajectory of hit (line drive, fly ball, etc...) |
|
||
|
**limit** | **optional.Int32**| Number of results to return |
|
||
|
**offset** | **optional.Int32**| The pointer to start for a return set; used for pagination |
|
||
|
**groupBy** | [**optional.Interface of []GroupByEnum**](GroupByEnum.md)| Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP |
|
||
|
**compareOver** | [**optional.Interface of []GroupByEnum**](GroupByEnum.md)| Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP |
|
||
|
**sortStat** | [**optional.Interface of BaseballStatsEnum**](.md)| Baseball stat to sort splits by. |
|
||
|
**sortModifier** | [**optional.Interface of AggregateSortTypeEnum**](.md)| The prefix modifier for the sort stat. avg, min, max. I.E minExitVelocity, maxLaunchAngle, avgHitDistance |
|
||
|
**sortOrder** | [**optional.Interface of SortOrderEnum**](.md)| The order of sorting, ascending or descending |
|
||
|
**percentile** | **optional.Int32**| Only return averages above this percentile. used for best effort plays |
|
||
|
**minOccurrences** | **optional.Int32**| Minimum occurrences to filter upon |
|
||
|
**minPlateAppearances** | **optional.Int32**| Minimum occurrences to filter upon |
|
||
|
**minInnings** | **optional.Int32**| Minimum occurrences to filter upon |
|
||
|
**qualifierRate** | **optional.Float64**| Minimum occurrences to filter upon |
|
||
|
**sitCodes** | [**optional.Interface of []string**](string.md)| Situation code for a given stat split. |
|
||
|
**showTotals** | **optional.Bool**| Columns to return totals |
|
||
|
**includeNullMetrics** | **optional.Bool**| Show events with null metrics |
|
||
|
**statFields** | [**optional.Interface of []StatField**](StatField.md)| Baseball stat fields to populate |
|
||
|
**atBatNumbers** | [**optional.Interface of []int32**](int32.md)| The at bat number of a given game. Format: 1, 2, 3, etc |
|
||
|
**pitchNumbers** | [**optional.Interface of []int32**](int32.md)| The pitch number of a given game. Format: 1, 2, 3, etc |
|
||
|
**fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||
|
**debug** | **optional.Bool**| |
|
||
|
**activeStatus** | [**optional.Interface of PlayerActiveStatusEnum**](.md)| Whether or not a player is active |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**StatContainerRestObject**](StatContainerRestObject.md)
|
||
|
|
||
|
### Authorization
|
||
|
|
||
|
[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)
|
||
|
|
||
|
### HTTP request headers
|
||
|
|
||
|
- **Content-Type**: Not defined
|
||
|
- **Accept**: */*
|
||
|
|
||
|
[[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**
|
||
|
> StatsRestObject GetOutsAboveAverage(ctx, gamePk, optional)
|
||
|
Get outs above average for the current batter
|
||
|
|
||
|
### Required Parameters
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||
|
**gamePk** | **int32**| |
|
||
|
**optional** | ***StatsApiGetOutsAboveAverageOpts** | optional parameters | nil if no parameters
|
||
|
|
||
|
### Optional Parameters
|
||
|
Optional parameters are passed through a pointer to a StatsApiGetOutsAboveAverageOpts struct
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**timecode** | **optional.String**| |
|
||
|
**fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**StatsRestObject**](StatsRestObject.md)
|
||
|
|
||
|
### Authorization
|
||
|
|
||
|
[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)
|
||
|
|
||
|
### HTTP request headers
|
||
|
|
||
|
- **Content-Type**: Not defined
|
||
|
- **Accept**: */*
|
||
|
|
||
|
[[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**
|
||
|
> StatsRestObject GetSprayChart(ctx, gamePk, optional)
|
||
|
Get the spray chart info for the current batter
|
||
|
|
||
|
### Required Parameters
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||
|
**gamePk** | **int32**| |
|
||
|
**optional** | ***StatsApiGetSprayChartOpts** | optional parameters | nil if no parameters
|
||
|
|
||
|
### Optional Parameters
|
||
|
Optional parameters are passed through a pointer to a StatsApiGetSprayChartOpts struct
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**timecode** | **optional.String**| |
|
||
|
**fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**StatsRestObject**](StatsRestObject.md)
|
||
|
|
||
|
### Authorization
|
||
|
|
||
|
[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)
|
||
|
|
||
|
### HTTP request headers
|
||
|
|
||
|
- **Content-Type**: Not defined
|
||
|
- **Accept**: */*
|
||
|
|
||
|
[[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**
|
||
|
> []int32 GetStolenBaseProbability(ctx, gamePk, optional)
|
||
|
Get the probability of a hit for the given hit data
|
||
|
|
||
|
### Required Parameters
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||
|
**gamePk** | **int32**| |
|
||
|
**optional** | ***StatsApiGetStolenBaseProbabilityOpts** | optional parameters | nil if no parameters
|
||
|
|
||
|
### Optional Parameters
|
||
|
Optional parameters are passed through a pointer to a StatsApiGetStolenBaseProbabilityOpts struct
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**timecode** | **optional.String**| |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
**[]int32**
|
||
|
|
||
|
### Authorization
|
||
|
|
||
|
[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)
|
||
|
|
||
|
### HTTP request headers
|
||
|
|
||
|
- **Content-Type**: Not defined
|
||
|
- **Accept**: */*
|
||
|
|
||
|
[[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**
|
||
|
> StatsRestObject GroupedStats(ctx, stats, group, optional)
|
||
|
View grouped stats
|
||
|
|
||
|
### Required Parameters
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||
|
**stats** | [**[]StatType**](StatType.md)| Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes |
|
||
|
**group** | [**[]StatGroup**](StatGroup.md)| Category of statistic to return. Available types in /api/v1/statGroups |
|
||
|
**optional** | ***StatsApiGroupedStatsOpts** | optional parameters | nil if no parameters
|
||
|
|
||
|
### Optional Parameters
|
||
|
Optional parameters are passed through a pointer to a StatsApiGroupedStatsOpts struct
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
|
||
|
**personId** | **optional.Int32**| Unique Player Identifier. Format: 434538, 429665, etc |
|
||
|
**teamId** | **optional.Int32**| Unique Team Identifier. Format: 141, 147, etc |
|
||
|
**teamIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of Unique Team identifiers |
|
||
|
**gameType** | [**optional.Interface of GameTypeEnum**](.md)| Type of Game. Available types in /api/v1/gameTypes |
|
||
|
**season** | **optional.String**| Season of play |
|
||
|
**seasons** | [**optional.Interface of []string**](string.md)| Comma delimited list of Seasons of play |
|
||
|
**sportId** | **optional.Int32**| Top level organization of a sport |
|
||
|
**sportIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of top level organizations of a sport |
|
||
|
**leagueId** | **optional.Int32**| Unique League Identifier |
|
||
|
**leagueIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of Unique league identifiers |
|
||
|
**leagueListId** | [**optional.Interface of LeagueListsEnum**](.md)| Unique League List Identifier |
|
||
|
**metrics** | [**optional.Interface of []MetricType**](MetricType.md)| Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics |
|
||
|
**gamePk** | **optional.Int32**| Unique Primary Key Representing a Game |
|
||
|
**batterTeamId** | [**optional.Interface of []int32**](int32.md)| A unique identifier for the batter's team |
|
||
|
**pitcherTeamId** | [**optional.Interface of []int32**](int32.md)| A unique identifier for the pitcher's team |
|
||
|
**batterId** | **optional.Int32**| Unique Player Identifier. Format: 434538, 429665, etc |
|
||
|
**pitcherId** | **optional.Int32**| Unique Player Identifier. Format: 434538, 429665, etc |
|
||
|
**sitCodes** | [**optional.Interface of []string**](string.md)| Situation code for a given stat split. |
|
||
|
**combineSits** | **optional.Bool**| 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** | **optional.Int32**| A unique identifier for the opposing team. Must be used with Team ID |
|
||
|
**fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||
|
**sortStat** | [**optional.Interface of BaseballStatsEnum**](.md)| Baseball stat to sort splits by. |
|
||
|
**order** | [**optional.Interface of SortOrderEnum**](.md)| The order of sorting, ascending or descending |
|
||
|
**playerPool** | [**optional.Interface of PlayerPoolEnum**](.md)| Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. |
|
||
|
**position** | [**optional.Interface of []BaseballPosition**](BaseballPosition.md)| Position number. Format: 1, 2, 3, etc |
|
||
|
**startDate** | **optional.String**| Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||
|
**endDate** | **optional.String**| End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||
|
**daysBack** | **optional.Int32**| Returns results from the last 'X' days (Starting from yesterday). |
|
||
|
**gamesBack** | **optional.Int32**| Returns results from the last 'X' games played. |
|
||
|
**excludeTradedPlayers** | **optional.Bool**| Excludes players who have since been traded from the input team |
|
||
|
**offset** | **optional.Int32**| The pointer to start for a return set; used for pagination |
|
||
|
**limit** | **optional.Int32**| Number of results to return |
|
||
|
**statFields** | [**optional.Interface of []StatField**](StatField.md)| Baseball stat fields to populate |
|
||
|
**sortField** | [**optional.Interface of StatField**](.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
|
||
|
|
||
|
[**StatsRestObject**](StatsRestObject.md)
|
||
|
|
||
|
### Authorization
|
||
|
|
||
|
No authorization required
|
||
|
|
||
|
### HTTP request headers
|
||
|
|
||
|
- **Content-Type**: Not defined
|
||
|
- **Accept**: */*
|
||
|
|
||
|
[[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**
|
||
|
> LeagueLeaderContainerRestObject Leaders2(ctx, optional)
|
||
|
Get leaders for a statistic
|
||
|
|
||
|
### Required Parameters
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||
|
**optional** | ***StatsApiLeaders2Opts** | optional parameters | nil if no parameters
|
||
|
|
||
|
### Optional Parameters
|
||
|
Optional parameters are passed through a pointer to a StatsApiLeaders2Opts struct
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**leaderCategories** | [**optional.Interface of []PersonLeadersEnum**](PersonLeadersEnum.md)| |
|
||
|
**leaderGameTypes** | [**optional.Interface of []GameTypeEnum**](GameTypeEnum.md)| |
|
||
|
**statGroup** | [**optional.Interface of []StatGroup**](StatGroup.md)| |
|
||
|
**season** | **optional.String**| |
|
||
|
**expand** | [**optional.Interface of []ExpandEnum**](ExpandEnum.md)| |
|
||
|
**sportId** | **optional.Int32**| |
|
||
|
**sportIds** | [**optional.Interface of []int32**](int32.md)| |
|
||
|
**stats** | [**optional.Interface of []StatType**](StatType.md)| |
|
||
|
**limit** | **optional.Int32**| |
|
||
|
**offset** | **optional.Int32**| |
|
||
|
**teamId** | **optional.Int32**| |
|
||
|
**teamIds** | [**optional.Interface of []int32**](int32.md)| |
|
||
|
**leagueId** | **optional.Int32**| |
|
||
|
**leagueIds** | [**optional.Interface of []int32**](int32.md)| |
|
||
|
**leagueListId** | [**optional.Interface of LeagueListsEnum**](.md)| |
|
||
|
**playerPool** | [**optional.Interface of PlayerPoolEnum**](.md)| |
|
||
|
**statType** | [**optional.Interface of StatType**](.md)| |
|
||
|
**playerActive** | [**optional.Interface of PlayerActiveStatusEnum**](.md)| |
|
||
|
**position** | [**optional.Interface of []BaseballPosition**](BaseballPosition.md)| |
|
||
|
**sitCodes** | [**optional.Interface of []string**](string.md)| |
|
||
|
**opposingTeamId** | **optional.Int32**| |
|
||
|
**startDate** | **optional.String**| |
|
||
|
**endDate** | **optional.String**| |
|
||
|
**daysBack** | **optional.Int32**| |
|
||
|
**gamesBack** | **optional.Int32**| |
|
||
|
**groupBy** | [**optional.Interface of GroupByEnum**](.md)| |
|
||
|
**fields** | [**optional.Interface of []string**](string.md)| |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**LeagueLeaderContainerRestObject**](LeagueLeaderContainerRestObject.md)
|
||
|
|
||
|
### Authorization
|
||
|
|
||
|
No authorization required
|
||
|
|
||
|
### HTTP request headers
|
||
|
|
||
|
- **Content-Type**: Not defined
|
||
|
- **Accept**: */*
|
||
|
|
||
|
[[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**
|
||
|
> StatsRestObject MetricStats(ctx, stats, metrics, optional)
|
||
|
View metric stats
|
||
|
|
||
|
### Required Parameters
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||
|
**stats** | [**[]StatType**](StatType.md)| Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes |
|
||
|
**metrics** | [**[]MetricType**](MetricType.md)| Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics |
|
||
|
**optional** | ***StatsApiMetricStatsOpts** | optional parameters | nil if no parameters
|
||
|
|
||
|
### Optional Parameters
|
||
|
Optional parameters are passed through a pointer to a StatsApiMetricStatsOpts struct
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
|
||
|
**personId** | **optional.Int32**| Unique Player Identifier. Format: 434538, 429665, etc |
|
||
|
**personIds** | [**optional.Interface of []int32**](int32.md)| Unique Player Identifier. Format: 434538, 429665, etc |
|
||
|
**batterId** | **optional.Int32**| Unique Player Identifier. Format: 434538, 429665, etc |
|
||
|
**pitcherId** | **optional.Int32**| Unique Player Identifier. Format: 434538, 429665, etc |
|
||
|
**teamId** | **optional.Int32**| Unique Team Identifier. Format: 141, 147, etc |
|
||
|
**group** | [**optional.Interface of []StatGroup**](StatGroup.md)| Category of statistic to return. Available types in /api/v1/statGroups |
|
||
|
**season** | **optional.String**| Season of play |
|
||
|
**seasons** | [**optional.Interface of []string**](string.md)| Comma delimited list of Seasons of play |
|
||
|
**sportId** | **optional.Int32**| Top level organization of a sport |
|
||
|
**opposingTeamId** | **optional.Int32**| A unique identifier for the opposing team. Must be used with Team ID |
|
||
|
**opposingPlayerId** | **optional.Int32**| A unique identifier for the opposing team |
|
||
|
**position** | [**optional.Interface of []BaseballPosition**](BaseballPosition.md)| All of the details of a player's position |
|
||
|
**eventType** | [**optional.Interface of []EventType**](EventType.md)| Type of event |
|
||
|
**pitchType** | [**optional.Interface of []string**](string.md)| Classification of pitch (fastball, curveball, etc...) |
|
||
|
**hitTrajectory** | [**optional.Interface of []HitTrajectory**](HitTrajectory.md)| Trajectory of hit (line drive, fly ball, etc...) |
|
||
|
**batSide** | **optional.String**| Bat side of hitter |
|
||
|
**pitchHand** | **optional.String**| Handedness of pitcher |
|
||
|
**venueId** | [**optional.Interface of []int32**](int32.md)| All of the details of a venue |
|
||
|
**gamePk** | **optional.Int32**| Unique Primary Key Representing a Game |
|
||
|
**minValue** | **optional.Float64**| Minimum value to filter on |
|
||
|
**maxValue** | **optional.Float64**| Maximum value to filter on |
|
||
|
**percentile** | **optional.Int32**| Only return averages above this percentile. used for best effort plays |
|
||
|
**minOccurrences** | **optional.Int32**| Minimum occurrences to filter upon |
|
||
|
**offset** | **optional.Int32**| The pointer to start for a return set; used for pagination |
|
||
|
**limit** | **optional.Int32**| Number of results to return |
|
||
|
**order** | [**optional.Interface of SortOrderEnum**](.md)| The order of sorting, ascending or descending |
|
||
|
**date** | **optional.String**| Date of Game. Format: YYYY-MM-DD |
|
||
|
**startDate** | **optional.String**| Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||
|
**endDate** | **optional.String**| End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||
|
**gameType** | [**optional.Interface of GameTypeEnum**](.md)| Type of Game. Available types in /api/v1/gameTypes |
|
||
|
**batterTeamId** | [**optional.Interface of []int32**](int32.md)| A unique identifier for the batter's team |
|
||
|
**pitcherTeamId** | [**optional.Interface of []int32**](int32.md)| A unique identifier for the pitcher's team |
|
||
|
**fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||
|
**debug** | **optional.Bool**| |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**StatsRestObject**](StatsRestObject.md)
|
||
|
|
||
|
### Authorization
|
||
|
|
||
|
[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)
|
||
|
|
||
|
### HTTP request headers
|
||
|
|
||
|
- **Content-Type**: Not defined
|
||
|
- **Accept**: */*
|
||
|
|
||
|
[[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**
|
||
|
> StatsRestObject Stats2(ctx, stats, group, optional)
|
||
|
View stats
|
||
|
|
||
|
### Required Parameters
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||
|
**stats** | [**[]StatType**](StatType.md)| Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes |
|
||
|
**group** | [**[]StatGroup**](StatGroup.md)| Category of statistic to return. Available types in /api/v1/statGroups |
|
||
|
**optional** | ***StatsApiStats2Opts** | optional parameters | nil if no parameters
|
||
|
|
||
|
### Optional Parameters
|
||
|
Optional parameters are passed through a pointer to a StatsApiStats2Opts struct
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
|
||
|
**personId** | **optional.Int32**| Unique Player Identifier. Format: 434538, 429665, etc |
|
||
|
**teamId** | **optional.Int32**| Unique Team Identifier. Format: 141, 147, etc |
|
||
|
**teamIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of Unique Team identifiers |
|
||
|
**gameType** | [**optional.Interface of GameTypeEnum**](.md)| Type of Game. Available types in /api/v1/gameTypes |
|
||
|
**season** | **optional.String**| Season of play |
|
||
|
**seasons** | [**optional.Interface of []string**](string.md)| Comma delimited list of Seasons of play |
|
||
|
**sportId** | **optional.Int32**| Top level organization of a sport |
|
||
|
**sportIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of top level organizations of a sport |
|
||
|
**leagueId** | **optional.Int32**| Unique League Identifier |
|
||
|
**leagueIds** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of Unique league identifiers |
|
||
|
**leagueListId** | [**optional.Interface of LeagueListsEnum**](.md)| Unique League List Identifier |
|
||
|
**metrics** | [**optional.Interface of []MetricType**](MetricType.md)| Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics |
|
||
|
**gamePk** | **optional.Int32**| Unique Primary Key Representing a Game |
|
||
|
**batterTeamId** | [**optional.Interface of []int32**](int32.md)| A unique identifier for the batter's team |
|
||
|
**pitcherTeamId** | [**optional.Interface of []int32**](int32.md)| A unique identifier for the pitcher's team |
|
||
|
**batterId** | **optional.Int32**| Unique Player Identifier. Format: 434538, 429665, etc |
|
||
|
**pitcherId** | **optional.Int32**| Unique Player Identifier. Format: 434538, 429665, etc |
|
||
|
**sitCodes** | [**optional.Interface of []string**](string.md)| Situation code for a given stat split. |
|
||
|
**combineSits** | **optional.Bool**| 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** | **optional.Int32**| A unique identifier for the opposing team. Must be used with Team ID |
|
||
|
**fields** | [**optional.Interface of []string**](string.md)| |
|
||
|
**sortStat** | [**optional.Interface of BaseballStatsEnum**](.md)| Baseball stat to sort splits by. |
|
||
|
**order** | [**optional.Interface of SortOrderEnum**](.md)| The order of sorting, ascending or descending |
|
||
|
**playerPool** | [**optional.Interface of PlayerPoolEnum**](.md)| Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. |
|
||
|
**position** | [**optional.Interface of []BaseballPosition**](BaseballPosition.md)| Position number. Format: 1, 2, 3, etc |
|
||
|
**startDate** | **optional.String**| Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||
|
**endDate** | **optional.String**| End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||
|
**daysBack** | **optional.Int32**| Returns results from the last 'X' days (Starting from yesterday). |
|
||
|
**gamesBack** | **optional.Int32**| Returns results from the last 'X' games played. |
|
||
|
**excludeTradedPlayers** | **optional.Bool**| Excludes players who have since been traded from the input team |
|
||
|
**offset** | **optional.Int32**| The pointer to start for a return set; used for pagination |
|
||
|
**limit** | **optional.Int32**| Number of results to return |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**StatsRestObject**](StatsRestObject.md)
|
||
|
|
||
|
### Authorization
|
||
|
|
||
|
No authorization required
|
||
|
|
||
|
### HTTP request headers
|
||
|
|
||
|
- **Content-Type**: Not defined
|
||
|
- **Accept**: */*
|
||
|
|
||
|
[[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)
|
||
|
|