mlbstats/api/docs/SeasonApi.md

127 lines
4.8 KiB
Markdown
Raw Normal View History

2025-04-06 04:55:01 +00:00
# {{classname}}
All URIs are relative to *https://statsapi.mlb.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**AllSeasons**](SeasonApi.md#AllSeasons) | **Get** /api/v1/seasons/all | View all seasons
[**Seasons**](SeasonApi.md#Seasons) | **Get** /api/v1/seasons | View season info
[**Seasons1**](SeasonApi.md#Seasons1) | **Get** /api/v1/seasons/{seasonId} | View season info
# **AllSeasons**
> SeasonsRestObject AllSeasons(ctx, optional)
View all seasons
This endpoint allows you to view all seasons for a given Division, League or Sport
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***SeasonApiAllSeasonsOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a SeasonApiAllSeasonsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**divisionId** | **optional.Int32**| Unique Division Identifier |
**leagueId** | **optional.Int32**| Unique League Identifier |
**sportId** | **optional.Int32**| Top level organization of a sport |
**withGameTypeDates** | **optional.Bool**| Retrieve dates for each game type |
**fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
### Return type
[**SeasonsRestObject**](SeasonsRestObject.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)
# **Seasons**
> SeasonsRestObject Seasons(ctx, seasonId, optional)
View season info
This endpoint allows you to pull seasons
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**seasonId** | **string**| Season of play |
**optional** | ***SeasonApiSeasonsOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a SeasonApiSeasonsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**season** | [**optional.Interface of []string**](string.md)| Season of play |
**sportId** | **optional.Int32**| Top level organization of a sport |
**withGameTypeDates** | **optional.Bool**| Retrieve dates for each game type |
**fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
### Return type
[**SeasonsRestObject**](SeasonsRestObject.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)
# **Seasons1**
> SeasonsRestObject Seasons1(ctx, seasonId, optional)
View season info
This endpoint allows you to pull seasons
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**seasonId** | **string**| Season of play |
**optional** | ***SeasonApiSeasons1Opts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a SeasonApiSeasons1Opts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**season** | [**optional.Interface of []string**](string.md)| Season of play |
**sportId** | **optional.Int32**| Top level organization of a sport |
**withGameTypeDates** | **optional.Bool**| Retrieve dates for each game type |
**fields** | [**optional.Interface of []string**](string.md)| Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
### Return type
[**SeasonsRestObject**](SeasonsRestObject.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)