mlbstats/api/docs/DivisionAPI.md

5.5 KiB

\DivisionAPI

All URIs are relative to http://localhost

Method HTTP request Description
Divisions Get /api/v1/divisions Get division information
Divisions1 Get /api/v1/divisions/{divisionId} Get division information

Divisions

Divisions(ctx, divisionId).IncludeInactive(includeInactive).LeagueId(leagueId).SportId(sportId).Season(season).Fields(fields).Execute()

Get division information

Example

package main

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

func main() {
	divisionId := TODO // interface{} | Unique Division Identifier
	includeInactive := TODO // interface{} | Whether or not to include inactive (optional)
	leagueId := TODO // interface{} | Unique League Identifier (optional)
	sportId := TODO // interface{} | Top level organization of a sport (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.DivisionAPI.Divisions(context.Background(), divisionId).IncludeInactive(includeInactive).LeagueId(leagueId).SportId(sportId).Season(season).Fields(fields).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DivisionAPI.Divisions``: %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.
divisionId interface{} Unique Division Identifier

Other Parameters

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

Name Type Description Notes

includeInactive | interface{} | Whether or not to include inactive | leagueId | interface{} | Unique League Identifier | sportId | interface{} | Top level organization of a sport | 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]

Divisions1

Divisions1(ctx, divisionId).IncludeInactive(includeInactive).LeagueId(leagueId).SportId(sportId).Season(season).Fields(fields).Execute()

Get division information

Example

package main

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

func main() {
	divisionId := TODO // interface{} | Unique Division Identifier
	includeInactive := TODO // interface{} | Whether or not to include inactive (optional)
	leagueId := TODO // interface{} | Unique League Identifier (optional)
	sportId := TODO // interface{} | Top level organization of a sport (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.DivisionAPI.Divisions1(context.Background(), divisionId).IncludeInactive(includeInactive).LeagueId(leagueId).SportId(sportId).Season(season).Fields(fields).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DivisionAPI.Divisions1``: %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.
divisionId interface{} Unique Division Identifier

Other Parameters

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

Name Type Description Notes

includeInactive | interface{} | Whether or not to include inactive | leagueId | interface{} | Unique League Identifier | sportId | interface{} | Top level organization of a sport | 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]