mlbstats/api/docs/SportsAPI.md

315 lines
10 KiB
Markdown
Raw Normal View History

2025-04-06 23:39:04 +00:00
# \SportsAPI
All URIs are relative to *http://localhost*
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
> AllSportBallot(ctx, sportId).Season(season).Fields(fields).Execute()
Get ALL MLB ballot for sport
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
sportId := TODO // interface{} | Top level organization of a sport
season := TODO // interface{} | season
fields := TODO // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SportsAPI.AllSportBallot(context.Background(), sportId).Season(season).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SportsAPI.AllSportBallot``: %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.
**sportId** | [**interface{}**](.md) | Top level organization of a sport |
### Other Parameters
Other parameters are passed through a pointer to a apiAllSportBallotRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**season** | [**interface{}**](interface{}.md) | season |
**fields** | [**interface{}**](interface{}.md) | |
### 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]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## SportPlayers
> SportPlayers(ctx, sportId).Season(season).GameType(gameType).HasStats(hasStats).Accent(accent).Fields(fields).Execute()
Get all players for a sport level
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
sportId := TODO // interface{} | Top level organization of a sport
season := TODO // interface{} | Season of play (optional)
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
hasStats := TODO // interface{} | Returns sports that have individual player stats (optional)
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (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.SportsAPI.SportPlayers(context.Background(), sportId).Season(season).GameType(gameType).HasStats(hasStats).Accent(accent).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SportsAPI.SportPlayers``: %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.
**sportId** | [**interface{}**](.md) | Top level organization of a sport |
### Other Parameters
Other parameters are passed through a pointer to a apiSportPlayersRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**season** | [**interface{}**](interface{}.md) | Season of play |
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
**hasStats** | [**interface{}**](interface{}.md) | Returns sports that have individual player stats |
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
**fields** | [**interface{}**](interface{}.md) | 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]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## Sports
> Sports(ctx, sportId).Season(season).Fields(fields).HasStats(hasStats).ActiveStatus(activeStatus).Execute()
Get sports information
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
sportId := TODO // interface{} | Top level organization of a sport
season := TODO // interface{} | Season of play (optional)
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
hasStats := TODO // interface{} | Returns sports that have individual player stats (optional)
activeStatus := TODO // interface{} | Flag for fetching sports that are currently active (Y), inactive (N), pending (P), or all teams (B) (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SportsAPI.Sports(context.Background(), sportId).Season(season).Fields(fields).HasStats(hasStats).ActiveStatus(activeStatus).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SportsAPI.Sports``: %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.
**sportId** | [**interface{}**](.md) | Top level organization of a sport |
### Other Parameters
Other parameters are passed through a pointer to a apiSportsRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**season** | [**interface{}**](interface{}.md) | Season of play |
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
**hasStats** | [**interface{}**](interface{}.md) | Returns sports that have individual player stats |
**activeStatus** | [**interface{}**](interface{}.md) | Flag for fetching sports 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]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## Sports1
> Sports1(ctx, sportId).Season(season).Fields(fields).HasStats(hasStats).ActiveStatus(activeStatus).Execute()
Get sports information
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
sportId := TODO // interface{} | Top level organization of a sport
season := TODO // interface{} | Season of play (optional)
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
hasStats := TODO // interface{} | Returns sports that have individual player stats (optional)
activeStatus := TODO // interface{} | Flag for fetching sports that are currently active (Y), inactive (N), pending (P), or all teams (B) (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SportsAPI.Sports1(context.Background(), sportId).Season(season).Fields(fields).HasStats(hasStats).ActiveStatus(activeStatus).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SportsAPI.Sports1``: %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.
**sportId** | [**interface{}**](.md) | Top level organization of a sport |
### Other Parameters
Other parameters are passed through a pointer to a apiSports1Request struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**season** | [**interface{}**](interface{}.md) | Season of play |
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
**hasStats** | [**interface{}**](interface{}.md) | Returns sports that have individual player stats |
**activeStatus** | [**interface{}**](interface{}.md) | Flag for fetching sports 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]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)