# {{classname}}

All URIs are relative to *https://statsapi.mlb.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**ContextMetrics**](AnalyticsApi.md#ContextMetrics) | **Get** /api/v1/game/{gamePk}/{guid}/contextMetrics | Get context metrics for a specific gamePk.
[**ContextMetricsWithAverages**](AnalyticsApi.md#ContextMetricsWithAverages) | **Get** /api/v1/game/{gamePk}/{guid}/contextMetricsAverages | Get a json file containing raw coordinate data and refined calculated metrics.
[**ContextMetricsWithAveragesPost**](AnalyticsApi.md#ContextMetricsWithAveragesPost) | **Post** /api/v1/game/{gamePk}/{guid}/contextMetricsAverages | Get a json file containing raw coordinate data and refined calculated metrics.
[**GameGuids**](AnalyticsApi.md#GameGuids) | **Get** /api/v1/game/{gamePk}/guids | Get the GUIDs (plays) for a specific game. 
[**GameGuidsFromPostgresRange**](AnalyticsApi.md#GameGuidsFromPostgresRange) | **Get** /api/v1/analytics/guids | Get the GUIDs (plays) for a specific game. 
[**GameGuidsFromPostgresRangeByGame**](AnalyticsApi.md#GameGuidsFromPostgresRangeByGame) | **Get** /api/v1/analytics/game | Get all games by updated date.
[**GameLastPitch**](AnalyticsApi.md#GameLastPitch) | **Get** /api/v1/game/lastPitch | Get the last pitch for a list of games
[**HomeRunBallparks**](AnalyticsApi.md#HomeRunBallparks) | **Get** /api/v1/game/{gamePk}/{guid}/homeRunBallparks | Get if the play is a home run is each park for a specific play.
[**ParsedJsonFormattedAnalytics**](AnalyticsApi.md#ParsedJsonFormattedAnalytics) | **Get** /api/v1/game/{gamePk}/{guid}/analytics | Get Statcast data for a specific play.

# **ContextMetrics**
> []CalculatedMetricRestObject ContextMetrics(ctx, gamePk, guid, optional)
Get context metrics for a specific gamePk.

Returns a json file containing raw coordinate data and refined calculated metrics.<br/><br/>This responses can be very large, so it is strongly recommended that you pass \"Accept-Encoding: gzip\" as a header to have the responses compressed.

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
  **gamePk** | **int32**| Unique Primary Key Representing a Game | 
  **guid** | **string**| Unique identifier for a play within a game | 
 **optional** | ***AnalyticsApiContextMetricsOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a AnalyticsApiContextMetricsOpts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------


 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 

### Return type

[**[]CalculatedMetricRestObject**](CalculatedMetricRestObject.md)

### Authorization

[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json;charset=UTF-8

[[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)

# **ContextMetricsWithAverages**
> []CalculatedMetricRestObject ContextMetricsWithAverages(ctx, gamePk, guid, optional)
Get a json file containing raw coordinate data and refined calculated metrics.

Returns a json file containing raw coordinate data and refined calculated metrics.<br/><br/>This responses can be very large, so it is strongly recommended that you pass \"Accept-Encoding: gzip\" as a header to have the responses compressed.

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
  **gamePk** | **int32**| Unique Primary Key Representing a Game | 
  **guid** | **string**| Unique identifier for a play within a game | 
 **optional** | ***AnalyticsApiContextMetricsWithAveragesOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a AnalyticsApiContextMetricsWithAveragesOpts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------


 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 

### Return type

[**[]CalculatedMetricRestObject**](CalculatedMetricRestObject.md)

### Authorization

[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json;charset=UTF-8

[[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)

# **ContextMetricsWithAveragesPost**
> []CalculatedMetricRestObject ContextMetricsWithAveragesPost(ctx, gamePk, guid, optional)
Get a json file containing raw coordinate data and refined calculated metrics.

Returns a json file containing raw coordinate data and refined calculated metrics.<br/><br/>This responses can be very large, so it is strongly recommended that you pass \"Accept-Encoding: gzip\" as a header to have the responses compressed.

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
  **gamePk** | **int32**| Unique Primary Key Representing a Game | 
  **guid** | **string**| Unique identifier for a play within a game | 
 **optional** | ***AnalyticsApiContextMetricsWithAveragesPostOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a AnalyticsApiContextMetricsWithAveragesPostOpts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------


 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 

### Return type

[**[]CalculatedMetricRestObject**](CalculatedMetricRestObject.md)

### Authorization

[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json;charset=UTF-8

[[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)

# **GameGuids**
> []AnalyticsPlayMetadataRestObject GameGuids(ctx, gamePk, optional)
Get the GUIDs (plays) for a specific game. 

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
  **gamePk** | **int32**| Unique Primary Key Representing a Game | 
 **optional** | ***AnalyticsApiGameGuidsOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a AnalyticsApiGameGuidsOpts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------

 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 
 **gameModeId** | **optional.Int32**| Statcast game mode. Format: 0 &#x3D; Batting Practive, 1 &#x3D; Warmup 2 &#x3D; Live | 
 **isPitch** | **optional.Bool**| If there was a pitch | 
 **isHit** | **optional.Bool**| If there was a hit ball tracked | 
 **isPickoff** | **optional.Bool**| If there was a pickoff | 
 **hasUpdates** | **optional.Bool**| True if updated by an auditor | 
 **since** | **optional.Time**| Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **updatedSince** | **optional.Time**| Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **lastPlayTime** | **optional.Time**| Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **lastUpdatedTime** | **optional.Time**| Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **lastMetricsUpdatedTime** | **optional.Time**| Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **lastAuditUpdatedTime** | **optional.Time**| Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **lastVideoUpdatedTime** | **optional.Time**| The last time SportyBot video was updated | 

### Return type

[**[]AnalyticsPlayMetadataRestObject**](AnalyticsPlayMetadataRestObject.md)

### Authorization

[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json;charset=UTF-8

[[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)

# **GameGuidsFromPostgresRange**
> AnalyticsPlayMetadataWrapperRestObject GameGuidsFromPostgresRange(ctx, optional)
Get the GUIDs (plays) for a specific game. 

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
 **optional** | ***AnalyticsApiGameGuidsFromPostgresRangeOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a AnalyticsApiGameGuidsFromPostgresRangeOpts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 
 **gameModeId** | **optional.Int32**| Statcast game mode. Format: 0 &#x3D; Batting Practive, 1 &#x3D; Warmup 2 &#x3D; Live | 
 **isPitch** | **optional.Bool**| If there was a pitch | 
 **isHit** | **optional.Bool**| If there was a hit ball tracked | 
 **isPickoff** | **optional.Bool**| If there was a pickoff | 
 **isNonStatcast** | **optional.Bool**| If non statcast games need to be included | 
 **gamedayType** | **optional.String**| Indicates the level of Gameday (tracking, play-by-play, linescore, etc...) | 
 **hasUpdates** | **optional.Bool**| True if updated by an auditor | 
 **lastPlayTime** | **optional.Time**| Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **lastUpdatedTime** | **optional.Time**| Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **lastMetricsUpdatedTime** | **optional.Time**| Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **lastAuditUpdatedTime** | **optional.Time**| Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **lastVideoUpdatedTime** | **optional.Time**| The last time SportyBot video was updated | 
 **gameDate** | **optional.String**| Date of Game. Format: YYYY-MM-DD | 
 **sportId** | **optional.Int32**| Top level organization of a sport | 
 **gameType** | [**optional.Interface of GameTypeEnum**](.md)| Type of Game. Available types in /api/v1/gameTypes | 
 **trackingSystemOwner** | [**optional.Interface of TrackingSystemOwner**](.md)| Owner of the tracking system | 
 **season** | **optional.String**| Season of play | 
 **sortBy** | **optional.String**| Sort the set of data by the specified field | 
 **limit** | **optional.Int32**| Number of results to return | 
 **offset** | **optional.Int32**| The pointer to start for a return set; used for pagination | 

### Return type

[**AnalyticsPlayMetadataWrapperRestObject**](AnalyticsPlayMetadataWrapperRestObject.md)

### Authorization

[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json;charset=UTF-8

[[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)

# **GameGuidsFromPostgresRangeByGame**
> AnalyticsGameMetadataWrapperRestObject GameGuidsFromPostgresRangeByGame(ctx, optional)
Get all games by updated date.

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
 **optional** | ***AnalyticsApiGameGuidsFromPostgresRangeByGameOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a AnalyticsApiGameGuidsFromPostgresRangeByGameOpts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 
 **gameModeId** | **optional.Int32**| Statcast game mode. Format: 0 &#x3D; Batting Practive, 1 &#x3D; Warmup 2 &#x3D; Live | 
 **isPitch** | **optional.Bool**| If there was a pitch | 
 **isHit** | **optional.Bool**| If there was a hit ball tracked | 
 **isPickoff** | **optional.Bool**| If there was a pickoff | 
 **isNonStatcast** | **optional.Bool**| If non statcast games need to be included | 
 **gamedayType** | **optional.String**| Indicates the level of Gameday (tracking, play-by-play, linescore, etc...) | 
 **hasUpdates** | **optional.Bool**| True if updated by an auditor | 
 **lastPlayTime** | **optional.Time**| Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **lastVideoUpdatedTime** | **optional.Time**| The last time SportyBot video was updated | 
 **lastUpdatedTime** | **optional.Time**| Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **lastMetricsUpdatedTime** | **optional.Time**| Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **lastAuditUpdatedTime** | **optional.Time**| Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | 
 **gameDate** | **optional.String**| Date of Game. Format: YYYY-MM-DD | 
 **sportId** | **optional.Int32**| Top level organization of a sport | 
 **gameType** | [**optional.Interface of GameTypeEnum**](.md)| Type of Game. Available types in /api/v1/gameTypes | 
 **season** | **optional.String**| Season of play | 
 **trackingSystemOwner** | [**optional.Interface of TrackingSystemOwner**](.md)| Owner of the tracking system | 
 **sortBy** | **optional.String**| Sort the set of data by the specified field | 
 **limit** | **optional.Int32**| Number of results to return | 
 **offset** | **optional.Int32**| The pointer to start for a return set; used for pagination | 
 **scheduleEventTypes** | [**optional.Interface of []ScheduleEventTypes**](ScheduleEventTypes.md)| Comma delimited list of type of event types | 

### Return type

[**AnalyticsGameMetadataWrapperRestObject**](AnalyticsGameMetadataWrapperRestObject.md)

### Authorization

[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json;charset=UTF-8

[[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)

# **GameLastPitch**
> []AnalyticsPlayMetadataRestObject GameLastPitch(ctx, gamePks, optional)
Get the last pitch for a list of games

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
  **gamePks** | [**[]int32**](int32.md)| Unique Primary Key Representing a Game | 
 **optional** | ***AnalyticsApiGameLastPitchOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a AnalyticsApiGameLastPitchOpts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------

 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 

### Return type

[**[]AnalyticsPlayMetadataRestObject**](AnalyticsPlayMetadataRestObject.md)

### Authorization

[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json;charset=UTF-8

[[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)

# **HomeRunBallparks**
> VenuesRestObject HomeRunBallparks(ctx, gamePk, guid, isHomeRunParks, optional)
Get if the play is a home run is each park for a specific play.

Returns a json file containing raw coordinate data and refined calculated metrics.<br/><br/>This responses can be very large, so it is strongly recommended that you pass \"Accept-Encoding: gzip\" as a header to have the responses compressed.

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
  **gamePk** | **int32**| Unique Primary Key Representing a Game | 
  **guid** | **string**| Unique identifier for a play within a game | 
  **isHomeRunParks** | **bool**|  | 
 **optional** | ***AnalyticsApiHomeRunBallparksOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a AnalyticsApiHomeRunBallparksOpts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------



 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 

### Return type

[**VenuesRestObject**](VenuesRestObject.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json;charset=UTF-8

[[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)

# **ParsedJsonFormattedAnalytics**
> AnalyticsRestObject ParsedJsonFormattedAnalytics(ctx, gamePk, guid, optional)
Get Statcast data for a specific play.

Returns a json file containing raw coordinate data and refined calculated metrics.<br/><br/>This responses can be very large, so it is strongly recommended that you pass \"Accept-Encoding: gzip\" as a header to have the responses compressed.

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
  **gamePk** | **int32**| Unique Primary Key Representing a Game | 
  **guid** | **string**| Unique identifier for a play within a game | 
 **optional** | ***AnalyticsApiParsedJsonFormattedAnalyticsOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a AnalyticsApiParsedJsonFormattedAnalyticsOpts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------


 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 

### Return type

[**AnalyticsRestObject**](AnalyticsRestObject.md)

### Authorization

[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json;charset=UTF-8

[[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)

