mlbstats/api/docs/AttendanceAPI.md

3.6 KiB

\AttendanceAPI

All URIs are relative to http://localhost

Method HTTP request Description
GetTeamAttendance Get /api/v1/attendance Get team attendance

GetTeamAttendance

GetTeamAttendance(ctx).TeamId(teamId).LeagueId(leagueId).Season(season).LeagueListId(leagueListId).GameType(gameType).Date(date).StartDate(startDate).EndDate(endDate).Fields(fields).Execute()

Get team attendance

Example

package main

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

func main() {
	teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
	leagueId := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
	season := TODO // interface{} | Comma delimited list of Seasons of play (optional)
	leagueListId := TODO // interface{} | Unique League List Identifier (optional)
	gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
	date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
	startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
	endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (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.AttendanceAPI.GetTeamAttendance(context.Background()).TeamId(teamId).LeagueId(leagueId).Season(season).LeagueListId(leagueListId).GameType(gameType).Date(date).StartDate(startDate).EndDate(endDate).Fields(fields).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AttendanceAPI.GetTeamAttendance``: %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 apiGetTeamAttendanceRequest struct via the builder pattern

Name Type Description Notes
teamId interface{} Unique Team Identifier. Format: 141, 147, etc
leagueId interface{} Comma delimited list of Unique league identifiers
season interface{} Comma delimited list of Seasons of play
leagueListId interface{} Unique League List Identifier
gameType interface{} Type of Game. Available types in /api/v1/gameTypes
date interface{} Date of Game. Format: YYYY-MM-DD
startDate interface{} Start date for range of data (must be used with end date). Format: MM/DD/YYYY
endDate interface{} End date for range of data (must be used with start date). Format: MM/DD/YYYY
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]