mlbstats/api/docs/BatTrackingAPI.md

2.2 KiB

\BatTrackingAPI

All URIs are relative to http://localhost

Method HTTP request Description
BatTracking Get /api/v1/batTracking/game/{gamePk}/{playId} View Bat Tracking Data by playId and gameId

BatTracking

BatTracking(ctx, gamePk, playId).Fields(fields).Execute()

View Bat Tracking Data by playId and gameId

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "//"
)

func main() {
	gamePk := TODO // interface{} | Unique Primary Key Representing a Game
	playId := TODO // interface{} | Unique play identifier
	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.BatTrackingAPI.BatTracking(context.Background(), gamePk, playId).Fields(fields).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `BatTrackingAPI.BatTracking``: %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
playId interface{} Unique play identifier

Other Parameters

Other parameters are passed through a pointer to a apiBatTrackingRequest 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]