976 lines
33 KiB
Markdown
976 lines
33 KiB
Markdown
|
# \GameAPI
|
||
|
|
||
|
All URIs are relative to *http://localhost*
|
||
|
|
||
|
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
|
||
|
|
||
|
> Boxscore(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).NumPlayers(numPlayers).NoTies(noTies).Accent(accent).Execute()
|
||
|
|
||
|
Get game boxscore.
|
||
|
|
||
|
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||
|
inclusiveTimecode := TODO // interface{} | True to include plays that happen before or at the specified timecode (optional)
|
||
|
numPlayers := TODO // interface{} | Number of top player game scores to show. Default is 3. (optional)
|
||
|
noTies := TODO // interface{} | If set to false, will show all players tied for the last spot in the game scores list. (optional)
|
||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||
|
|
||
|
configuration := openapiclient.NewConfiguration()
|
||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||
|
r, err := apiClient.GameAPI.Boxscore(context.Background(), gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).NumPlayers(numPlayers).NoTies(noTies).Accent(accent).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.Boxscore``: %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.
|
||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||
|
|
||
|
### Other Parameters
|
||
|
|
||
|
Other parameters are passed through a pointer to a apiBoxscoreRequest struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||
|
**inclusiveTimecode** | [**interface{}**](interface{}.md) | True to include plays that happen before or at the specified timecode |
|
||
|
**numPlayers** | [**interface{}**](interface{}.md) | Number of top player game scores to show. Default is 3. |
|
||
|
**noTies** | [**interface{}**](interface{}.md) | If set to false, will show all players tied for the last spot in the game scores list. |
|
||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||
|
|
||
|
### 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)
|
||
|
|
||
|
|
||
|
## ColorFeed
|
||
|
|
||
|
> ColorFeed(ctx, gamePk).Timecode(timecode).Fields(fields).Execute()
|
||
|
|
||
|
Get game color feed.
|
||
|
|
||
|
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (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.GameAPI.ColorFeed(context.Background(), gamePk).Timecode(timecode).Fields(fields).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.ColorFeed``: %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.
|
||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||
|
|
||
|
### Other Parameters
|
||
|
|
||
|
Other parameters are passed through a pointer to a apiColorFeedRequest struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||
|
**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)
|
||
|
|
||
|
|
||
|
## ColorTimestamps
|
||
|
|
||
|
> ColorTimestamps(ctx, gamePk).Execute()
|
||
|
|
||
|
Retrieve all of the color timestamps for a game.
|
||
|
|
||
|
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||
|
|
||
|
configuration := openapiclient.NewConfiguration()
|
||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||
|
r, err := apiClient.GameAPI.ColorTimestamps(context.Background(), gamePk).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.ColorTimestamps``: %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.
|
||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||
|
|
||
|
### Other Parameters
|
||
|
|
||
|
Other parameters are passed through a pointer to a apiColorTimestampsRequest struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
|
||
|
### 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)
|
||
|
|
||
|
|
||
|
## Content
|
||
|
|
||
|
> Content(ctx, gamePk).HighlightLimit(highlightLimit).Execute()
|
||
|
|
||
|
Retrieve all content for a game.
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
gamePk := TODO // interface{} |
|
||
|
highlightLimit := TODO // interface{} | Number of results to return (optional)
|
||
|
|
||
|
configuration := openapiclient.NewConfiguration()
|
||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||
|
r, err := apiClient.GameAPI.Content(context.Background(), gamePk).HighlightLimit(highlightLimit).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.Content``: %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.
|
||
|
**gamePk** | [**interface{}**](.md) | |
|
||
|
|
||
|
### Other Parameters
|
||
|
|
||
|
Other parameters are passed through a pointer to a apiContentRequest struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**highlightLimit** | [**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)
|
||
|
|
||
|
|
||
|
## CurrentGameStats1
|
||
|
|
||
|
> CurrentGameStats1(ctx).UpdatedSince(updatedSince).SportId(sportId).SportIds(sportIds).GameType(gameType).GameTypes(gameTypes).Season(season).GamePks(gamePks).Limit(limit).Offset(offset).Fields(fields).Execute()
|
||
|
|
||
|
View a game change log
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
updatedSince := TODO // interface{} | Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||
|
sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||
|
gameTypes := TODO // interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes (optional)
|
||
|
season := TODO // interface{} | Season of play (optional)
|
||
|
gamePks := TODO // interface{} | Comma delimited list of unique primary keys (optional)
|
||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||
|
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.GameAPI.CurrentGameStats1(context.Background()).UpdatedSince(updatedSince).SportId(sportId).SportIds(sportIds).GameType(gameType).GameTypes(gameTypes).Season(season).GamePks(gamePks).Limit(limit).Offset(offset).Fields(fields).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.CurrentGameStats1``: %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 apiCurrentGameStats1Request struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**updatedSince** | [**interface{}**](interface{}.md) | Format: YYYY-MM-DDTHH:MM:SSZ |
|
||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||
|
**sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||
|
**gameTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of Game. Available types in /api/v1/gameTypes |
|
||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||
|
**gamePks** | [**interface{}**](interface{}.md) | Comma delimited list of unique primary keys |
|
||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||
|
**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)
|
||
|
|
||
|
|
||
|
## GetGameContextMetrics
|
||
|
|
||
|
> GetGameContextMetrics(ctx, gamePk).Timecode(timecode).Fields(fields).Execute()
|
||
|
|
||
|
Get the context metrics for this game based on its current state
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (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.GameAPI.GetGameContextMetrics(context.Background(), gamePk).Timecode(timecode).Fields(fields).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.GetGameContextMetrics``: %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.
|
||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||
|
|
||
|
### Other Parameters
|
||
|
|
||
|
Other parameters are passed through a pointer to a apiGetGameContextMetricsRequest struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||
|
**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)
|
||
|
|
||
|
|
||
|
## GetGameWithMetrics
|
||
|
|
||
|
> GetGameWithMetrics(ctx, gamePk).Timecode(timecode).InclusiveTimecode(inclusiveTimecode).Fields(fields).Accent(accent).Execute()
|
||
|
|
||
|
Get game info with metrics
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||
|
inclusiveTimecode := TODO // interface{} | True to include plays that happen before or at the specified timecode (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)
|
||
|
|
||
|
configuration := openapiclient.NewConfiguration()
|
||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||
|
r, err := apiClient.GameAPI.GetGameWithMetrics(context.Background(), gamePk).Timecode(timecode).InclusiveTimecode(inclusiveTimecode).Fields(fields).Accent(accent).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.GetGameWithMetrics``: %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.
|
||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||
|
|
||
|
### Other Parameters
|
||
|
|
||
|
Other parameters are passed through a pointer to a apiGetGameWithMetricsRequest struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||
|
**inclusiveTimecode** | [**interface{}**](interface{}.md) | True to include plays that happen before or at the specified timecode |
|
||
|
**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 |
|
||
|
|
||
|
### 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)
|
||
|
|
||
|
|
||
|
## GetWinProbability
|
||
|
|
||
|
> GetWinProbability(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()
|
||
|
|
||
|
Get the win probability for this game
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||
|
inclusiveTimecode := TODO // interface{} | True to include plays that happen before or at the specified timecode (optional)
|
||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||
|
|
||
|
configuration := openapiclient.NewConfiguration()
|
||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||
|
r, err := apiClient.GameAPI.GetWinProbability(context.Background(), gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.GetWinProbability``: %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.
|
||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||
|
|
||
|
### Other Parameters
|
||
|
|
||
|
Other parameters are passed through a pointer to a apiGetWinProbabilityRequest struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||
|
**inclusiveTimecode** | [**interface{}**](interface{}.md) | True to include plays that happen before or at the specified timecode |
|
||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||
|
|
||
|
### 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)
|
||
|
|
||
|
|
||
|
## Linescore
|
||
|
|
||
|
> Linescore(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Execute()
|
||
|
|
||
|
Get game linescore
|
||
|
|
||
|
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||
|
inclusiveTimecode := TODO // interface{} | True to include plays that happen before or at the specified timecode (optional)
|
||
|
|
||
|
configuration := openapiclient.NewConfiguration()
|
||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||
|
r, err := apiClient.GameAPI.Linescore(context.Background(), gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.Linescore``: %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.
|
||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||
|
|
||
|
### Other Parameters
|
||
|
|
||
|
Other parameters are passed through a pointer to a apiLinescoreRequest struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||
|
**inclusiveTimecode** | [**interface{}**](interface{}.md) | True to include plays that happen before or at the specified timecode |
|
||
|
|
||
|
### 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)
|
||
|
|
||
|
|
||
|
## LiveGameDiffPatchV1
|
||
|
|
||
|
> LiveGameDiffPatchV1(ctx, gamePk).StartTimecode(startTimecode).EndTimecode(endTimecode).Accent(accent).Execute()
|
||
|
|
||
|
Get live game status diffPatch.
|
||
|
|
||
|
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||
|
startTimecode := TODO // interface{} | Start time code will give you everything since that time. Format: MMDDYYYY_HHMMSS (optional)
|
||
|
endTimecode := TODO // interface{} | End time code will give you a snapshot at that specific time. Format: MMDDYYYY_HHMMSS (optional)
|
||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||
|
|
||
|
configuration := openapiclient.NewConfiguration()
|
||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||
|
r, err := apiClient.GameAPI.LiveGameDiffPatchV1(context.Background(), gamePk).StartTimecode(startTimecode).EndTimecode(endTimecode).Accent(accent).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.LiveGameDiffPatchV1``: %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.
|
||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||
|
|
||
|
### Other Parameters
|
||
|
|
||
|
Other parameters are passed through a pointer to a apiLiveGameDiffPatchV1Request struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**startTimecode** | [**interface{}**](interface{}.md) | Start time code will give you everything since that time. Format: MMDDYYYY_HHMMSS |
|
||
|
**endTimecode** | [**interface{}**](interface{}.md) | End time code will give you a snapshot at that specific time. Format: MMDDYYYY_HHMMSS |
|
||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||
|
|
||
|
### 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)
|
||
|
|
||
|
|
||
|
## LiveGameV1
|
||
|
|
||
|
> LiveGameV1(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()
|
||
|
|
||
|
Get live game status.
|
||
|
|
||
|
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||
|
inclusiveTimecode := TODO // interface{} | True to include plays that happen before or at the specified timecode (optional)
|
||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||
|
|
||
|
configuration := openapiclient.NewConfiguration()
|
||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||
|
r, err := apiClient.GameAPI.LiveGameV1(context.Background(), gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.LiveGameV1``: %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.
|
||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||
|
|
||
|
### Other Parameters
|
||
|
|
||
|
Other parameters are passed through a pointer to a apiLiveGameV1Request struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||
|
**inclusiveTimecode** | [**interface{}**](interface{}.md) | True to include plays that happen before or at the specified timecode |
|
||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||
|
|
||
|
### 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)
|
||
|
|
||
|
|
||
|
## LiveTimestampv11
|
||
|
|
||
|
> LiveTimestampv11(ctx, gamePk).Execute()
|
||
|
|
||
|
Retrieve all of the play timestamps for a game.
|
||
|
|
||
|
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||
|
|
||
|
configuration := openapiclient.NewConfiguration()
|
||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||
|
r, err := apiClient.GameAPI.LiveTimestampv11(context.Background(), gamePk).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.LiveTimestampv11``: %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.
|
||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||
|
|
||
|
### Other Parameters
|
||
|
|
||
|
Other parameters are passed through a pointer to a apiLiveTimestampv11Request struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
|
||
|
### 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)
|
||
|
|
||
|
|
||
|
## PlayByPlay
|
||
|
|
||
|
> PlayByPlay(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()
|
||
|
|
||
|
Get game play By Play
|
||
|
|
||
|
|
||
|
|
||
|
### Example
|
||
|
|
||
|
```go
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
openapiclient "//"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||
|
inclusiveTimecode := TODO // interface{} | True to include plays that happen before or at the specified timecode (optional)
|
||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||
|
|
||
|
configuration := openapiclient.NewConfiguration()
|
||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||
|
r, err := apiClient.GameAPI.PlayByPlay(context.Background(), gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()
|
||
|
if err != nil {
|
||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.PlayByPlay``: %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.
|
||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||
|
|
||
|
### Other Parameters
|
||
|
|
||
|
Other parameters are passed through a pointer to a apiPlayByPlayRequest struct via the builder pattern
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
|
||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||
|
**inclusiveTimecode** | [**interface{}**](interface{}.md) | True to include plays that happen before or at the specified timecode |
|
||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||
|
|
||
|
### 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)
|
||
|
|