mlbstats/api/docs/MilestonesAPI.md

12 KiB

\MilestonesAPI

All URIs are relative to http://localhost

Method HTTP request Description
AchievementStatuses Get /api/v1/achievementStatuses View available achievementStatus options
MilestoneDurations Get /api/v1/milestoneDurations View available milestoneDurations options
MilestoneLookups Get /api/v1/milestoneLookups View available milestoneLookup options
MilestoneStatistics Get /api/v1/milestoneStatistics View available milestone statistics options
MilestoneTypes Get /api/v1/milestoneTypes View available milestoneType options
Milestones Get /api/v1/milestones View pending and achieved milestones.

AchievementStatuses

AchievementStatuses(ctx).Execute()

View available achievementStatus options

Example

package main

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

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MilestonesAPI.AchievementStatuses(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MilestonesAPI.AchievementStatuses``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

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]

MilestoneDurations

MilestoneDurations(ctx).Execute()

View available milestoneDurations options

Example

package main

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

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MilestonesAPI.MilestoneDurations(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MilestonesAPI.MilestoneDurations``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

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]

MilestoneLookups

MilestoneLookups(ctx).Execute()

View available milestoneLookup options

Example

package main

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

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MilestonesAPI.MilestoneLookups(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MilestonesAPI.MilestoneLookups``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

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]

MilestoneStatistics

MilestoneStatistics(ctx).Execute()

View available milestone statistics options

Example

package main

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

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MilestonesAPI.MilestoneStatistics(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MilestonesAPI.MilestoneStatistics``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

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]

MilestoneTypes

MilestoneTypes(ctx).Execute()

View available milestoneType options

Example

package main

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

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MilestonesAPI.MilestoneTypes(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MilestonesAPI.MilestoneTypes``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

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]

Milestones

Milestones(ctx).OrgType(orgType).AchievementStatuses(achievementStatuses).MilestoneTypes(milestoneTypes).IsLastAchievement(isLastAchievement).MilestoneStatistics(milestoneStatistics).MilestoneValues(milestoneValues).PlayerIds(playerIds).TeamIds(teamIds).LeagueIds(leagueIds).StatGroup(statGroup).Season(season).Seasons(seasons).VenueIds(venueIds).GamePks(gamePks).Limit(limit).Fields(fields).ShowFirsts(showFirsts).Execute()

View pending and achieved milestones.

Example

package main

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

func main() {
	orgType := TODO // interface{} | Organization level. Format: T(Team), L(League), S(Sport) (optional)
	achievementStatuses := TODO // interface{} | Comma delimited list of milestone achievement types (optional)
	milestoneTypes := TODO // interface{} | Comma delimited list of milestone types (optional)
	isLastAchievement := TODO // interface{} | Filters out milestones that have already been surpassed. (optional)
	milestoneStatistics := TODO // interface{} | Comma delimited list of milestone statistics (optional)
	milestoneValues := TODO // interface{} | Comma delimited list of milestone values (optional)
	playerIds := TODO // interface{} | A unique identifier for players (optional)
	teamIds := TODO // interface{} | Comma delimited list of Unique Team identifiers (optional)
	leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
	statGroup := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (optional)
	season := TODO // interface{} | Season of play (optional)
	seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
	venueIds := TODO // interface{} | Comma delimited list of Unique venue identifiers (optional)
	gamePks := TODO // interface{} | Comma delimited list of unique primary keys (optional)
	limit := TODO // interface{} | Number of results to return (optional)
	fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
	showFirsts := TODO // interface{} | True to show play first milestones, like first HR, first Save, etc (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MilestonesAPI.Milestones(context.Background()).OrgType(orgType).AchievementStatuses(achievementStatuses).MilestoneTypes(milestoneTypes).IsLastAchievement(isLastAchievement).MilestoneStatistics(milestoneStatistics).MilestoneValues(milestoneValues).PlayerIds(playerIds).TeamIds(teamIds).LeagueIds(leagueIds).StatGroup(statGroup).Season(season).Seasons(seasons).VenueIds(venueIds).GamePks(gamePks).Limit(limit).Fields(fields).ShowFirsts(showFirsts).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MilestonesAPI.Milestones``: %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 apiMilestonesRequest struct via the builder pattern

Name Type Description Notes
orgType interface{} Organization level. Format: T(Team), L(League), S(Sport)
achievementStatuses interface{} Comma delimited list of milestone achievement types
milestoneTypes interface{} Comma delimited list of milestone types
isLastAchievement interface{} Filters out milestones that have already been surpassed.
milestoneStatistics interface{} Comma delimited list of milestone statistics
milestoneValues interface{} Comma delimited list of milestone values
playerIds interface{} A unique identifier for players
teamIds interface{} Comma delimited list of Unique Team identifiers
leagueIds interface{} Comma delimited list of Unique league identifiers
statGroup interface{} Category of statistic to return. Available types in /api/v1/statGroups
season interface{} Season of play
seasons interface{} Comma delimited list of Seasons of play
venueIds interface{} Comma delimited list of Unique venue identifiers
gamePks interface{} Comma delimited list of unique primary keys
limit interface{} Number of results to return
fields interface{} Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
showFirsts interface{} True to show play first milestones, like first HR, first Save, etc

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]