5.3 KiB
\HighLowAPI
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
HighLow | Get /api/v1/highLow/{highLowType} | View high/low stats by player or team |
HighLowStats | Get /api/v1/highLow/types | View high/low stat types |
HighLow
HighLow(ctx, highLowType).StatGroup(statGroup).SortStat(sortStat).Season(season).GameType(gameType).TeamId(teamId).LeagueId(leagueId).SportId(sportId).Offset(offset).Limit(limit).Fields(fields).Execute()
View high/low stats by player or team
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
highLowType := TODO // interface{} | Type of high/low stats ('player', 'team', 'game')
statGroup := TODO // interface{} | Comma delimited list of categories of statistic to return. Available types in /api/v1/statGroups (optional)
sortStat := TODO // interface{} | Comma delimited list of baseball stats to sort splits by. (optional)
season := TODO // interface{} | Comma delimited list of Seasons of play (optional)
gameType := TODO // interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes (optional)
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
leagueId := TODO // interface{} | Unique League Identifier (optional)
sportId := TODO // interface{} | Top level organization of a sport (optional)
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
limit := TODO // interface{} | Number of results to return (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.HighLowAPI.HighLow(context.Background(), highLowType).StatGroup(statGroup).SortStat(sortStat).Season(season).GameType(gameType).TeamId(teamId).LeagueId(leagueId).SportId(sportId).Offset(offset).Limit(limit).Fields(fields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HighLowAPI.HighLow``: %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. | |
highLowType | interface{} | Type of high/low stats ('player', 'team', 'game') |
Other Parameters
Other parameters are passed through a pointer to a apiHighLowRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
statGroup | interface{} | Comma delimited list of categories of statistic to return. Available types in /api/v1/statGroups | sortStat | interface{} | Comma delimited list of baseball stats to sort splits by. | season | interface{} | Comma delimited list of Seasons of play | gameType | interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes | teamId | interface{} | Unique Team Identifier. Format: 141, 147, etc | leagueId | interface{} | Unique League Identifier | sportId | interface{} | Top level organization of a sport | offset | interface{} | The pointer to start for a return set; used for pagination | limit | interface{} | Number of results to return | 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]
HighLowStats
HighLowStats(ctx).Execute()
View high/low stat types
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "//"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.HighLowAPI.HighLowStats(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HighLowAPI.HighLowStats``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiHighLowStatsRequest struct via the builder pattern
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]