mlbstats/api/docs/LeagueAPI.md

30 KiB

\LeagueAPI

All URIs are relative to http://localhost

Method HTTP request Description
AllStarBallot Get /api/v1/league/allStarBallot View al star ballot info
AllStarBallot1 Get /api/v1/league/{leagueId}/allStarBallot View al star ballot info
AllStarBallot2 Get /api/v1/leagues/allStarBallot View al star ballot info
AllStarBallot3 Get /api/v1/leagues/{leagueId}/allStarBallot View al star ballot info
AllStarFinalVote Get /api/v1/league/{leagueId}/allStarFinalVote View all star final vote info
AllStarFinalVote1 Get /api/v1/leagues/{leagueId}/allStarFinalVote View all star final vote info
AllStarWriteIns Get /api/v1/league/{leagueId}/allStarWriteIns View all star write ins info
AllStarWriteIns1 Get /api/v1/leagues/{leagueId}/allStarWriteIns View all star write ins info
League Get /api/v1/league View league info
League1 Get /api/v1/league/{leagueId} View league info
League2 Get /api/v1/leagues View league info
League3 Get /api/v1/leagues/{leagueId} View league info

AllStarBallot

AllStarBallot(ctx, leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()

View al star ballot info

Example

package main

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

func main() {
	leagueId := TODO // interface{} | Unique League Identifier
	leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
	season := TODO // interface{} | Season of play (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.LeagueAPI.AllStarBallot(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarBallot``: %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.
leagueId interface{} Unique League Identifier

Other Parameters

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

Name Type Description Notes

leagueIds | interface{} | Comma delimited list of Unique league identifiers | season | interface{} | Season of play | 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]

AllStarBallot1

AllStarBallot1(ctx, leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()

View al star ballot info

Example

package main

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

func main() {
	leagueId := TODO // interface{} | Unique League Identifier
	leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
	season := TODO // interface{} | Season of play (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.LeagueAPI.AllStarBallot1(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarBallot1``: %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.
leagueId interface{} Unique League Identifier

Other Parameters

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

Name Type Description Notes

leagueIds | interface{} | Comma delimited list of Unique league identifiers | season | interface{} | Season of play | 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]

AllStarBallot2

AllStarBallot2(ctx, leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()

View al star ballot info

Example

package main

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

func main() {
	leagueId := TODO // interface{} | Unique League Identifier
	leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
	season := TODO // interface{} | Season of play (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.LeagueAPI.AllStarBallot2(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarBallot2``: %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.
leagueId interface{} Unique League Identifier

Other Parameters

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

Name Type Description Notes

leagueIds | interface{} | Comma delimited list of Unique league identifiers | season | interface{} | Season of play | 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]

AllStarBallot3

AllStarBallot3(ctx, leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()

View al star ballot info

Example

package main

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

func main() {
	leagueId := TODO // interface{} | Unique League Identifier
	leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
	season := TODO // interface{} | Season of play (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.LeagueAPI.AllStarBallot3(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarBallot3``: %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.
leagueId interface{} Unique League Identifier

Other Parameters

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

Name Type Description Notes

leagueIds | interface{} | Comma delimited list of Unique league identifiers | season | interface{} | Season of play | 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]

AllStarFinalVote

AllStarFinalVote(ctx, leagueId).Season(season).Fields(fields).Execute()

View all star final vote info

Example

package main

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

func main() {
	leagueId := TODO // interface{} | Unique League Identifier
	season := TODO // interface{} | Season of play (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.LeagueAPI.AllStarFinalVote(context.Background(), leagueId).Season(season).Fields(fields).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarFinalVote``: %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.
leagueId interface{} Unique League Identifier

Other Parameters

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

Name Type Description Notes

season | interface{} | Season of play | 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]

AllStarFinalVote1

AllStarFinalVote1(ctx, leagueId).Season(season).Fields(fields).Execute()

View all star final vote info

Example

package main

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

func main() {
	leagueId := TODO // interface{} | Unique League Identifier
	season := TODO // interface{} | Season of play (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.LeagueAPI.AllStarFinalVote1(context.Background(), leagueId).Season(season).Fields(fields).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarFinalVote1``: %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.
leagueId interface{} Unique League Identifier

Other Parameters

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

Name Type Description Notes

season | interface{} | Season of play | 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]

AllStarWriteIns

AllStarWriteIns(ctx, leagueId).Season(season).Fields(fields).Execute()

View all star write ins info

Example

package main

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

func main() {
	leagueId := TODO // interface{} | Unique League Identifier
	season := TODO // interface{} | Season of play (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.LeagueAPI.AllStarWriteIns(context.Background(), leagueId).Season(season).Fields(fields).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarWriteIns``: %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.
leagueId interface{} Unique League Identifier

Other Parameters

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

Name Type Description Notes

season | interface{} | Season of play | 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]

AllStarWriteIns1

AllStarWriteIns1(ctx, leagueId).Season(season).Fields(fields).Execute()

View all star write ins info

Example

package main

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

func main() {
	leagueId := TODO // interface{} | Unique League Identifier
	season := TODO // interface{} | Season of play (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.LeagueAPI.AllStarWriteIns1(context.Background(), leagueId).Season(season).Fields(fields).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarWriteIns1``: %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.
leagueId interface{} Unique League Identifier

Other Parameters

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

Name Type Description Notes

season | interface{} | Season of play | 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]

League

League(ctx, leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()

View league info

Example

package main

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

func main() {
	leagueId := TODO // interface{} | Unique League Identifier
	leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
	season := TODO // interface{} | Season of play (optional)
	seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
	fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
	sportId := TODO // interface{} | Top level organization of a sport (optional)
	activeStatus := TODO // interface{} | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.LeagueAPI.League(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.League``: %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.
leagueId interface{} Unique League Identifier

Other Parameters

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

Name Type Description Notes

leagueIds | interface{} | Comma delimited list of Unique league identifiers | season | interface{} | Season of play | seasons | interface{} | Comma delimited list of Seasons of play | fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | sportId | interface{} | Top level organization of a sport | activeStatus | interface{} | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) |

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]

League1

League1(ctx, leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()

View league info

Example

package main

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

func main() {
	leagueId := TODO // interface{} | Unique League Identifier
	leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
	season := TODO // interface{} | Season of play (optional)
	seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
	fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
	sportId := TODO // interface{} | Top level organization of a sport (optional)
	activeStatus := TODO // interface{} | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.LeagueAPI.League1(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.League1``: %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.
leagueId interface{} Unique League Identifier

Other Parameters

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

Name Type Description Notes

leagueIds | interface{} | Comma delimited list of Unique league identifiers | season | interface{} | Season of play | seasons | interface{} | Comma delimited list of Seasons of play | fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | sportId | interface{} | Top level organization of a sport | activeStatus | interface{} | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) |

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]

League2

League2(ctx, leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()

View league info

Example

package main

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

func main() {
	leagueId := TODO // interface{} | Unique League Identifier
	leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
	season := TODO // interface{} | Season of play (optional)
	seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
	fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
	sportId := TODO // interface{} | Top level organization of a sport (optional)
	activeStatus := TODO // interface{} | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.LeagueAPI.League2(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.League2``: %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.
leagueId interface{} Unique League Identifier

Other Parameters

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

Name Type Description Notes

leagueIds | interface{} | Comma delimited list of Unique league identifiers | season | interface{} | Season of play | seasons | interface{} | Comma delimited list of Seasons of play | fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | sportId | interface{} | Top level organization of a sport | activeStatus | interface{} | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) |

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]

League3

League3(ctx, leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()

View league info

Example

package main

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

func main() {
	leagueId := TODO // interface{} | Unique League Identifier
	leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
	season := TODO // interface{} | Season of play (optional)
	seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
	fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
	sportId := TODO // interface{} | Top level organization of a sport (optional)
	activeStatus := TODO // interface{} | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.LeagueAPI.League3(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.League3``: %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.
leagueId interface{} Unique League Identifier

Other Parameters

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

Name Type Description Notes

leagueIds | interface{} | Comma delimited list of Unique league identifiers | season | interface{} | Season of play | seasons | interface{} | Comma delimited list of Seasons of play | fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | sportId | interface{} | Top level organization of a sport | activeStatus | interface{} | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) |

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]