# {{classname}}

All URIs are relative to *https://statsapi.mlb.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**AllSportBallot**](SportsApi.md#AllSportBallot) | **Get** /api/v1/sports/{sportId}/allSportBallot | Get ALL MLB ballot for sport
[**SportPlayers**](SportsApi.md#SportPlayers) | **Get** /api/v1/sports/{sportId}/players | Get all players for a sport level
[**Sports**](SportsApi.md#Sports) | **Get** /api/v1/sports | Get sports information
[**Sports1**](SportsApi.md#Sports1) | **Get** /api/v1/sports/{sportId} | Get sports information

# **AllSportBallot**
> PeopleRestObject AllSportBallot(ctx, sportId, season, optional)
Get ALL MLB ballot for sport

This endpoint allows you to get all players for MLB ballot

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
  **sportId** | **int32**| Top level organization of a sport | 
  **season** | **string**| season | 
 **optional** | ***SportsApiAllSportBallotOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a SportsApiAllSportBallotOpts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------


 **fields** | [**optional.Interface of []string**](string.md)|  | 

### Return type

[**PeopleRestObject**](PeopleRestObject.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: */*

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **SportPlayers**
> PeopleRestObject SportPlayers(ctx, sportId, optional)
Get all players for a sport level

This endpoint allows you to pull all players for a given sport

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
  **sportId** | **int32**| Top level organization of a sport | 
 **optional** | ***SportsApiSportPlayersOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a SportsApiSportPlayersOpts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------

 **season** | **optional.String**| Season of play | 
 **gameType** | [**optional.Interface of GameTypeEnum**](.md)| Type of Game. Available types in /api/v1/gameTypes | 
 **hasStats** | **optional.Bool**| Returns sports that have individual player stats | 
 **accent** | **optional.Bool**| Boolean value to specify wanting a person&#x27;s name with accents or without | 
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 

### Return type

[**PeopleRestObject**](PeopleRestObject.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: */*

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **Sports**
> SportsRestObject Sports(ctx, sportId, optional)
Get sports information

This endpoint allows you to pull sports

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
  **sportId** | **int32**| Top level organization of a sport | 
 **optional** | ***SportsApiSportsOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a SportsApiSportsOpts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------

 **season** | **optional.String**| Season of play | 
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 
 **hasStats** | **optional.Bool**| Returns sports that have individual player stats | 
 **activeStatus** | [**optional.Interface of SportActiveStatusEnum**](.md)| Flag for fetching sports that are currently active (Y), inactive (N), pending (P), or all teams (B) | 

### Return type

[**SportsRestObject**](SportsRestObject.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: */*

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **Sports1**
> SportsRestObject Sports1(ctx, sportId, optional)
Get sports information

This endpoint allows you to pull sports

### Required Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
  **sportId** | **int32**| Top level organization of a sport | 
 **optional** | ***SportsApiSports1Opts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a SportsApiSports1Opts struct
Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------

 **season** | **optional.String**| Season of play | 
 **fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | 
 **hasStats** | **optional.Bool**| Returns sports that have individual player stats | 
 **activeStatus** | [**optional.Interface of SportActiveStatusEnum**](.md)| Flag for fetching sports that are currently active (Y), inactive (N), pending (P), or all teams (B) | 

### Return type

[**SportsRestObject**](SportsRestObject.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: */*

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

