mlbstats/api/docs/GameAPI.md

33 KiB

\GameAPI

All URIs are relative to http://localhost

Method HTTP request Description
Boxscore Get /api/v1/game/{game_pk}/boxscore Get game boxscore.
ColorFeed Get /api/v1/game/{game_pk}/feed/color Get game color feed.
ColorTimestamps Get /api/v1/game/{game_pk}/feed/color/timestamps Retrieve all of the color timestamps for a game.
Content Get /api/v1/game/{game_pk}/content Retrieve all content for a game.
CurrentGameStats1 Get /api/v1/game/changes View a game change log
GetGameContextMetrics Get /api/v1/game/{gamePk}/contextMetrics Get the context metrics for this game based on its current state
GetGameWithMetrics Get /api/v1/game/{gamePk}/withMetrics Get game info with metrics
GetWinProbability Get /api/v1/game/{gamePk}/winProbability Get the win probability for this game
Linescore Get /api/v1/game/{game_pk}/linescore Get game linescore
LiveGameDiffPatchV1 Get /api/v1.1/game/{game_pk}/feed/live/diffPatch Get live game status diffPatch.
LiveGameV1 Get /api/v1.1/game/{game_pk}/feed/live Get live game status.
LiveTimestampv11 Get /api/v1.1/game/{game_pk}/feed/live/timestamps Retrieve all of the play timestamps for a game.
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

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{} 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{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | inclusiveTimecode | interface{} | True to include plays that happen before or at the specified timecode | numPlayers | interface{} | Number of top player game scores to show. Default is 3. | noTies | interface{} | If set to false, will show all players tied for the last spot in the game scores list. | accent | interface{} | 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] [Back to Model list] [Back to README]

ColorFeed

ColorFeed(ctx, gamePk).Timecode(timecode).Fields(fields).Execute()

Get game color feed.

Example

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{} 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{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | fields | interface{} | 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] [Back to Model list] [Back to README]

ColorTimestamps

ColorTimestamps(ctx, gamePk).Execute()

Retrieve all of the color timestamps for a game.

Example

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{} 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] [Back to Model list] [Back to README]

Content

Content(ctx, gamePk).HighlightLimit(highlightLimit).Execute()

Retrieve all content for a game.

Example

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{}

Other Parameters

Other parameters are passed through a pointer to a apiContentRequest struct via the builder pattern

Name Type Description Notes

highlightLimit | interface{} | 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] [Back to Model list] [Back to README]

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

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{} Format: YYYY-MM-DDTHH:MM:SSZ
sportId interface{} Top level organization of a sport
sportIds interface{} Comma delimited list of top level organizations of a sport
gameType interface{} Type of Game. Available types in /api/v1/gameTypes
gameTypes interface{} Comma delimited list of type of Game. Available types in /api/v1/gameTypes
season interface{} Season of play
gamePks interface{} Comma delimited list of unique primary keys
limit interface{} Number of results to return
offset interface{} The pointer to start for a return set; used for pagination
fields interface{} 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] [Back to Model list] [Back to README]

GetGameContextMetrics

GetGameContextMetrics(ctx, gamePk).Timecode(timecode).Fields(fields).Execute()

Get the context metrics for this game based on its current state

Example

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{} 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{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | fields | interface{} | 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] [Back to Model list] [Back to README]

GetGameWithMetrics

GetGameWithMetrics(ctx, gamePk).Timecode(timecode).InclusiveTimecode(inclusiveTimecode).Fields(fields).Accent(accent).Execute()

Get game info with metrics

Example

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{} 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{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | inclusiveTimecode | interface{} | True to include plays that happen before or at the specified timecode | fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | accent | interface{} | 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] [Back to Model list] [Back to README]

GetWinProbability

GetWinProbability(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()

Get the win probability for this game

Example

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{} 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{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | inclusiveTimecode | interface{} | True to include plays that happen before or at the specified timecode | accent | interface{} | 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] [Back to Model list] [Back to README]

Linescore

Linescore(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Execute()

Get game linescore

Example

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{} 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{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | inclusiveTimecode | interface{} | 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] [Back to Model list] [Back to README]

LiveGameDiffPatchV1

LiveGameDiffPatchV1(ctx, gamePk).StartTimecode(startTimecode).EndTimecode(endTimecode).Accent(accent).Execute()

Get live game status diffPatch.

Example

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{} 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{} | Start time code will give you everything since that time. Format: MMDDYYYY_HHMMSS | endTimecode | interface{} | End time code will give you a snapshot at that specific time. Format: MMDDYYYY_HHMMSS | accent | interface{} | 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] [Back to Model list] [Back to README]

LiveGameV1

LiveGameV1(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()

Get live game status.

Example

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{} 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{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | inclusiveTimecode | interface{} | True to include plays that happen before or at the specified timecode | accent | interface{} | 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] [Back to Model list] [Back to README]

LiveTimestampv11

LiveTimestampv11(ctx, gamePk).Execute()

Retrieve all of the play timestamps for a game.

Example

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{} 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] [Back to Model list] [Back to README]

PlayByPlay

PlayByPlay(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()

Get game play By Play

Example

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{} 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{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | inclusiveTimecode | interface{} | True to include plays that happen before or at the specified timecode | accent | interface{} | 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] [Back to Model list] [Back to README]