mlbstats/api/docs/DraftAPI.md

474 lines
23 KiB
Markdown
Raw Normal View History

2025-04-06 23:39:04 +00:00
# \DraftAPI
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**DraftPicks**](DraftAPI.md#DraftPicks) | **Get** /api/v1/draft | View MLB Drafted Players
[**DraftPicks1**](DraftAPI.md#DraftPicks1) | **Get** /api/v1/draft/{year} | View MLB Drafted Players
[**DraftProspects**](DraftAPI.md#DraftProspects) | **Get** /api/v1/draft/prospects | View MLB Draft Prospects
[**DraftProspects1**](DraftAPI.md#DraftProspects1) | **Get** /api/v1/draft/prospects/{year} | View MLB Draft Prospects
[**LatestDraftPicks**](DraftAPI.md#LatestDraftPicks) | **Get** /api/v1/draft/{year}/latest | Get the last drafted player and the next 5 teams up to pick
## DraftPicks
> DraftPicks(ctx, year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
View MLB Drafted Players
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
year := TODO // interface{} | Year the player was drafted. Format: 2000
limit := TODO // interface{} | Number of results to return (optional)
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
sortBy := TODO // interface{} | Sort the set of data by the specified field (optional)
drafted := TODO // interface{} | Whether or not the players been drafted (optional)
round := TODO // interface{} | Round in which a player was drafted (optional)
name := TODO // interface{} | Filter players by the first letter of their name using using the specific character (optional)
school := TODO // interface{} | Filter players by the first letter of their school using using the specific character (optional)
position := TODO // interface{} | Position number. Format: 1, 2, 3, etc (optional)
team := TODO // interface{} | Unique Team Code. Format: tor, nya, etc (optional)
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
state := TODO // interface{} | State where the venue is located. Format: Ohio (optional)
country := TODO // interface{} | Filter players by their home country (optional)
playerId := TODO // interface{} | A unique identifier for a player (optional)
bisPlayerId := TODO // interface{} | A unique identifier for a player in the EBIS system (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DraftAPI.DraftPicks(context.Background(), year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DraftAPI.DraftPicks``: %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.
**year** | [**interface{}**](.md) | Year the player was drafted. Format: 2000 |
### Other Parameters
Other parameters are passed through a pointer to a apiDraftPicksRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
**sortBy** | [**interface{}**](interface{}.md) | Sort the set of data by the specified field |
**drafted** | [**interface{}**](interface{}.md) | Whether or not the players been drafted |
**round** | [**interface{}**](interface{}.md) | Round in which a player was drafted |
**name** | [**interface{}**](interface{}.md) | Filter players by the first letter of their name using using the specific character |
**school** | [**interface{}**](interface{}.md) | Filter players by the first letter of their school using using the specific character |
**position** | [**interface{}**](interface{}.md) | Position number. Format: 1, 2, 3, etc |
**team** | [**interface{}**](interface{}.md) | Unique Team Code. Format: tor, nya, etc |
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
**state** | [**interface{}**](interface{}.md) | State where the venue is located. Format: Ohio |
**country** | [**interface{}**](interface{}.md) | Filter players by their home country |
**playerId** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**bisPlayerId** | [**interface{}**](interface{}.md) | A unique identifier for a player in the EBIS system |
### 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)
## DraftPicks1
> DraftPicks1(ctx, year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
View MLB Drafted Players
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
year := TODO // interface{} | Year the player was drafted. Format: 2000
limit := TODO // interface{} | Number of results to return (optional)
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
sortBy := TODO // interface{} | Sort the set of data by the specified field (optional)
drafted := TODO // interface{} | Whether or not the players been drafted (optional)
round := TODO // interface{} | Round in which a player was drafted (optional)
name := TODO // interface{} | Filter players by the first letter of their name using using the specific character (optional)
school := TODO // interface{} | Filter players by the first letter of their school using using the specific character (optional)
position := TODO // interface{} | Position number. Format: 1, 2, 3, etc (optional)
team := TODO // interface{} | Unique Team Code. Format: tor, nya, etc (optional)
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
state := TODO // interface{} | State where the venue is located. Format: Ohio (optional)
country := TODO // interface{} | Filter players by their home country (optional)
playerId := TODO // interface{} | A unique identifier for a player (optional)
bisPlayerId := TODO // interface{} | A unique identifier for a player in the EBIS system (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DraftAPI.DraftPicks1(context.Background(), year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DraftAPI.DraftPicks1``: %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.
**year** | [**interface{}**](.md) | Year the player was drafted. Format: 2000 |
### Other Parameters
Other parameters are passed through a pointer to a apiDraftPicks1Request struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
**sortBy** | [**interface{}**](interface{}.md) | Sort the set of data by the specified field |
**drafted** | [**interface{}**](interface{}.md) | Whether or not the players been drafted |
**round** | [**interface{}**](interface{}.md) | Round in which a player was drafted |
**name** | [**interface{}**](interface{}.md) | Filter players by the first letter of their name using using the specific character |
**school** | [**interface{}**](interface{}.md) | Filter players by the first letter of their school using using the specific character |
**position** | [**interface{}**](interface{}.md) | Position number. Format: 1, 2, 3, etc |
**team** | [**interface{}**](interface{}.md) | Unique Team Code. Format: tor, nya, etc |
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
**state** | [**interface{}**](interface{}.md) | State where the venue is located. Format: Ohio |
**country** | [**interface{}**](interface{}.md) | Filter players by their home country |
**playerId** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**bisPlayerId** | [**interface{}**](interface{}.md) | A unique identifier for a player in the EBIS system |
### 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)
## DraftProspects
> DraftProspects(ctx, year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
View MLB Draft Prospects
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
year := TODO // interface{} | Year the player was drafted. Format: 2000
limit := TODO // interface{} | Number of results to return (optional)
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
sortBy := TODO // interface{} | Sort the set of data by the specified field (optional)
drafted := TODO // interface{} | Whether or not the players been drafted (optional)
round := TODO // interface{} | Round in which a player was drafted (optional)
name := TODO // interface{} | Filter players by the first letter of their name using using the specific character (optional)
school := TODO // interface{} | Filter players by the first letter of their school using using the specific character (optional)
position := TODO // interface{} | Position number. Format: 1, 2, 3, etc (optional)
team := TODO // interface{} | Unique Team Code. Format: tor, nya, etc (optional)
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
state := TODO // interface{} | State where the venue is located. Format: Ohio (optional)
country := TODO // interface{} | Filter players by their home country (optional)
playerId := TODO // interface{} | A unique identifier for a player (optional)
bisPlayerId := TODO // interface{} | A unique identifier for a player in the EBIS system (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DraftAPI.DraftProspects(context.Background(), year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DraftAPI.DraftProspects``: %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.
**year** | [**interface{}**](.md) | Year the player was drafted. Format: 2000 |
### Other Parameters
Other parameters are passed through a pointer to a apiDraftProspectsRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
**sortBy** | [**interface{}**](interface{}.md) | Sort the set of data by the specified field |
**drafted** | [**interface{}**](interface{}.md) | Whether or not the players been drafted |
**round** | [**interface{}**](interface{}.md) | Round in which a player was drafted |
**name** | [**interface{}**](interface{}.md) | Filter players by the first letter of their name using using the specific character |
**school** | [**interface{}**](interface{}.md) | Filter players by the first letter of their school using using the specific character |
**position** | [**interface{}**](interface{}.md) | Position number. Format: 1, 2, 3, etc |
**team** | [**interface{}**](interface{}.md) | Unique Team Code. Format: tor, nya, etc |
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
**state** | [**interface{}**](interface{}.md) | State where the venue is located. Format: Ohio |
**country** | [**interface{}**](interface{}.md) | Filter players by their home country |
**playerId** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**bisPlayerId** | [**interface{}**](interface{}.md) | A unique identifier for a player in the EBIS system |
### 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)
## DraftProspects1
> DraftProspects1(ctx, year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
View MLB Draft Prospects
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
year := TODO // interface{} | Year the player was drafted. Format: 2000
limit := TODO // interface{} | Number of results to return (optional)
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
sortBy := TODO // interface{} | Sort the set of data by the specified field (optional)
drafted := TODO // interface{} | Whether or not the players been drafted (optional)
round := TODO // interface{} | Round in which a player was drafted (optional)
name := TODO // interface{} | Filter players by the first letter of their name using using the specific character (optional)
school := TODO // interface{} | Filter players by the first letter of their school using using the specific character (optional)
position := TODO // interface{} | Position number. Format: 1, 2, 3, etc (optional)
team := TODO // interface{} | Unique Team Code. Format: tor, nya, etc (optional)
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
state := TODO // interface{} | State where the venue is located. Format: Ohio (optional)
country := TODO // interface{} | Filter players by their home country (optional)
playerId := TODO // interface{} | A unique identifier for a player (optional)
bisPlayerId := TODO // interface{} | A unique identifier for a player in the EBIS system (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DraftAPI.DraftProspects1(context.Background(), year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DraftAPI.DraftProspects1``: %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.
**year** | [**interface{}**](.md) | Year the player was drafted. Format: 2000 |
### Other Parameters
Other parameters are passed through a pointer to a apiDraftProspects1Request struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
**sortBy** | [**interface{}**](interface{}.md) | Sort the set of data by the specified field |
**drafted** | [**interface{}**](interface{}.md) | Whether or not the players been drafted |
**round** | [**interface{}**](interface{}.md) | Round in which a player was drafted |
**name** | [**interface{}**](interface{}.md) | Filter players by the first letter of their name using using the specific character |
**school** | [**interface{}**](interface{}.md) | Filter players by the first letter of their school using using the specific character |
**position** | [**interface{}**](interface{}.md) | Position number. Format: 1, 2, 3, etc |
**team** | [**interface{}**](interface{}.md) | Unique Team Code. Format: tor, nya, etc |
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
**state** | [**interface{}**](interface{}.md) | State where the venue is located. Format: Ohio |
**country** | [**interface{}**](interface{}.md) | Filter players by their home country |
**playerId** | [**interface{}**](interface{}.md) | A unique identifier for a player |
**bisPlayerId** | [**interface{}**](interface{}.md) | A unique identifier for a player in the EBIS system |
### 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)
## LatestDraftPicks
> LatestDraftPicks(ctx, year).Fields(fields).Execute()
Get the last drafted player and the next 5 teams up to pick
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
year := TODO // interface{} | Year the player was drafted. Format: 2000
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.DraftAPI.LatestDraftPicks(context.Background(), year).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DraftAPI.LatestDraftPicks``: %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.
**year** | [**interface{}**](.md) | Year the player was drafted. Format: 2000 |
### Other Parameters
Other parameters are passed through a pointer to a apiLatestDraftPicksRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**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)