# {{classname}}

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**Boxscore**](GameApi.md#Boxscore) | **Get** /api/v1/game/{game_pk}/boxscore | Get game boxscore.
[**ColorFeed**](GameApi.md#ColorFeed) | **Get** /api/v1/game/{game_pk}/feed/color | Get game color feed.
[**ColorTimestamps**](GameApi.md#ColorTimestamps) | **Get** /api/v1/game/{game_pk}/feed/color/timestamps | Retrieve all of the color timestamps for a game.
[**Content**](GameApi.md#Content) | **Get** /api/v1/game/{game_pk}/content | Retrieve all content for a game.
[**CurrentGameStats1**](GameApi.md#CurrentGameStats1) | **Get** /api/v1/game/changes | View a game change log
[**GetGameContextMetrics**](GameApi.md#GetGameContextMetrics) | **Get** /api/v1/game/{gamePk}/contextMetrics | Get the context metrics for this game based on its current state
[**GetGameWithMetrics**](GameApi.md#GetGameWithMetrics) | **Get** /api/v1/game/{gamePk}/withMetrics | Get game info with metrics
[**GetWinProbability**](GameApi.md#GetWinProbability) | **Get** /api/v1/game/{gamePk}/winProbability | Get the win probability for this game
[**Linescore**](GameApi.md#Linescore) | **Get** /api/v1/game/{game_pk}/linescore | Get game linescore
[**LiveGameDiffPatchV1**](GameApi.md#LiveGameDiffPatchV1) | **Get** /api/v1.1/game/{game_pk}/feed/live/diffPatch | Get live game status diffPatch.
[**LiveGameV1**](GameApi.md#LiveGameV1) | **Get** /api/v1.1/game/{game_pk}/feed/live | Get live game status.
[**LiveTimestampv11**](GameApi.md#LiveTimestampv11) | **Get** /api/v1.1/game/{game_pk}/feed/live/timestamps | Retrieve all of the play timestamps for a game.
[**PlayByPlay**](GameApi.md#PlayByPlay) | **Get** /api/v1/game/{game_pk}/playByPlay | Get game play By Play

# **Boxscore**
> BaseballBoxscoreRestObject Boxscore(ctx, gamePk, optional)
Get game boxscore.

This endpoint allows you to pull a boxscore

### 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** | ***GameApiBoxscoreOpts** | optional parameters | nil if no parameters

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

 **timecode** | **optional.String**| Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | 
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 
 **inclusiveTimecode** | **optional.Bool**| True to include plays that happen before or at the specified timecode | 
 **numPlayers** | **optional.Int32**| Number of top player game scores to show. Default is 3. | [default to 3]
 **noTies** | **optional.Bool**| If set to false, will show all players tied for the last spot in the game scores list. | 
 **accent** | **optional.Bool**| Boolean value to specify wanting a person&#x27;s name with accents or without | 

### Return type

[**BaseballBoxscoreRestObject**](BaseballBoxscoreRestObject.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)

# **ColorFeed**
> string ColorFeed(ctx, gamePk, optional)
Get game color feed.

This API can return very large payloads.  It is STRONGLY recommended that clients ask for diffs and use \"Accept-Encoding: gzip\" header.

### 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** | ***GameApiColorFeedOpts** | optional parameters | nil if no parameters

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

 **timecode** | **optional.String**| Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | 
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 

### Return type

**string**

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

# **ColorTimestamps**
> []string ColorTimestamps(ctx, gamePk)
Retrieve all of the color timestamps for a game.

This can be used for replaying games.  Endpoint returns all of the timecodes that can be used with diffs for /v1/game/{game_pk}/feed/color

### 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 | 

### Return type

**[]string**

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

# **Content**
> GameContentRestObject Content(ctx, gamePk, optional)
Retrieve all content for a game.

### Required Parameters

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

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

 **highlightLimit** | **optional.Int32**| Number of results to return | 

### Return type

[**GameContentRestObject**](GameContentRestObject.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)

# **CurrentGameStats1**
> ScheduleRestObject CurrentGameStats1(ctx, optional)
View a game change log

### Required Parameters

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

### Optional Parameters
Optional parameters are passed through a pointer to a GameApiCurrentGameStats1Opts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **updatedSince** | **optional.Time**| Format: YYYY-MM-DDTHH:MM:SSZ | 
 **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 | 
 **gameType** | [**optional.Interface of GameTypeEnum**](.md)| Type of Game. Available types in /api/v1/gameTypes | 
 **gameTypes** | [**optional.Interface of []GameTypeEnum**](GameTypeEnum.md)| Comma delimited list of type of Game. Available types in /api/v1/gameTypes | 
 **season** | **optional.String**| Season of play | 
 **gamePks** | [**optional.Interface of []int32**](int32.md)| Comma delimited list of unique primary keys | 
 **limit** | **optional.Int32**| Number of results to return | 
 **offset** | **optional.Int32**| The pointer to start for a return set; used for pagination | 
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 

### Return type

[**ScheduleRestObject**](ScheduleRestObject.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)

# **GetGameContextMetrics**
> BaseballGameContextRestObject GetGameContextMetrics(ctx, gamePk, optional)
Get the context metrics for this game based on its current state

### 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** | ***GameApiGetGameContextMetricsOpts** | optional parameters | nil if no parameters

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

 **timecode** | **optional.String**| Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | 
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 

### Return type

[**BaseballGameContextRestObject**](BaseballGameContextRestObject.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)

# **GetGameWithMetrics**
> BaseballGameRestObject GetGameWithMetrics(ctx, gamePk, optional)
Get game info with metrics

### 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** | ***GameApiGetGameWithMetricsOpts** | optional parameters | nil if no parameters

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

 **timecode** | **optional.String**| Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | 
 **inclusiveTimecode** | **optional.Bool**| True to include plays that happen before or at the specified timecode | 
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 
 **accent** | **optional.Bool**| Boolean value to specify wanting a person&#x27;s name with accents or without | 

### Return type

[**BaseballGameRestObject**](BaseballGameRestObject.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)

# **GetWinProbability**
> []BaseballPlayRestObject GetWinProbability(ctx, gamePk, optional)
Get the win probability for this 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** | ***GameApiGetWinProbabilityOpts** | optional parameters | nil if no parameters

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

 **timecode** | **optional.String**| Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | 
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 
 **inclusiveTimecode** | **optional.Bool**| True to include plays that happen before or at the specified timecode | 
 **accent** | **optional.Bool**| Boolean value to specify wanting a person&#x27;s name with accents or without | 

### Return type

[**[]BaseballPlayRestObject**](BaseballPlayRestObject.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)

# **Linescore**
> BaseballLinescoreRestObject Linescore(ctx, gamePk, optional)
Get game linescore

This endpoint allows you to pull the linescore for a 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** | ***GameApiLinescoreOpts** | optional parameters | nil if no parameters

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

 **timecode** | **optional.String**| Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | 
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 
 **inclusiveTimecode** | **optional.Bool**| True to include plays that happen before or at the specified timecode | 

### Return type

[**BaseballLinescoreRestObject**](BaseballLinescoreRestObject.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)

# **LiveGameDiffPatchV1**
> string LiveGameDiffPatchV1(ctx, gamePk, optional)
Get live game status diffPatch.

This endpoint allows comparison of game files and shows any differences/discrepancies between the two<br/><br/><b>Diff/Patch System:</b> startTimecode and endTimecode can be used for getting diffs.<br/>Expected usage:  <br/> 1) Request full payload by not passing startTimecode or endTimecode.  This will return the most recent game state.<br/> 2) Find the latest timecode in this response.  <br/> 3) Wait X seconds<br/> 4) Use the timecode from 2 as the startTimecode.  This will give you a diff of everything that has happened since startTimecode.  <br/> 5) If no data is returned, wait X seconds and do the same request.  <br/> 6) If data is returned, get a new timeStamp from the response, and use that for the next call as startTimecode.

### 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** | ***GameApiLiveGameDiffPatchV1Opts** | optional parameters | nil if no parameters

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

 **startTimecode** | **optional.String**| Start time code will give you everything since that time. Format: MMDDYYYY_HHMMSS | 
 **endTimecode** | **optional.String**| End time code will give you a snapshot at that specific time. Format: MMDDYYYY_HHMMSS | 
 **accent** | **optional.Bool**| Boolean value to specify wanting a person&#x27;s name with accents or without | 

### Return type

**string**

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

# **LiveGameV1**
> BaseballGameRestObject LiveGameV1(ctx, gamePk, optional)
Get live game status.

This API can return very large payloads.  It is STRONGLY recommended that clients ask for diffs and use \"Accept-Encoding: gzip\" header.

### 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** | ***GameApiLiveGameV1Opts** | optional parameters | nil if no parameters

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

 **timecode** | **optional.String**| Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | 
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 
 **inclusiveTimecode** | **optional.Bool**| True to include plays that happen before or at the specified timecode | 
 **accent** | **optional.Bool**| Boolean value to specify wanting a person&#x27;s name with accents or without | 

### Return type

[**BaseballGameRestObject**](BaseballGameRestObject.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)

# **LiveTimestampv11**
> string LiveTimestampv11(ctx, gamePk)
Retrieve all of the play timestamps for a game.

This can be used for replaying games.  Endpoint returns all of the timecodes that can be used with diffs for /v1/game/{game_pk}/feed/live

### 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 | 

### Return type

**string**

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

# **PlayByPlay**
> BaseballPlayByPlayRestObject PlayByPlay(ctx, gamePk, optional)
Get game play By Play

This endpoint allows you to pull the play by play of a 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** | ***GameApiPlayByPlayOpts** | optional parameters | nil if no parameters

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

 **timecode** | **optional.String**| Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | 
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 
 **inclusiveTimecode** | **optional.Bool**| True to include plays that happen before or at the specified timecode | 
 **accent** | **optional.Bool**| Boolean value to specify wanting a person&#x27;s name with accents or without | 

### Return type

[**BaseballPlayByPlayRestObject**](BaseballPlayByPlayRestObject.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)

