32 KiB
\AnalyticsAPI
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
ContextMetrics | Get /api/v1/game/{gamePk}/{guid}/contextMetrics | Get context metrics for a specific gamePk. |
ContextMetricsWithAverages | Get /api/v1/game/{gamePk}/{guid}/contextMetricsAverages | Get a json file containing raw coordinate data and refined calculated metrics. |
ContextMetricsWithAveragesPost | Post /api/v1/game/{gamePk}/{guid}/contextMetricsAverages | Get a json file containing raw coordinate data and refined calculated metrics. |
GameGuids | Get /api/v1/game/{gamePk}/guids | Get the GUIDs (plays) for a specific game. |
GameGuidsFromPostgresRange | Get /api/v1/analytics/guids | Get the GUIDs (plays) for a specific game. |
GameGuidsFromPostgresRangeByGame | Get /api/v1/analytics/game | Get all games by updated date. |
GameLastPitch | Get /api/v1/game/lastPitch | Get the last pitch for a list of games |
HomeRunBallparks | Get /api/v1/game/{gamePk}/{guid}/homeRunBallparks | Get if the play is a home run is each park for a specific play. |
ParsedJsonFormattedAnalytics | Get /api/v1/game/{gamePk}/{guid}/analytics | Get Statcast data for a specific play. |
ContextMetrics
ContextMetrics(ctx, gamePk, guid).Fields(fields).Execute()
Get context metrics for a specific gamePk.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
guid := TODO // interface{} | Unique identifier for a play within a game
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.AnalyticsAPI.ContextMetrics(context.Background(), gamePk, guid).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.ContextMetrics``: %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 | |
guid | interface{} | Unique identifier for a play within a game |
Other Parameters
Other parameters are passed through a pointer to a apiContextMetricsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
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]
ContextMetricsWithAverages
ContextMetricsWithAverages(ctx, gamePk, guid).Fields(fields).Execute()
Get a json file containing raw coordinate data and refined calculated metrics.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
guid := TODO // interface{} | Unique identifier for a play within a game
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.AnalyticsAPI.ContextMetricsWithAverages(context.Background(), gamePk, guid).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.ContextMetricsWithAverages``: %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 | |
guid | interface{} | Unique identifier for a play within a game |
Other Parameters
Other parameters are passed through a pointer to a apiContextMetricsWithAveragesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
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]
ContextMetricsWithAveragesPost
ContextMetricsWithAveragesPost(ctx, gamePk, guid).Fields(fields).Execute()
Get a json file containing raw coordinate data and refined calculated metrics.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
guid := TODO // interface{} | Unique identifier for a play within a game
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.AnalyticsAPI.ContextMetricsWithAveragesPost(context.Background(), gamePk, guid).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.ContextMetricsWithAveragesPost``: %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 | |
guid | interface{} | Unique identifier for a play within a game |
Other Parameters
Other parameters are passed through a pointer to a apiContextMetricsWithAveragesPostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
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]
GameGuids
GameGuids(ctx, gamePk).Fields(fields).GameModeId(gameModeId).IsPitch(isPitch).IsHit(isHit).IsPickoff(isPickoff).HasUpdates(hasUpdates).Since(since).UpdatedSince(updatedSince).LastPlayTime(lastPlayTime).LastUpdatedTime(lastUpdatedTime).LastMetricsUpdatedTime(lastMetricsUpdatedTime).LastAuditUpdatedTime(lastAuditUpdatedTime).LastVideoUpdatedTime(lastVideoUpdatedTime).Execute()
Get the GUIDs (plays) for a specific game.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
gameModeId := TODO // interface{} | Statcast game mode. Format: 0 = Batting Practive, 1 = Warmup 2 = Live (optional)
isPitch := TODO // interface{} | If there was a pitch (optional)
isHit := TODO // interface{} | If there was a hit ball tracked (optional)
isPickoff := TODO // interface{} | If there was a pickoff (optional)
hasUpdates := TODO // interface{} | True if updated by an auditor (optional)
since := TODO // interface{} | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
updatedSince := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
lastPlayTime := TODO // interface{} | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
lastUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
lastMetricsUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
lastAuditUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
lastVideoUpdatedTime := TODO // interface{} | The last time SportyBot video was updated (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AnalyticsAPI.GameGuids(context.Background(), gamePk).Fields(fields).GameModeId(gameModeId).IsPitch(isPitch).IsHit(isHit).IsPickoff(isPickoff).HasUpdates(hasUpdates).Since(since).UpdatedSince(updatedSince).LastPlayTime(lastPlayTime).LastUpdatedTime(lastUpdatedTime).LastMetricsUpdatedTime(lastMetricsUpdatedTime).LastAuditUpdatedTime(lastAuditUpdatedTime).LastVideoUpdatedTime(lastVideoUpdatedTime).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.GameGuids``: %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 apiGameGuidsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | gameModeId | interface{} | Statcast game mode. Format: 0 = Batting Practive, 1 = Warmup 2 = Live | isPitch | interface{} | If there was a pitch | isHit | interface{} | If there was a hit ball tracked | isPickoff | interface{} | If there was a pickoff | hasUpdates | interface{} | True if updated by an auditor | since | interface{} | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ | updatedSince | interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | lastPlayTime | interface{} | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ | lastUpdatedTime | interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | lastMetricsUpdatedTime | interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | lastAuditUpdatedTime | interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | lastVideoUpdatedTime | interface{} | The last time SportyBot video was updated |
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]
GameGuidsFromPostgresRange
GameGuidsFromPostgresRange(ctx).Fields(fields).GameModeId(gameModeId).IsPitch(isPitch).IsHit(isHit).IsPickoff(isPickoff).IsNonStatcast(isNonStatcast).GamedayType(gamedayType).HasUpdates(hasUpdates).LastPlayTime(lastPlayTime).LastUpdatedTime(lastUpdatedTime).LastMetricsUpdatedTime(lastMetricsUpdatedTime).LastAuditUpdatedTime(lastAuditUpdatedTime).LastVideoUpdatedTime(lastVideoUpdatedTime).GameDate(gameDate).SportId(sportId).GameType(gameType).TrackingSystemOwner(trackingSystemOwner).Season(season).SortBy(sortBy).Limit(limit).Offset(offset).Execute()
Get the GUIDs (plays) for a specific game.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
gameModeId := TODO // interface{} | Statcast game mode. Format: 0 = Batting Practive, 1 = Warmup 2 = Live (optional)
isPitch := TODO // interface{} | If there was a pitch (optional)
isHit := TODO // interface{} | If there was a hit ball tracked (optional)
isPickoff := TODO // interface{} | If there was a pickoff (optional)
isNonStatcast := TODO // interface{} | If non statcast games need to be included (optional)
gamedayType := TODO // interface{} | Indicates the level of Gameday (tracking, play-by-play, linescore, etc...) (optional)
hasUpdates := TODO // interface{} | True if updated by an auditor (optional)
lastPlayTime := TODO // interface{} | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
lastUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
lastMetricsUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
lastAuditUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
lastVideoUpdatedTime := TODO // interface{} | The last time SportyBot video was updated (optional)
gameDate := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
sportId := TODO // interface{} | Top level organization of a sport (optional)
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
trackingSystemOwner := TODO // interface{} | Owner of the tracking system (optional)
season := TODO // interface{} | Season of play (optional)
sortBy := TODO // interface{} | Sort the set of data by the specified field (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)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AnalyticsAPI.GameGuidsFromPostgresRange(context.Background()).Fields(fields).GameModeId(gameModeId).IsPitch(isPitch).IsHit(isHit).IsPickoff(isPickoff).IsNonStatcast(isNonStatcast).GamedayType(gamedayType).HasUpdates(hasUpdates).LastPlayTime(lastPlayTime).LastUpdatedTime(lastUpdatedTime).LastMetricsUpdatedTime(lastMetricsUpdatedTime).LastAuditUpdatedTime(lastAuditUpdatedTime).LastVideoUpdatedTime(lastVideoUpdatedTime).GameDate(gameDate).SportId(sportId).GameType(gameType).TrackingSystemOwner(trackingSystemOwner).Season(season).SortBy(sortBy).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.GameGuidsFromPostgresRange``: %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 apiGameGuidsFromPostgresRangeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | |
gameModeId | interface{} | Statcast game mode. Format: 0 = Batting Practive, 1 = Warmup 2 = Live | |
isPitch | interface{} | If there was a pitch | |
isHit | interface{} | If there was a hit ball tracked | |
isPickoff | interface{} | If there was a pickoff | |
isNonStatcast | interface{} | If non statcast games need to be included | |
gamedayType | interface{} | Indicates the level of Gameday (tracking, play-by-play, linescore, etc...) | |
hasUpdates | interface{} | True if updated by an auditor | |
lastPlayTime | interface{} | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ | |
lastUpdatedTime | interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | |
lastMetricsUpdatedTime | interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | |
lastAuditUpdatedTime | interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | |
lastVideoUpdatedTime | interface{} | The last time SportyBot video was updated | |
gameDate | interface{} | Date of Game. Format: YYYY-MM-DD | |
sportId | interface{} | Top level organization of a sport | |
gameType | interface{} | Type of Game. Available types in /api/v1/gameTypes | |
trackingSystemOwner | interface{} | Owner of the tracking system | |
season | interface{} | Season of play | |
sortBy | interface{} | Sort the set of data by the specified field | |
limit | interface{} | Number of results to return | |
offset | interface{} | The pointer to start for a return set; used for pagination |
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]
GameGuidsFromPostgresRangeByGame
GameGuidsFromPostgresRangeByGame(ctx).Fields(fields).GameModeId(gameModeId).IsPitch(isPitch).IsHit(isHit).IsPickoff(isPickoff).IsNonStatcast(isNonStatcast).GamedayType(gamedayType).HasUpdates(hasUpdates).LastPlayTime(lastPlayTime).LastVideoUpdatedTime(lastVideoUpdatedTime).LastUpdatedTime(lastUpdatedTime).LastMetricsUpdatedTime(lastMetricsUpdatedTime).LastAuditUpdatedTime(lastAuditUpdatedTime).GameDate(gameDate).SportId(sportId).GameType(gameType).Season(season).TrackingSystemOwner(trackingSystemOwner).SortBy(sortBy).Limit(limit).Offset(offset).ScheduleEventTypes(scheduleEventTypes).Execute()
Get all games by updated date.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
gameModeId := TODO // interface{} | Statcast game mode. Format: 0 = Batting Practive, 1 = Warmup 2 = Live (optional)
isPitch := TODO // interface{} | If there was a pitch (optional)
isHit := TODO // interface{} | If there was a hit ball tracked (optional)
isPickoff := TODO // interface{} | If there was a pickoff (optional)
isNonStatcast := TODO // interface{} | If non statcast games need to be included (optional)
gamedayType := TODO // interface{} | Indicates the level of Gameday (tracking, play-by-play, linescore, etc...) (optional)
hasUpdates := TODO // interface{} | True if updated by an auditor (optional)
lastPlayTime := TODO // interface{} | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
lastVideoUpdatedTime := TODO // interface{} | The last time SportyBot video was updated (optional)
lastUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
lastMetricsUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
lastAuditUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
gameDate := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
sportId := TODO // interface{} | Top level organization of a sport (optional)
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
season := TODO // interface{} | Season of play (optional)
trackingSystemOwner := TODO // interface{} | Owner of the tracking system (optional)
sortBy := TODO // interface{} | Sort the set of data by the specified field (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)
scheduleEventTypes := TODO // interface{} | Comma delimited list of type of event types (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AnalyticsAPI.GameGuidsFromPostgresRangeByGame(context.Background()).Fields(fields).GameModeId(gameModeId).IsPitch(isPitch).IsHit(isHit).IsPickoff(isPickoff).IsNonStatcast(isNonStatcast).GamedayType(gamedayType).HasUpdates(hasUpdates).LastPlayTime(lastPlayTime).LastVideoUpdatedTime(lastVideoUpdatedTime).LastUpdatedTime(lastUpdatedTime).LastMetricsUpdatedTime(lastMetricsUpdatedTime).LastAuditUpdatedTime(lastAuditUpdatedTime).GameDate(gameDate).SportId(sportId).GameType(gameType).Season(season).TrackingSystemOwner(trackingSystemOwner).SortBy(sortBy).Limit(limit).Offset(offset).ScheduleEventTypes(scheduleEventTypes).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.GameGuidsFromPostgresRangeByGame``: %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 apiGameGuidsFromPostgresRangeByGameRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | |
gameModeId | interface{} | Statcast game mode. Format: 0 = Batting Practive, 1 = Warmup 2 = Live | |
isPitch | interface{} | If there was a pitch | |
isHit | interface{} | If there was a hit ball tracked | |
isPickoff | interface{} | If there was a pickoff | |
isNonStatcast | interface{} | If non statcast games need to be included | |
gamedayType | interface{} | Indicates the level of Gameday (tracking, play-by-play, linescore, etc...) | |
hasUpdates | interface{} | True if updated by an auditor | |
lastPlayTime | interface{} | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ | |
lastVideoUpdatedTime | interface{} | The last time SportyBot video was updated | |
lastUpdatedTime | interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | |
lastMetricsUpdatedTime | interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | |
lastAuditUpdatedTime | interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ | |
gameDate | interface{} | Date of Game. Format: YYYY-MM-DD | |
sportId | interface{} | Top level organization of a sport | |
gameType | interface{} | Type of Game. Available types in /api/v1/gameTypes | |
season | interface{} | Season of play | |
trackingSystemOwner | interface{} | Owner of the tracking system | |
sortBy | interface{} | Sort the set of data by the specified field | |
limit | interface{} | Number of results to return | |
offset | interface{} | The pointer to start for a return set; used for pagination | |
scheduleEventTypes | interface{} | Comma delimited list of type of event types |
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]
GameLastPitch
GameLastPitch(ctx).GamePks(gamePks).Fields(fields).Execute()
Get the last pitch for a list of games
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePks := TODO // interface{} | Unique Primary Key Representing a Game
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.AnalyticsAPI.GameLastPitch(context.Background()).GamePks(gamePks).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.GameLastPitch``: %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 apiGameLastPitchRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
gamePks | interface{} | Unique Primary Key Representing a Game | |
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]
HomeRunBallparks
HomeRunBallparks(ctx, gamePk, guid).IsHomeRunParks(isHomeRunParks).Fields(fields).Execute()
Get if the play is a home run is each park for a specific play.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
guid := TODO // interface{} | Unique identifier for a play within a game
isHomeRunParks := TODO // interface{} |
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.AnalyticsAPI.HomeRunBallparks(context.Background(), gamePk, guid).IsHomeRunParks(isHomeRunParks).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.HomeRunBallparks``: %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 | |
guid | interface{} | Unique identifier for a play within a game |
Other Parameters
Other parameters are passed through a pointer to a apiHomeRunBallparksRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
isHomeRunParks | interface{} | | 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]
ParsedJsonFormattedAnalytics
ParsedJsonFormattedAnalytics(ctx, gamePk, guid).Fields(fields).Execute()
Get Statcast data for a specific play.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
guid := TODO // interface{} | Unique identifier for a play within a game
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.AnalyticsAPI.ParsedJsonFormattedAnalytics(context.Background(), gamePk, guid).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.ParsedJsonFormattedAnalytics``: %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 | |
guid | interface{} | Unique identifier for a play within a game |
Other Parameters
Other parameters are passed through a pointer to a apiParsedJsonFormattedAnalyticsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
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]