10 KiB
\SportsAPI
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
AllSportBallot | Get /api/v1/sports/{sportId}/allSportBallot | Get ALL MLB ballot for sport |
SportPlayers | Get /api/v1/sports/{sportId}/players | Get all players for a sport level |
Sports | Get /api/v1/sports | Get sports information |
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
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{} | 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{} | season | fields | interface{} | |
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]
SportPlayers
SportPlayers(ctx, sportId).Season(season).GameType(gameType).HasStats(hasStats).Accent(accent).Fields(fields).Execute()
Get all players for a sport level
Example
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{} | 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{} | Season of play | gameType | interface{} | Type of Game. Available types in /api/v1/gameTypes | hasStats | interface{} | Returns sports that have individual player stats | accent | interface{} | Boolean value to specify wanting a person's name with accents or without | 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]
Sports
Sports(ctx, sportId).Season(season).Fields(fields).HasStats(hasStats).ActiveStatus(activeStatus).Execute()
Get sports information
Example
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{} | 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{} | Season of play | fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | hasStats | interface{} | Returns sports that have individual player stats | activeStatus | interface{} | 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] [Back to Model list] [Back to README]
Sports1
Sports1(ctx, sportId).Season(season).Fields(fields).HasStats(hasStats).ActiveStatus(activeStatus).Execute()
Get sports information
Example
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{} | 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{} | Season of play | fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | hasStats | interface{} | Returns sports that have individual player stats | activeStatus | interface{} | 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] [Back to Model list] [Back to README]