# \PersonAPI All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- [**Award**](PersonAPI.md#Award) | **Get** /api/v1/people/{personId}/awards | View a player's awards [**CurrentGameStats**](PersonAPI.md#CurrentGameStats) | **Get** /api/v1/people/changes | View a player's change log [**FreeAgents**](PersonAPI.md#FreeAgents) | **Get** /api/v1/people/freeAgents | Get free agents [**Person**](PersonAPI.md#Person) | **Get** /api/v1/people/{personId} | View a player [**Person1**](PersonAPI.md#Person1) | **Get** /api/v1/people | View a player [**PlayerGameStats**](PersonAPI.md#PlayerGameStats) | **Get** /api/v1/people/{personId}/stats/game/{gamePk} | View a player's game stats [**Search**](PersonAPI.md#Search) | **Get** /api/v1/people/search | Search for a player by name [**Stats3**](PersonAPI.md#Stats3) | **Get** /api/v1/people/{personId}/stats | View a players stats [**StatsMetrics**](PersonAPI.md#StatsMetrics) | **Get** /api/v1/people/{personId}/stats/metrics | View a player's stat metrics ## Award > Award(ctx, personId).Fields(fields).Execute() View a player's awards ### Example ```go package main import ( "context" "fmt" "os" openapiclient "//" ) func main() { personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc 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.PersonAPI.Award(context.Background(), personId).Fields(fields).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.Award``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **personId** | [**interface{}**](.md) | Unique Player Identifier. Format: 434538, 429665, etc | ### Other Parameters Other parameters are passed through a pointer to a apiAwardRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **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) ## CurrentGameStats > CurrentGameStats(ctx).UpdatedSince(updatedSince).Limit(limit).Offset(offset).Accent(accent).Fields(fields).Execute() View a player's change log ### Example ```go package main import ( "context" "fmt" "os" openapiclient "//" ) func main() { updatedSince := TODO // interface{} | Format: YYYY-MM-DDTHH:MM:SSZ limit := TODO // interface{} | Number of results to return (optional) offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional) accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (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.PersonAPI.CurrentGameStats(context.Background()).UpdatedSince(updatedSince).Limit(limit).Offset(offset).Accent(accent).Fields(fields).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.CurrentGameStats``: %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 apiCurrentGameStatsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **updatedSince** | [**interface{}**](interface{}.md) | Format: YYYY-MM-DDTHH:MM:SSZ | **limit** | [**interface{}**](interface{}.md) | Number of results to return | **offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination | **accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without | **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) ## FreeAgents > FreeAgents(ctx).Season(season).Order(order).Accent(accent).Fields(fields).Execute() Get free agents ### Example ```go package main import ( "context" "fmt" "os" openapiclient "//" ) func main() { season := TODO // interface{} | Season of play order := TODO // interface{} | The order of sorting, ascending or descending (optional) accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional) fields := TODO // interface{} | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) r, err := apiClient.PersonAPI.FreeAgents(context.Background()).Season(season).Order(order).Accent(accent).Fields(fields).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.FreeAgents``: %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 apiFreeAgentsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **season** | [**interface{}**](interface{}.md) | Season of play | **order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending | **accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without | **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) ## Person > Person(ctx, personId).PersonIds(personIds).Accent(accent).Season(season).Group(group).Fields(fields).Execute() View a player ### Example ```go package main import ( "context" "fmt" "os" openapiclient "//" ) func main() { personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc personIds := TODO // interface{} | Comma delimited list of person ID. Format: 1234, 2345 (optional) accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional) season := TODO // interface{} | Season of play (optional) group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (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.PersonAPI.Person(context.Background(), personId).PersonIds(personIds).Accent(accent).Season(season).Group(group).Fields(fields).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.Person``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **personId** | [**interface{}**](.md) | Unique Player Identifier. Format: 434538, 429665, etc | ### Other Parameters Other parameters are passed through a pointer to a apiPersonRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **personIds** | [**interface{}**](interface{}.md) | Comma delimited list of person ID. Format: 1234, 2345 | **accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without | **season** | [**interface{}**](interface{}.md) | Season of play | **group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups | **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) ## Person1 > Person1(ctx, personId).PersonIds(personIds).Accent(accent).Season(season).Group(group).Fields(fields).Execute() View a player ### Example ```go package main import ( "context" "fmt" "os" openapiclient "//" ) func main() { personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc personIds := TODO // interface{} | Comma delimited list of person ID. Format: 1234, 2345 (optional) accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional) season := TODO // interface{} | Season of play (optional) group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (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.PersonAPI.Person1(context.Background(), personId).PersonIds(personIds).Accent(accent).Season(season).Group(group).Fields(fields).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.Person1``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **personId** | [**interface{}**](.md) | Unique Player Identifier. Format: 434538, 429665, etc | ### Other Parameters Other parameters are passed through a pointer to a apiPerson1Request struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **personIds** | [**interface{}**](interface{}.md) | Comma delimited list of person ID. Format: 1234, 2345 | **accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without | **season** | [**interface{}**](interface{}.md) | Season of play | **group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups | **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) ## PlayerGameStats > PlayerGameStats(ctx, personId, gamePk).Group(group).Fields(fields).Execute() View a player's game stats ### Example ```go package main import ( "context" "fmt" "os" openapiclient "//" ) func main() { personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc gamePk := TODO // interface{} | Unique Primary Key Representing a Game group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (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.PersonAPI.PlayerGameStats(context.Background(), personId, gamePk).Group(group).Fields(fields).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.PlayerGameStats``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **personId** | [**interface{}**](.md) | Unique Player Identifier. Format: 434538, 429665, etc | **gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game | ### Other Parameters Other parameters are passed through a pointer to a apiPlayerGameStatsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups | **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) ## Search > Search(ctx).Names(names).PersonIds(personIds).SportIds(sportIds).LeagueIds(leagueIds).TeamIds(teamIds).LeagueListId(leagueListId).Active(active).Verified(verified).Rookie(rookie).Seasons(seasons).Fields(fields).Accent(accent).Limit(limit).Execute() Search for a player by name ### Example ```go package main import ( "context" "fmt" "os" openapiclient "//" ) func main() { names := TODO // interface{} | Name a player uses (optional) personIds := TODO // interface{} | Comma delimited list of person ID. Format: 1234, 2345 (optional) sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional) leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional) teamIds := TODO // interface{} | Comma delimited list of Unique Team identifiers (optional) leagueListId := TODO // interface{} | Unique League List Identifier (optional) active := TODO // interface{} | Whether or not a player is active (optional) verified := TODO // interface{} | Complete and confirmed all biographical data (optional) rookie := TODO // interface{} | Whether or not a player is a rookie (optional) seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional) fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional) accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional) limit := TODO // interface{} | Number of results to return (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) r, err := apiClient.PersonAPI.Search(context.Background()).Names(names).PersonIds(personIds).SportIds(sportIds).LeagueIds(leagueIds).TeamIds(teamIds).LeagueListId(leagueListId).Active(active).Verified(verified).Rookie(rookie).Seasons(seasons).Fields(fields).Accent(accent).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.Search``: %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 apiSearchRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **names** | [**interface{}**](interface{}.md) | Name a player uses | **personIds** | [**interface{}**](interface{}.md) | Comma delimited list of person ID. Format: 1234, 2345 | **sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport | **leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers | **teamIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique Team identifiers | **leagueListId** | [**interface{}**](interface{}.md) | Unique League List Identifier | **active** | [**interface{}**](interface{}.md) | Whether or not a player is active | **verified** | [**interface{}**](interface{}.md) | Complete and confirmed all biographical data | **rookie** | [**interface{}**](interface{}.md) | Whether or not a player is a rookie | **seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play | **fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | **accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without | **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) ## Stats3 > Stats3(ctx, personId).Stats(stats).Group(group).Season(season).Seasons(seasons).SportId(sportId).OpposingTeamId(opposingTeamId).OpposingPlayerId(opposingPlayerId).Metrics(metrics).LeagueId(leagueId).LeagueListId(leagueListId).SitCodes(sitCodes).CombineSits(combineSits).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).Limit(limit).EventType(eventType).PitchType(pitchType).HitTrajectory(hitTrajectory).BatSide(batSide).GameType(gameType).GroupBy(groupBy).Accent(accent).Fields(fields).Execute() View a players stats ### Example ```go package main import ( "context" "fmt" "os" openapiclient "//" ) func main() { personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc 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 (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) metrics := TODO // interface{} | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics (optional) leagueId := TODO // interface{} | Unique League Identifier (optional) leagueListId := TODO // interface{} | Unique League List Identifier (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) 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) limit := TODO // interface{} | Number of results to return (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) gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional) groupBy := TODO // interface{} | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP (optional) accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (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.PersonAPI.Stats3(context.Background(), personId).Stats(stats).Group(group).Season(season).Seasons(seasons).SportId(sportId).OpposingTeamId(opposingTeamId).OpposingPlayerId(opposingPlayerId).Metrics(metrics).LeagueId(leagueId).LeagueListId(leagueListId).SitCodes(sitCodes).CombineSits(combineSits).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).Limit(limit).EventType(eventType).PitchType(pitchType).HitTrajectory(hitTrajectory).BatSide(batSide).GameType(gameType).GroupBy(groupBy).Accent(accent).Fields(fields).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.Stats3``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **personId** | [**interface{}**](.md) | Unique Player Identifier. Format: 434538, 429665, etc | ### Other Parameters Other parameters are passed through a pointer to a apiStats3Request 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 | **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 | **metrics** | [**interface{}**](interface{}.md) | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics | **leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier | **leagueListId** | [**interface{}**](interface{}.md) | Unique League List Identifier | **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 | **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. | **limit** | [**interface{}**](interface{}.md) | Number of results to return | **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 | **gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes | **groupBy** | [**interface{}**](interface{}.md) | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP | **accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without | **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) ## StatsMetrics > StatsMetrics(ctx, personId).Stats(stats).Group(group).Season(season).Seasons(seasons).SportId(sportId).OpposingTeamId(opposingTeamId).OpposingPlayerId(opposingPlayerId).Metrics(metrics).LeagueId(leagueId).LeagueListId(leagueListId).SitCodes(sitCodes).CombineSits(combineSits).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).Limit(limit).EventType(eventType).PitchType(pitchType).HitTrajectory(hitTrajectory).BatSide(batSide).GameType(gameType).GroupBy(groupBy).Accent(accent).Fields(fields).Execute() View a player's stat metrics ### Example ```go package main import ( "context" "fmt" "os" openapiclient "//" ) func main() { personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc 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 (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) metrics := TODO // interface{} | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics (optional) leagueId := TODO // interface{} | Unique League Identifier (optional) leagueListId := TODO // interface{} | Unique League List Identifier (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) 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) limit := TODO // interface{} | Number of results to return (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) gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional) groupBy := TODO // interface{} | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP (optional) accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (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.PersonAPI.StatsMetrics(context.Background(), personId).Stats(stats).Group(group).Season(season).Seasons(seasons).SportId(sportId).OpposingTeamId(opposingTeamId).OpposingPlayerId(opposingPlayerId).Metrics(metrics).LeagueId(leagueId).LeagueListId(leagueListId).SitCodes(sitCodes).CombineSits(combineSits).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).Limit(limit).EventType(eventType).PitchType(pitchType).HitTrajectory(hitTrajectory).BatSide(batSide).GameType(gameType).GroupBy(groupBy).Accent(accent).Fields(fields).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.StatsMetrics``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **personId** | [**interface{}**](.md) | Unique Player Identifier. Format: 434538, 429665, etc | ### Other Parameters Other parameters are passed through a pointer to a apiStatsMetricsRequest 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 | **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 | **metrics** | [**interface{}**](interface{}.md) | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics | **leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier | **leagueListId** | [**interface{}**](interface{}.md) | Unique League List Identifier | **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 | **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. | **limit** | [**interface{}**](interface{}.md) | Number of results to return | **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 | **gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes | **groupBy** | [**interface{}**](interface{}.md) | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP | **accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without | **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)